OPNsense Forum

English Forums => 24.7, 24.10 Legacy Series => Topic started by: koushun on August 27, 2024, 12:58:48 AM

Title: WARNING: failed to start ntopng
Post by: koushun on August 27, 2024, 12:58:48 AM



2024-08-27T00:48:43 Warning ntopng 27/Aug/2024 00:48:43 [Ntop.cpp:3890] WARNING: Unable to find timezone: using UTC
2024-08-27T00:48:40 Notice root /usr/local/etc/rc.d/ntopng: WARNING: failed to start ntopng
2024-08-27T00:48:40 Warning ntopng 27/Aug/2024 00:48:40 [Ntop.cpp:3890] WARNING: Unable to find timezone: using UTC
2024-08-27T00:47:27 Notice root /usr/local/etc/rc.d/ntopng: WARNING: failed to start ntopng
2024-08-27T00:47:27 Error ntopng 27/Aug/2024 00:47:27 [Redis.cpp:157] ERROR: to specify a redis server other than the default
2024-08-27T00:47:27 Error ntopng 27/Aug/2024 00:47:27 [Redis.cpp:154] ERROR: Please start it and try again or use -r
2024-08-27T00:47:27 Error ntopng 27/Aug/2024 00:47:27 [Redis.cpp:153] ERROR: ntopng requires redis server to be up and running
2024-08-27T00:47:26 Error ntopng 27/Aug/2024 00:47:26 [Redis.cpp:98] ERROR: Connection error [Connection refused]
2024-08-27T00:47:25 Error ntopng 27/Aug/2024 00:47:25 [Redis.cpp:98] ERROR: Connection error [Connection refused]
2024-08-27T00:47:24 Error ntopng 27/Aug/2024 00:47:24 [Redis.cpp:98] ERROR: Connection error [Connection refused]


After latest update. ..
Tried stopping and starting redis, tried to stop and start ntopng, tried to reset Redis as well. Tried a reboot.

And ideas?


Title: Re: WARNING: failed to start ntopng
Post by: koushun on September 01, 2024, 02:15:56 AM
/usr/local/etc/rc.d/ntopng start
Certificates generated /usr/local/share/ntopng/httpdocs/ssl/ntopng-cert.pem
Starting ntopng.
md5sum: invalid option -- q
usage: md5sum [-bctwz] [files ...]
usage: grep [-abcDEFGHhIiLlmnOopqRSsUVvwxz] [-A num] [-B num] [-C num]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context=num] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
xargs: md5sum: terminated with signal 13; aborting
01/Sep/2024 02:01:59 [Ntop.cpp:4052] WARNING: Unable to find timezone: using UTC
01/Sep/2024 02:01:59 [Redis.cpp:171] Successfully connected to redis 127.0.0.1@0
01/Sep/2024 02:01:59 [Redis.cpp:171] Successfully connected to redis 127.0.0.1@0
ld-elf.so.1: /usr/local/lib/libgcrypt.so.20: Undefined symbol "gpgrt_add_post_log_func"
/usr/local/etc/rc.d/ntopng: WARNING: failed to start ntopng


find /usr/local/lib -name "libgcrypt.so*"
/usr/local/lib/libgcrypt.so
/usr/local/lib/libgcrypt.so.20
/usr/local/lib/libgcrypt.so.20.5.0


pkg install -f libgcrypt libgpg-error
Updating OPNsense repository catalogue...
OPNsense repository is up to date.
Updating SunnyValley repository catalogue...
SunnyValley repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):

Installed packages to be REINSTALLED:
libgcrypt-1.11.0 [OPNsense]
libgpg-error-1.48 [SunnyValley]

Number of packages to be reinstalled: 2

1 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/2] Fetching libgcrypt-1.11.0.pkg: 100%  818 KiB 837.5kB/s    00:01   
[2/2] Fetching libgpg-error-1.48.pkg: 100%  361 KiB 369.5kB/s    00:01   
Checking integrity... done (0 conflicting)
[1/2] Reinstalling libgpg-error-1.48...
[1/2] Extracting libgpg-error-1.48: 100%
[2/2] Reinstalling libgcrypt-1.11.0...
[2/2] Extracting libgcrypt-1.11.0: 100%


Still unable to start ntopng. That is a bummer.

opnsense-version
OPNsense 24.7.3_1
Title: Re: WARNING: failed to start ntopng
Post by: mezzfit on September 04, 2024, 07:00:56 PM
I'm having the exact issue here. I just updated to 24.7.3_1 today. I don't use ntopng often, but it's nice to have when I need detailed network tracing for a device.
Title: Re: WARNING: failed to start ntopng
Post by: doktornotor on September 04, 2024, 08:53:53 PM
Fix the SunnyValley repo priority to be below 11.


# grep priority /usr/local/etc/pkg/repos/*.conf

Title: Re: WARNING: failed to start ntopng
Post by: koushun on September 04, 2024, 11:12:26 PM
It is already below 11?

Quote# grep priority /usr/local/etc/pkg/repos/*.conf
/usr/local/etc/pkg/repos/OPNsense.conf:  priority: 11,
/usr/local/etc/pkg/repos/SunnyValley.conf:  priority: 7,
Title: Re: WARNING: failed to start ntopng
Post by: koushun on September 04, 2024, 11:18:25 PM
Yay, I got it working.

pkg install -f -r OPNsense libgcrypt libgpg-error
Updating OPNsense repository catalogue...
OPNsense repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
libgpg-error: 1.48 -> 1.50 [OPNsense]

Installed packages to be REINSTALLED:
libgcrypt-1.11.0 [OPNsense]

Number of packages to be upgraded: 1
Number of packages to be reinstalled: 1

168 KiB to be downloaded.

Proceed with this action? [y/N]: y
Title: Re: WARNING: failed to start ntopng
Post by: doktornotor on September 04, 2024, 11:23:56 PM
NFC. FreeBSD's package managers have always been braindead.
Title: Re: WARNING: failed to start ntopng
Post by: franco on September 05, 2024, 09:09:26 AM
I'm not sure why we are seeing this now since we are still on an older pkg version so nothing has changed there?

What this looks like is the CONSERVATIVE_UPGRADE feature in pkg not taking a newer package from another repository because it was originally installed by another. The fun thing is this is off by default and it has always caused issues for us when people "temporarily" enabled the FreeBSD repository breaking the ability to update by pulling a newer pkg version from FreeBSD.

I can assure you nothing was changed in ages. It could be a bug in pkg's version matcher, but it doesn't make much sense either given that nobody would have meddled with CONSERVATIVE_UPGRADE defaults manually or by third party software.


Cheers,
Franco
Title: Re: WARNING: failed to start ntopng
Post by: doktornotor on September 05, 2024, 09:32:58 AM
Quote from: franco on September 05, 2024, 09:09:26 AM
I'm not sure why we are seeing this now

No idea, I gave up trying to understand various pkg oddities. This one feels like some sort of staged updates with apt (APT::Get::Always-Include-Phased-Updates true;), except that there's no such thing in FreeBSD.

Meh.

Also, looking e.g. here (https://people.freebsd.org/~olivierd/porters-handbook/makefile-depend.html), it seems there's no way to specify a min. version for LIB_DEPENDS to nudge the not overly smart packge manager - which, well... needs to be fixed IMHO. Looking at this proposal (https://wiki.freebsd.org/Ports/fix_lib_depends), well, that won't cut it. Maybe abusing RUN_DEPENDS would. Well, I mean - wouldn't be so much of an abuse anyway, considering it doesn't run with lower versions.

Title: Re: WARNING: failed to start ntopng
Post by: franco on September 05, 2024, 11:18:07 AM
Not having a third party repo would certainly avoid this from happening. libgpg-error is pulled in by something related to Zenarmor first which seems to make this stick. There is probably a reason for it and I general I ask to avoid package overlap if possible. An exception to the rule perhaps, but as noted nothing to be done.


Cheers,
Franco
Title: Re: WARNING: failed to start ntopng
Post by: @lex on September 22, 2024, 02:26:18 PM
Quote from: koushun on September 04, 2024, 11:18:25 PM
Yay, I got it working.

pkg install -f -r OPNsense libgcrypt libgpg-error
Updating OPNsense repository catalogue...
OPNsense repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
libgpg-error: 1.48 -> 1.50 [OPNsense]

Installed packages to be REINSTALLED:
libgcrypt-1.11.0 [OPNsense]

Number of packages to be upgraded: 1
Number of packages to be reinstalled: 1

168 KiB to be downloaded.

Proceed with this action? [y/N]: y


Thanks, worked here as well !
Title: Re: WARNING: failed to start ntopng
Post by: 36thchamber on October 02, 2024, 03:06:40 AM
my ntopng starts but it floods the log with the errors because it wants to run md5sum with -q parameter which is not working even on Linux:
xargs md5sum | grep `md5sum -q /etc/localtime`

OPNsense 24.7.5_3
Title: Re: WARNING: failed to start ntopng
Post by: franco on October 02, 2024, 08:57:29 AM
I can't find "md5sum -q" invoke in any of our code, not even FreeBSD ports.


Cheers,
Franco
Title: Re: WARNING: failed to start ntopng
Post by: 36thchamber on October 02, 2024, 10:36:10 AM
i found it in their executable (/usr/local/bin/ntopng), should have mentioned their version:
GUI: ntopng Community v.6.2.240925 rev.0 (FreeBSD 14.1)
Plugin: os-ntopng (installed)   1.3
Package: ntopng   6.2.d20240813,1

so that is causing grep, md5, and UTC warnings, while the "Undefined symbol "gpgrt_add_post_log_func"" is related to the installed packages.