Ntopng ERR_TOO_MANY_REDIRECTS

NethServer Version: 7.9
Module: ntopng

Hi everyone, I need some help with ntopng and I hope you guys could give me some hand.
The ntopng was working just fine, but it was showing a message about Geolocation and a link.
I have tried to follow de steps using the MaxMind GeoIP file.
After executing the proccess I was unable to open ntopng in the browser, it shows the error ERR_TOO_MANY_REDIRECTS
lookint into the logs it shows the following content…
The first error seems to be:
Script failure [/usr/share/ntopng/scripts/callbacks/system/startup.lua][…are/ntopng/scripts/lua/modules/recipients/recipients.lua:583: attempt to index a nil value]

the file recipients.lua in the line 583 says:
builtin_recipients_cache = { recipients.get_recipient_by_name(“builtin_recipient_sqlite”).recipient_id }

that recipients.get_recipient_by_name function seems to be returning null

But I have no idea what to do to make it work again.
I already tried to reinstall the application “bandwith monitor”
and also use “yum remove pfring” that I saw in other topic, but no success :frowning:

Log result:
Mai 13 17:24:12 ns.intraclima.pg systemd[1]: Stopped ntopng high-speed web-based traffic monitoring and analysis tool.
Mai 13 17:24:12 ns.intraclima.pg systemd[1]: Starting ntopng high-speed web-based traffic monitoring and analysis tool…
Mai 13 17:24:12 ns.intraclima.pg systemd[1]: Started ntopng high-speed web-based traffic monitoring and analysis tool.
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [Prefs.cpp:1181] Localhost HTTP user login disabled
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [Prefs.cpp:1139] ntopng will use redis 127.0.0.1@0
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [Ntop.cpp:2347] Setting local networks to 127.0.0.0/8,fe80::/10
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [Redis.cpp:157] Successfully connected to redis 127.0.0.1:6378@0
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [Redis.cpp:157] Successfully connected to redis 127.0.0.1:6378@0
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [NtopPro.cpp:320] [LICENSE] Reading license from Redis
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [NtopPro.cpp:464] [LICENSE] Unable to validate license [Empty license file]
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: [NtopPro.cpp:533] WARNING: [LICENSE] Invalid license [Empty license file]
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: [NtopPro.cpp:550] WARNING: [LICENSE] ntopng will now run in Enterprise L edition for 10 minutes
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [NtopPro.cpp:533] WARNING: [LICENSE] Invalid license [Empty license file]
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [NtopPro.cpp:550] WARNING: [LICENSE] ntopng will now run in Enterprise L edition for 10 minutes
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [NtopPro.cpp:552] WARNING: [LICENSE] before returning to community mode
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: [NtopPro.cpp:552] WARNING: [LICENSE] before returning to community mode
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [NtopPro.cpp:554] WARNING: [LICENSE] You can buy a permanent license at http://shop.ntop.org
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [NtopPro.cpp:556] WARNING: [LICENSE] or run ntopng in community mode starting
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [NtopPro.cpp:557] WARNING: [LICENSE] ntopng --community
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: [NtopPro.cpp:554] WARNING: [LICENSE] You can buy a permanent license at http://shop.ntop.org
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: [NtopPro.cpp:556] WARNING: [LICENSE] or run ntopng in community mode starting
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: [NtopPro.cpp:557] WARNING: [LICENSE] ntopng --community
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: [ViewInterface.cpp:89] WARNING: Empty view interface: “view:all”
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [ViewInterface.cpp:89] WARNING: Empty view interface: “view:all”
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [Ntop.cpp:2452] Registered interface view:all [id: 2]
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [main.cpp:312] PID stored in file /var/run/ntopng.pid
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [Geolocation.cpp:140] Loaded database GeoLite2-ASN.mmdb [/usr/share/GeoIP/GeoLite2-ASN.mmdb][ip_version: 6]
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [Geolocation.cpp:140] Loaded database GeoLite2-City.mmdb [/usr/share/GeoIP/GeoLite2-City.mmdb][ip_version: 6]
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [Geolocation.cpp:60] Using geolocation provided by MaxMind (https://maxmind.com)
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [HTTPserver.cpp:1554] Web server dirs [/usr/share/ntopng/httpdocs][//scripts]
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [HTTPserver.cpp:1557] HTTP server listening on 3000
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [Utils.cpp:764] User changed to ntopng
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [main.cpp:382] Working directory: /var/lib/ntopng
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [main.cpp:384] Scripts/HTML pages directory: /usr/share/ntopng
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [Ntop.cpp:440] Welcome to ntopng x86_64 v.4.2.210510 - © 1998-20 ntop.org
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [NtopPro.cpp:741] [LICENSE] System Id: 5E6B074600100F28
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [NtopPro.cpp:742] [LICENSE] Edition: Enterprise L (Bundle)
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [NtopPro.cpp:743] [LICENSE] License Type: Time-Limited [Empty license file] License
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [NtopPro.cpp:763] [LICENSE] Validity: Until Thu May 13 17:34:12 2021
Mai 13 17:24:12 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:12 [PeriodicActivities.cpp:107] Started periodic activities loop…
Mai 13 17:24:13 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:13 [startup.lua:50] Processing startup.lua: please hold on…
Mai 13 17:24:14 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:14 [startup.lua:144] [lists_utils.lua:758] Refreshing category lists…
Mai 13 17:24:14 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:14 [startup.lua:144] [lists_utils.lua:696] Category Lists (695 hosts, 3614 IPs, 98 JA3) loaded in 0 sec
Mai 13 17:24:14 ns.intraclima.pg ntopng[25963]: [LuaEngine.cpp:363] WARNING: Script failure [/usr/share/ntopng/scripts/callbacks/system/startup.lua][…are/ntopng/scripts/lua/modules/recipients/recipients.lua:583: attempt to index a nil value]
Mai 13 17:24:14 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:14 [LuaEngine.cpp:363] WARNING: Script failure [/usr/share/ntopng/scripts/callbacks/system/startup.lua][…are/ntopng/scripts/lua/modules/recipients/recipients.lua:583: attempt to index a nil value]
Mai 13 17:24:14 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:14 [PeriodicActivities.cpp:168] Each periodic activity script will use 2 threads
Mai 13 17:24:14 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:24:14 [NetworkInterface.cpp:2749] Started packet polling on interface view:all [id: 2]…
Mai 13 17:25:00 ns.intraclima.pg ntopng[25963]: [LuaEngine.cpp:363] WARNING: Script failure [/usr/share/ntopng/scripts/callbacks/interface/5min.lua][…are/ntopng/scripts/lua/modules/recipients/recipients.lua:583: attempt to index a nil value]
Mai 13 17:25:00 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:25:00 [LuaEngine.cpp:363] WARNING: Script failure [/usr/share/ntopng/scripts/callbacks/interface/5min.lua][…are/ntopng/scripts/lua/modules/recipients/recipients.lua:583: attempt to index a nil value]
Mai 13 17:25:00 ns.intraclima.pg ntopng[25963]: [LuaEngine.cpp:329] WARNING: Script failure [//scripts/callbacks/system/system.lua][cannot open //scripts/callbacks/system/system.lua: No such file or directory]
Mai 13 17:25:00 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:25:00 [LuaEngine.cpp:329] WARNING: Script failure [//scripts/callbacks/system/system.lua][cannot open //scripts/callbacks/system/system.lua: No such file or directory]
Mai 13 17:25:05 ns.intraclima.pg ntopng[25963]: [LuaEngine.cpp:329] WARNING: Script failure [//scripts/callbacks/interface/interface.lua][cannot open //scripts/callbacks/interface/interface.lua: No such file or directory]
Mai 13 17:25:05 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:25:05 [LuaEngine.cpp:329] WARNING: Script failure [//scripts/callbacks/interface/interface.lua][cannot open //scripts/callbacks/interface/interface.lua: No such file or directory]
Mai 13 17:25:05 ns.intraclima.pg ntopng[25963]: [LuaEngine.cpp:329] WARNING: Script failure [//scripts/callbacks/interface/network.lua][cannot open //scripts/callbacks/interface/network.lua: No such file or directory]
Mai 13 17:25:05 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:25:05 [LuaEngine.cpp:329] WARNING: Script failure [//scripts/callbacks/interface/network.lua][cannot open //scripts/callbacks/interface/network.lua: No such file or directory]
Mai 13 17:25:05 ns.intraclima.pg ntopng[25963]: [LuaEngine.cpp:329] WARNING: Script failure [//scripts/callbacks/interface/host.lua][cannot open //scripts/callbacks/interface/host.lua: No such file or directory]
Mai 13 17:25:05 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:25:05 [LuaEngine.cpp:329] WARNING: Script failure [//scripts/callbacks/interface/host.lua][cannot open //scripts/callbacks/interface/host.lua: No such file or directory]
Mai 13 17:25:07 ns.intraclima.pg ntopng[25963]: [LuaEngine.cpp:329] WARNING: Script failure [//scripts/callbacks/system/snmp_device.lua][cannot open //scripts/callbacks/system/snmp_device.lua: No such file or directory]
Mai 13 17:25:07 ns.intraclima.pg ntopng[25963]: 13/May/2021 17:25:07 [LuaEngine.cpp:329] WARNING: Script failure [//scripts/callbacks/system/snmp_device.lua][cannot open //scripts/callbacks/system/snmp_device.lua: No such file or directory]

Did you already try to reset the configuration as described here?
It should clear the redis db too.

Thanks for trying to help Markus,
I tried reseting the configuration as described in the link you posted.
But it still not working and keep showing the same error.

Can you describe the process step by step?

Maybe unrelated, but there was a bug (at least on arm and BSD builds):

First I followed the steps described in the link below:

Using MaxMind geolocation in ntopng

After executing geoipupdate command, I could not access ntopng in the browser with the ERR_TOO_MANY_REDIRECTS message.

And the messages log shows the script failure I have posted

When I was searching for solutions I tried --community parameter described in the link you send, but no success.
Tried several times uninstall and reinstal ntopng, also using “yum remove pfring” command (I saw it in other ntopng post here in the forum)

update…
Now I tried running directly in terminal
ntopng command
and it works
the error just apears when I use service ntopng start

After restart redis-server and running the command
ntopng --community
in the terminal
I could open the ntopng in the browser normally, but when I try to run it as service ntopng start
the problem occours.
How can I “debug” the problem to discover why it happens using the service?
Really appreciate your help

other status update… When I’m using by command line it only works in http protocol using the 3000 port
when trying to use the cockpit link “open bandwidth monitor app” that points to port 980 and uses https, it does not work ( Forbidden - You don’t have permission to access /lua/discover.lua on this server.)

Haven’t tried but if the problem is due to the linked bug (although it relates to plugins), then you can try to solve it by replacing a file with a newer one (or copying over the newer file content):

  1. Locating scripts/lua/modules/plugins_utils.lua
  2. Taking note of ownsership and permissions of that file.
  3. Making a copy (copy/rename) of that file.
  4. Downloading a newer (and supposedly fixed) version of that file into the same place as the original was.
  5. Checking / fixing file ownership and permissions.
  6. Restarting the related redis/ntopng service.

Tried replacing the .lua file, but after that some other errors started to appear (also about script files).
I will keep using it without “service mode” for now, but I will keep trying to find a solution, if I find it I will post it here.
Thanks for the help guys!

hi,
i have same pb as you, do you finding solution ?
how can you still using for save log without service mode ?