OPNsense Forum

Archive => 18.7 Legacy Series => Topic started by: walkerx on January 01, 2019, 02:51:01 pm

Title: ntopng and redis
Post by: walkerx on January 01, 2019, 02:51:01 pm
I had both of these working on my setup, but have noticed recently that neither of them were running and wouldn't start after a reboot or when trying to manually start them.

I've removed both plugins and retried installing them, yet they still will not start

Would there be a configuration setup that could be preventing these from restarting/working

Title: Re: ntopng and redis
Post by: mimugmail on January 01, 2019, 03:46:04 pm
Can you search the forums? There was a guy with similar problem, deleting some old db folder and rsinstalled .. then it worked
Title: Re: ntopng and redis
Post by: manjeet on January 02, 2019, 05:30:12 am
I had similar issue which is resolved by below:

Note: Some times directly removing database works without removing package but mostly not..
1. Remove ntog and redis package.
2. Remove redis database: From Terminal:
# rm -rf /var/db/redis/DATABASE
OR Simple remove entire filder
# rm -rf /var/db/redis
3. Reinstall package and it will work.
Title: Re: ntopng and redis
Post by: fabian on January 02, 2019, 09:18:17 am
you don't need to reinstall. You can also stop the service and then execute your commands and afterwards start redis again.

It may save you some time.
Title: Re: ntopng and redis
Post by: walkerx on January 08, 2019, 09:58:26 am
sorry for the late response (had a lot going on)

I only have the two nics on the board (gigabyte j1900n-d3v) and the webgui is listening on the lan interface only.

my current setup is
modem (hg612) -> opnsense -> samknows whitebox -> switch -> devices

My internet provider is Sky who renew the lease every 30 minutes and if the lease does not renew successfully you get disconnected, but I don't think this is the issue as if connect to my modem (hg612) and can see that it is still connected and can connect to other devices on my network.

When I loose connection to the internet I cannot access the opnsense box via ip address or via name, nor can i access the internet and only way to rectify the issue is to force reboot the system (which has potential to cause drive issues if not careful)

I'm not sure what is causing the failures, but compared to when I was running pfsense, I've had more downtime with opnsense since installing than I ever did with pfsense in two years.

Title: Re: ntopng and redis
Post by: tre4bax on February 07, 2019, 10:19:18 am
I'm here for the same reason.  Both services stopped a little while ago and no longer run.  Maybe there has been a change driven by an update or something?  All worked fine before.
Title: Re: ntopng and redis
Post by: ThuTex on March 05, 2019, 04:35:17 pm
same here.
i came from 18.7.1 where redis, ntopng, and ups were working as expected, to 19.1.1 and both ntopng and ups are complaining.

now, the ups part is something i find normal due to the small amount of testing it has had (blazer driver), but ntopng is something i dont understand...

redis is started, is listening to localhost, but when trying to start ntopng it mentions that redis needs to be started.
Title: Re: ntopng and redis
Post by: mimugmail on March 05, 2019, 04:51:20 pm
Nothing in the logs?
Title: Re: ntopng and redis
Post by: ThuTex on March 05, 2019, 05:20:05 pm
concerning the ups, it just states the ups is unavailable. seems like a regression of some sorts in the driver.

concerning redis/ntopng, redis starts fine and is running.
ntopng however cannot seem to find it.

Code: [Select]
root@firewall:/usr/local/etc/nut # service redis status
redis is running as pid 161.
root@firewall:/usr/local/etc/nut # service ntopng status
ntopng is not running.
root@firewall:/usr/local/etc/nut # service ntopng start
Starting ntopng.
05/Mar/2019 17:19:34 [Ntop.cpp:1902] Setting local networks to
05/Mar/2019 17:19:34 [Redis.cpp:111] ERROR: ntopng requires redis server to be up and running
05/Mar/2019 17:19:34 [Redis.cpp:112] ERROR: Please start it and try again or use -r
05/Mar/2019 17:19:34 [Redis.cpp:113] ERROR: to specify a redis server other than the default
root@firewall:/usr/local/etc/nut # sockstat | grep -i redis
redis    redis-serv 161   5  dgram  -> /var/run/log
redis    redis-serv 161   7  tcp4        *:*
redis    redis-serv 161   8  tcp6   ::1:6379              *:*
redis    redis-serv 161   9  stream /var/run/redis/redis.sock
root@firewall:/usr/local/etc/nut #

additionally, for some reason, my dns will no longer respond to queries on and from (even though it is running), but will respond to queries to any of the other interface addresses.
Code: [Select]
obody   dnsmasq    61335 14 udp4           *:*
nobody   dnsmasq    61335 15 tcp4           *:*
nobody   dnsmasq    61335 16 udp4          *:*
nobody   dnsmasq    61335 17 tcp4          *:*

mind you that i commented in this topic, but i am currently running 19.1.2
Title: Re: ntopng and redis
Post by: ThuTex on March 05, 2019, 05:41:52 pm
ok guys, i fixed the issue with ntopng.

I remembered a bug/feature discussion about the loopback interface (and renaming it etc because it could be used as an actual interface)

@mimugmail and @franco werent you guys part of that discussion? :)
anyway, since it seemed no service was available on the loopback interface, i decided to go for a guess and went into Firewall: Virtual IPs: Settings and added without gateway as an ip alias on the loopback interface.

dns, ping, and ntopng now function as expected.
maybe an oversight somewhere ?

(i did check on the terminal and lo0 did have assigned already, but i still needed to add it to the virtual ip list for it to actually work)
Title: Re: ntopng and redis
Post by: mirkster on March 15, 2019, 12:12:57 am
I can confirm setting up a virtual IP for fixed this issue for me. I ran into this issue tonight after setting up Unbound to do DNS over TLS (well I think that's what caused it as it!).
Title: Re: ntopng and redis
Post by: franco on March 15, 2019, 07:20:44 am
This sounds like https://github.com/opnsense/core/issues/3287

It seems ntopng is the real culprit here. Adding a VIP just indicates the system is highly unstable as that should never be required.

We suspected that ntopng listening on all interfaces / loopback would maybe cause this...