Project

General

Profile

Actions

Bug #11185

open

Redis service stopping before NtopNg

Added by DRago_Angel [InV@DER] 11 months ago. Updated 9 months ago.

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

0%

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 11 months ago

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

Updated by DRago_Angel [InV@DER] 11 months 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] 11 months 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 11 months ago

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

Updated by Renato Botelho 11 months 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 11 months 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] 11 months 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 9 months ago

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

Also available in: Atom PDF