Project

General

Profile

Actions

Bug #11185

closed

Redis service stopping before NtopNg

Added by DRago_Angel [InV@DER] about 3 years ago. Updated 11 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
ntop
Target version:
-
Start date:
12/22/2020
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
Affected Architecture:

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]
....

Actions #1

Updated by Jim Pingle about 3 years ago

  • Priority changed from High to Normal
  • Target version deleted (2.5.0)
Actions #2

Updated by DRago_Angel [InV@DER] about 3 years ago

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?

Actions #3

Updated by DRago_Angel [InV@DER] about 3 years ago

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

Actions #4

Updated by Viktor Gurov about 3 years ago

  • Status changed from New to Pull Request Review
Actions #5

Updated by Renato Botelho about 3 years ago

  • Status changed from Pull Request Review to Feedback
  • Assignee set to Renato Botelho

PR has been merged. Thanks!

Actions #6

Updated by Azamat Khakimyanov about 3 years ago

  • 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
  1. Kill ntopng and redis
    /usr/bin/killall ntopng redis-cli redis-server
    EOD;
    for all NtopNG versions.
Actions #7

Updated by DRago_Angel [InV@DER] about 3 years ago

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

Actions #8

Updated by Viktor Gurov about 3 years ago

  • Status changed from Assigned to Feedback
  • Affected Version deleted (2.4.5)
Actions #9

Updated by Renato Botelho almost 2 years ago

  • Assignee deleted (Renato Botelho)
Actions #10

Updated by Jordan G over 1 year ago

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

Actions #11

Updated by Jim Pingle over 1 year ago

  • Status changed from Feedback to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF