Ntopng Not Starting
-
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!
-
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?
-
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/807/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 defaultSo 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!
-
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
-
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 directoryAnd 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).
-
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).
-
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
-
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!
-
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.