Bug #11185
closed
Redis service stopping before NtopNg
Added by DRago_Angel [InV@DER] over 3 years ago.
Updated 12 months ago.
Description
Redis is dependency for NtopNG. It must stop after NtopNG, but it don't. In result when you stop NtopNG via pfSense webUI or via service NtopNg hands endlessly trying to save something in Redis which was stoped a second ago.
22/Dec/2020 17:56:43 [Ntop.cpp:2444] Executing shutdown script
22/Dec/2020 17:56:44 [Redis.cpp:99] ERROR: Connection error [Operation timed out]
22/Dec/2020 17:56:44 [Redis.cpp:83] Redis has disconnected, reconnecting [remaining attempts: 15]
22/Dec/2020 17:56:46 [Redis.cpp:99] ERROR: Connection error [Operation timed out]
22/Dec/2020 17:56:46 [Redis.cpp:83] Redis has disconnected, reconnecting [remaining attempts: 15]
22/Dec/2020 17:56:47 [Redis.cpp:99] ERROR: Connection error [Operation timed out]
22/Dec/2020 17:56:47 [Redis.cpp:83] Redis has disconnected, reconnecting [remaining attempts: 15]
22/Dec/2020 17:56:49 [Redis.cpp:99] ERROR: Connection error [Operation timed out]
22/Dec/2020 17:56:49 [Redis.cpp:83] Redis has disconnected, reconnecting [remaining attempts: 15]
....
- Priority changed from High to Normal
- Target version deleted (
2.5.0)
To note, if run:
if rune something like kill -15 `pgrep ntopng` then ntopng correctly shutting down via SIGTERM and not loose his settings and of course not hanging.Maybe better move redis to separate service?
I wrote basic patch which fix issue in my case:
--- /a/usr/local/pkg/ntopng.inc 2020-11-11 05:09:13.000000000 +0200
+++ /b/usr/local/pkg/ntopng.inc 2020-12-24 10:26:42.231246000 +0200
@@ -155,7 +155,7 @@
/* Create rc script */
$stop = <<<EOD
# Kill ntopng and redis
- /usr/bin/killall ntopng redis-cli redis-server
+ while [ "$(pgrep ntopng)" != "" ]; do /usr/bin/killall ntopng && sleep 3; done; /usr/bin/killall redis-cli redis-server
EOD;
$start = <<<EOD
https://github.com/pfsense/FreeBSD-ports/pull/1012
- Status changed from New to Pull Request Review
- Status changed from Pull Request Review to Feedback
- Assignee set to Renato Botelho
PR has been merged. Thanks!
- Status changed from Feedback to Assigned
Tested on 2.4.5_p1 (2 versions of NtopNG: 0.8.13_5 and 0.8.13_6) and on 2.5-DEVELOPMENT (built on Tue Jan 19 00:05:03 EST 2021) (NtopNG: 0.8.13_7)
I wasn't able to replicate this Bug and I still see in /usr/local/pkg/ntopng.inc
- Kill ntopng and redis
/usr/bin/killall ntopng redis-cli redis-server
EOD;
for all NtopNG versions.
Yes, because patched version is 0.8.13_8 if nothing changed
I really doesn't understand when packages are pushed to public repos. My pfsense 2.5 on netgate xg7100u not getting even updates that already comes to my second pfsense xg7100u on 2.4.5_p1 stable and this getting me nervous. Renato can you please explain why it so?:(
Azamat can you please use system patcher plugin to apply fix from https://github.com/pfsense/FreeBSD-ports/pull/1030 ? Note: you need patch only ntopng.inc file
- Status changed from Assigned to Feedback
- Affected Version deleted (
2.4.5)
- Assignee deleted (
Renato Botelho)
not seeing this when disabling via ntopng settings or stopping the service from the dashboard widget 22.11.a.20221013.0600/0.8.13_10
- Status changed from Feedback to Resolved
- % Done changed from 0 to 100
Also available in: Atom
PDF