Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Ntopng service will not start because Redis service is not running

    Scheduled Pinned Locked Moved Traffic Monitoring
    22 Posts 13 Posters 24.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      musa.ktkgmail.com
      last edited by

      Greetings users,

      I have searched through forums and google and nothing worked for me so I am creating a new topic for this.

      Ntopng service is not running because redis service has stopped working. Log says:

      Mar 28 09:55:05 ntopng [Redis.cpp:81] ERROR: to specify a redis server other than the default
      Mar 28 09:55:05 ntopng [Redis.cpp:80] ERROR: Please start it and try again or use -r
      Mar 28 09:55:05 ntopng [Redis.cpp:79] ERROR: ntopng requires redis server to be up and running

      I kicked up redis once using command :

      Service redis onestart

      and it worked.

      Later again it stopped but now that command wont help me out.

      service redis onestart outputs  "redis is starting"

      service redis onestatus outputs : :redis is not running."

      I am at lost where to go from here. anyone has any idea what to do next in order to kick start redis.

      P.s: I have tried restarting pfsense, re installing ntopng. nothing helps.

      Pfsense verison: 2.3.3-RELEASE-p1 (amd64)
      built on Thu Mar 09 07:17:41 CST 2017
      FreeBSD 10.3-RELEASE-p17

      ntopng  version 0.8.6_1

      redis version redis-3.2.6

      1 Reply Last reply Reply Quote 0
      • V
        VladimirM
        last edited by

        @musa.ktk:

        Greetings users,

        I have searched through forums and google and nothing worked for me so I am creating a new topic for this.

        Ntopng service is not running because redis service has stopped working. Log says:

        Mar 28 09:55:05 ntopng [Redis.cpp:81] ERROR: to specify a redis server other than the default
        Mar 28 09:55:05 ntopng [Redis.cpp:80] ERROR: Please start it and try again or use -r
        Mar 28 09:55:05 ntopng [Redis.cpp:79] ERROR: ntopng requires redis server to be up and running

        I kicked up redis once using command :

        Service redis onestart

        and it worked.

        Later again it stopped but now that command wont help me out.

        service redis onestart outputs  "redis is starting"

        service redis onestatus outputs : :redis is not running."

        I am at lost where to go from here. anyone has any idea what to do next in order to kick start redis.

        P.s: I have tried restarting pfsense, re installing ntopng. nothing helps.

        Pfsense verison: 2.3.3-RELEASE-p1 (amd64)
        built on Thu Mar 09 07:17:41 CST 2017
        FreeBSD 10.3-RELEASE-p17

        ntopng  version 0.8.6_1

        redis version redis-3.2.6

        Go to the shell and try this :  redis-server /usr/local/etc/redis.conf

        Y 1 Reply Last reply Reply Quote 1
        • M
          musa.ktkgmail.com
          last edited by

          That command runs without showing any output which means it runs successfully but service redis onestatus or status still says redis server is not running.

          1 Reply Last reply Reply Quote 0
          • M
            musa.ktkgmail.com
            last edited by

            OK i have got a temporary workaround:

            redis-server

            this command output that address is already in use while service redis onestatus shows that redis is not running.

            by running redis-cli ping the output was PONG which meant redis is somewhat running?

            to shut it down, i used redis-cli shutdown

            then i issued a simple command redis-server

            this opens up redis server cli interface that shows redis is ready to start taking connections.

            I have issued all these commands from Pfsesne sheel directly, and ntopng service starts just fine after this workaround.

            now i need  a way to make this change permanent, how do i do that? in other words how to make it run after reboot?

            1 Reply Last reply Reply Quote 0
            • P
              paftdunk
              last edited by

              I'd love an answer for this as well. Ntop/ntopng is one of several things that ate it after a restore. It really feels like pfsense reliability has taken a hit in the last couple years.

              1 Reply Last reply Reply Quote 1
              • ivorI
                ivor
                last edited by

                @paftdunk:

                I'd love an answer for this as well. Ntop/ntopng is one of several things that ate it after a restore. It really feels like pfsense reliability has taken a hit in the last couple years.

                This has nothing to do with pfSense "reliability", it's related to the ntopng package. That being said, I run ntopng package on several boxes without issues, so perhaps start from your configuration. Lastly, I welcome you to submit bugs as everyone else does it when they have an issue.

                Thanks.

                Need help fast? Our support is available 24/7 https://www.netgate.com/support/

                1 Reply Last reply Reply Quote 0
                • P
                  paftdunk
                  last edited by

                  @ivor:

                  @paftdunk:

                  I'd love an answer for this as well. Ntop/ntopng is one of several things that ate it after a restore. It really feels like pfsense reliability has taken a hit in the last couple years.

                  This has nothing to do with pfSense "reliability", it's related to the ntopng package. That being said, I run ntopng package on several boxes without issues, so perhaps start from your configuration. Lastly, I welcome you to submit bugs as everyone else does it when they have an issue.

                  Thanks.

                  A restore leaving multiple subsystems broken goes directly to platform quality. I've documented my related issues elsewhere.

                  https://forum.pfsense.org/index.php?topic=128262

                  Thanks.

                  1 Reply Last reply Reply Quote 0
                  • ivorI
                    ivor
                    last edited by

                    @paftdunk:

                    @ivor:

                    @paftdunk:

                    I'd love an answer for this as well. Ntop/ntopng is one of several things that ate it after a restore. It really feels like pfsense reliability has taken a hit in the last couple years.

                    This has nothing to do with pfSense "reliability", it's related to the ntopng package. That being said, I run ntopng package on several boxes without issues, so perhaps start from your configuration. Lastly, I welcome you to submit bugs as everyone else does it when they have an issue.

                    Thanks.

                    A restore leaving multiple subsystems broken goes directly to platform quality. I've documented my related issues elsewhere.

                    https://forum.pfsense.org/index.php?topic=128262

                    Thanks.

                    Sorry but that's not documenting or submitting a bug report. Regarding the forum thread (unrelated to ntopng I might add), so? What's your point? You had an issue which you were unable to resolve and you decided to blame the "platform" and claim "reliability has taken a hit". If it's not clear, I don't like your attitude. That's not the right way to ask for help.

                    Need help fast? Our support is available 24/7 https://www.netgate.com/support/

                    1 Reply Last reply Reply Quote 0
                    • D
                      doktornotor Banned
                      last edited by

                      The answer to this problem is that you most likely have screwed redis DB, you should wipe /var/db/ntopng directory (or at least /var/db/ntopng/*.rdb) , uninstall and reinstall the package and start from scratch.

                      As for the rest - useless noise.

                      1 Reply Last reply Reply Quote 0
                      • H
                        HELIA-Dar
                        last edited by

                        TY  Doktornotor!

                        Wipping the /var/db/ntopng  directory solved the issue.

                        Canadian PFSense Partner
                        https://www.it-support-calgary.ca/pfsense.html
                        PFSense How To YouTube Channel
                        https://plus.google.com/u/0/b/110134577590022531785/collection/kn37MB

                        1 Reply Last reply Reply Quote 0
                        • A
                          Andrew453
                          last edited by

                          I get this error on a reboot, and found that it's related to the fact I've put temp and var on a RAM disc.  Ntopng needs a reinstall after a reboot to sort it, but is otherwise stable.

                          1 Reply Last reply Reply Quote 0
                          • Y
                            yalb88 @VladimirM
                            last edited by

                            @vladimirm Thank you,
                            worked for you

                            1 Reply Last reply Reply Quote 0
                            • K
                              KB8DOA
                              last edited by

                              @doktornotor said in Ntopng service will not start because Redis service is not running:

                              wipe /var/db/ntopng directory

                              Can someone share the instructions on how to:
                              wipe the /var/db/ntopng directory
                              ?

                              Thank You

                              Y K 2 Replies Last reply Reply Quote 0
                              • Y
                                yalb88 @KB8DOA
                                last edited by

                                @kb8doa you should go to shell and write "redis-server /usr/local/etc/redis.conf"

                                K T 2 Replies Last reply Reply Quote 0
                                • K
                                  KB8DOA @yalb88
                                  last edited by

                                  @yalb88 said in Ntopng service will not start because Redis service is not running:

                                  @kb8doa you should go to shell and write "redis-server /usr/local/etc/redis.conf"

                                  I have tried this and keep getting this:

                                  [Redis.cpp:119] ERROR: MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.
                                  
                                  K 1 Reply Last reply Reply Quote 0
                                  • K
                                    KB8DOA @KB8DOA
                                    last edited by

                                    This post is deleted!
                                    1 Reply Last reply Reply Quote 0
                                    • K
                                      KB8DOA @KB8DOA
                                      last edited by

                                      This post is deleted!
                                      1 Reply Last reply Reply Quote 0
                                      • P
                                        Paint
                                        last edited by Paint

                                        the same thing was happening to me. I have a script that I run at boot to check if various ntopng settings are changed in the configurations manually (aka ntopng was reinstalled so my customizations were overriden).

                                        Anyway, to get this working again, you need to remove the ::1 address from the redis bind command in ntopng.sh.

                                        the following sed command from CLI will do it for you. Then stop and restart your ntopng.

                                        sed -i '' 's/::1//g' /usr/local/etc/rc.d/ntopng.sh
                                        

                                        If you want to put this in a script like me and run it via cron / startup - here is a snippet of how I do it:

                                        #!/bin/sh
                                        
                                        if grep -q "::1" /usr/local/etc/rc.d/ntopng.sh
                                        then
                                            # code if found
                                            echo "removing ::1 from ntopng.sh"
                                            sed -i '' 's/::1//g' /usr/local/etc/rc.d/ntopng.sh
                                        else
                                            # code if not found
                                            echo "::1 not in ntopng.sh"
                                        fi
                                        

                                        pfSense i5-4590
                                        940/880 mbit Fiber Internet from FiOS
                                        BROCADE ICX6450 48Port L3-Managed Switch w/4x 10GB ports
                                        Netgear R8000 AP (DD-WRT)

                                        1 Reply Last reply Reply Quote 0
                                        • T
                                          trusmith
                                          last edited by trusmith

                                          Posting this here for anyone who's about to give up on life trying to sort this. Now I'm not saying that this is the ACTUAL solution, but this is what worked for me and surprisingly no post/thread seems to be talking about it clearly.

                                          For most people, if none of the above mentioned solutions worked for you all you need to do is the following in the exact same order:

                                          1. Uninstall ntopng from the WebGUI Package Manager successfully.
                                          2. Reboot
                                          3. Delete the ntopng folder in /var/db/
                                          4. Delete the redis conf file in /usr/local/etc/redis.conf (it will be recreated again with the defaults once you reinstall the pkg)
                                          5. Reboot
                                          6. From the WebGUI, install ntopng and then go to settings and enable it. It will probably fail at this point but don't worry as most people give up at this stage.
                                          7. Reboot
                                          8. Once the system comes up, ntop should be running.

                                          Hardly a groundbreaking solution but missing step # 7 was the culprit for me. Hope this helps others like myself.

                                          Now I'm not sure which hook, argument, port, sock or permission is the reason behind this issue, but let's agree that there definitley is a bug which needs squashing.

                                          Thanks & Regards,
                                          John

                                          B 1 Reply Last reply Reply Quote 1
                                          • T
                                            thrx1 @yalb88
                                            last edited by

                                            @trusmith said in Ntopng service will not start because Redis service is not running:

                                            Delete the ntopng folder in /var/db/
                                            Delete the redis conf file in /usr/local/etc/redis.conf (it will be recreated again with the defaults once you reinstall the pkg)

                                            What is the correct way to do this?

                                            I tried going to shell and writing "redis-server /usr/local/etc/redis.conf" but keep getting the message "redis-server /usr/local/etc/redis.conf: Command not found".

                                            T 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.