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

    Ntopng Not Starting

    Scheduled Pinned Locked Moved 2.4 Development Snapshots
    9 Posts 3 Posters 3.9k 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.
    • arrmoA
      arrmo
      last edited by

      Hi,

      In the latest snapshots it seems that ntopng is not starting (actually, I can't even store the configuration from the GUI) - and redis is not running (perhaps the underlying issue?). If I try to manually start redis (service redis onestart) => it doesn't seem to start (redis is not running.).

      Thoughts?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        It installs and runs OK for me on the latest snapshot.

        Do you see any error messages in the logs? What if you try to start it from an ssh shell?

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • arrmoA
          arrmo
          last edited by

          Hi,

          OK, in the latest snapshot my settings are saved, but still cannot start it from the GUI. When I try from SSH, I get the following,

          Starting ntopng.
          07/Jun/2017 19:28:25 [Prefs.cpp:919] Logging into /var/tmp/ntopng/ntopng.log
          07/Jun/2017 19:28:25 [Ntop.cpp:1121] Setting local networks to 127.0.0.0/8

          07/Jun/2017 19:28:26 [Redis.cpp:79] ERROR: ntopng requires redis server to be up and running
          07/Jun/2017 19:28:26 [Redis.cpp:80] ERROR: Please start it and try again or use -r
          07/Jun/2017 19:28:26 [Redis.cpp:81] ERROR: to specify a redis server other than the default

          So then I manually start redis, and again try ntopng - then it works! So the GUI / configuration is not starting redis?

          Starting ntopng.
          07/Jun/2017 19:28:50 [Prefs.cpp:919] Logging into /var/tmp/ntopng/ntopng.log
          07/Jun/2017 19:28:50 [Ntop.cpp:1121] Setting local networks to 127.0.0.0/8
          07/Jun/2017 19:28:50 [Redis.cpp:92] Successfully connected to redis 127.0.0.1:6379@0
          07/Jun/2017 19:28:50 [Ntop.cpp:1095] Parent process is exiting (this is normal)

          Thanks!

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            The script used to stop/start ntopng always runs redis first.

            Try stopping redis and starting it using the same parameters used in /usr/local/etc/rc.d/ntopng.sh

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • arrmoA
              arrmo
              last edited by

              OK, I think that's the issue …  ;). Command and output, below (from /usr/local/etc/rc.d/ntopng.sh),

              Command: /usr/local/bin/redis-server --bind 127.0.0.1 ::1 --dir /var/db/ntopng/ --dbfilename ntopng.rdb &
              Output: 66123:C 08 Jun 18:01:27.035 # Can't chdir to '/var/db/ntopng/': No such file or directory

              And yes, it's not there. Odd ... as I can start the service manually (redis and ntopng). Trying to figure out where the data is being stored (seems not the stock location).

              1 Reply Last reply Reply Quote 0
              • arrmoA
                arrmo
                last edited by

                Actually, a thought here …

                Long story, but this is a fresh install. So looking at the script (/usr/local/etc/rc.d/ntopng.sh), here are the lines to start the service,
                rc_start() {
                                /usr/local/bin/redis-server --bind 127.0.0.1 ::1 --dir /var/db/ntopng/ --dbfilename ntopng.rdb &
                        /usr/local/bin/ntopng -d /var/db/ntopng -G /var/run/ntopng.pid -s -e -w 3000    -i 'alc0' --dns-mode '1'  --local-networks '192.168.0.0/16,172.16.0.0/12,10.0.0.0/8' &

                }

                But, on a clean install, /var/db/ntopng doesn't exist => redis-server fails, and so does ntopng then. Perhaps on the the install of ntopng, create /var/db/ntopng? And it seems that just starting the service manually is putting the db somewhere else (I haven't figured out where yet, sorry).

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

                  This one looks like a problem with the FreeBSD port. I don't see anything in the pkg-plist that would create the directory /var/db/ntopng on install:

                  https://svnweb.freebsd.org/ports/head/net/ntopng/pkg-plist?revision=442671&view=markup

                  Nothing in the port Makefile either:

                  https://svnweb.freebsd.org/ports/head/net/ntopng/Makefile?revision=442675&view=markup

                  1 Reply Last reply Reply Quote 0
                  • arrmoA
                    arrmo
                    last edited by

                    I can create the directory of course, but then we don't fix the underlying issue - and others will have the problem as well.

                    Thanks!

                    1 Reply Last reply Reply Quote 0
                    • jimpJ
                      jimp Rebel Alliance Developer Netgate
                      last edited by

                      Because that's actually the redis db directory and not ntopng, it may not belong in the ntopng FreeBSD port.

                      I'll add an mkdir to the start section of the rc script to make sure it's there.

                      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                      Need help fast? Netgate Global Support!

                      Do not Chat/PM for help!

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