Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting an interface in ntopng.conf breaks dashboard #1268

Closed
dkmonaghan opened this issue May 26, 2017 · 10 comments

Comments

Projects
None yet
3 participants
@dkmonaghan
Copy link

commented May 26, 2017

Hey there,

I'm using ntopng 2.5.170427 - Pro Small Business Edition. If I define an interface in ntopng.conf, the dashboard loses functionality. The 'Top Local Talkers' ceases to work:

image

My current startup line is as follows:
ntopng --pid "/var/run/ntopng.pid" --dns-mode "1" --disable-alerts "" --disable-login "1" --http-port ":3000" --interface "eth1"

Where eth0 is the interface I am accessing the web interface (via nginx proxy), and eth1 is the monitoring port.

Removing --interface "eth1" resolves the issue, and 'Top Local Talkers' works as expected. I wish to use --interface as it results in almost a third of the CPU usage compared to not having it.

If you require any more information, please let me know. Thanks.

@emanuele-f

This comment has been minimized.

Copy link
Contributor

commented May 26, 2017

Hi, according to the configuration above, your ntopng.conf should be like this:

---pid=/var/run/ntopng.pid
--dns-mode=1
--disable-login=1
--disable-alerts
--http-port=3000
--interface=eth1
@dkmonaghan

This comment has been minimized.

Copy link
Author

commented May 26, 2017

Hi @emanuele-f ,

My ntopng.conf currently looks like this:

-G=/var/run/ntopng.pid
-n=1
-H
-l=1
-w=:3000
-i=eth1

For clarification, my question wasn't regarding how to configure ntopng, but rather that the 'Top Local Talkers' does not function when I specify -i in ntopng.conf.

Many thanks.

@emanuele-f

This comment has been minimized.

Copy link
Contributor

commented May 26, 2017

Can you post the full ntopng log from startup? If you open the browser inspector, can you see any javascript errors?

@dkmonaghan

This comment has been minimized.

Copy link
Author

commented May 26, 2017

The browser console reports no javascript errors.

Is this the log you're looking for?

26/May/2017 14:35:36 [Prefs.cpp:886] All HTTP user login disabled
26/May/2017 14:35:36 [Ntop.cpp:1314] Setting local networks to 127.0.0.0/8
26/May/2017 14:35:36 [Redis.cpp:109] Successfully connected to redis 127.0.0.1:6379@0
26/May/2017 14:35:36 [NtopPro.cpp:143] [LICENSE] Read license from Redis [xxxxx]
26/May/2017 14:35:36 [NetworkInterface.cpp:218] Executing ethtool -K eth1 gro off gso off tso off
26/May/2017 14:35:36 [PF_RINGInterface.cpp:53] Reading packets from PF_RING v.6.7.0 interface eth1...
26/May/2017 14:35:36 [Ntop.cpp:1419] Registered interface eth1 [id: 3]
26/May/2017 14:35:36 [main.cpp:250] PID stored in file /var/run/ntopng.pid
26/May/2017 14:35:36 [HTTPserver.cpp:723] Please read https://github.com/ntop/ntopng/blob/dev/doc/README.SSL if you want to enable SSL.
26/May/2017 14:35:36 [Utils.cpp:368] User changed to nobody
26/May/2017 14:35:36 [HTTPserver.cpp:769] Web server dirs [/usr/share/ntopng/httpdocs][/usr/share/ntopng/scripts]
26/May/2017 14:35:36 [HTTPserver.cpp:772] HTTP server listening on port(s) 127.0.0.1:3000
26/May/2017 14:35:36 [main.cpp:311] Working directory: /var/tmp/ntopng
26/May/2017 14:35:36 [main.cpp:313] Scripts/HTML pages directory: /usr/share/ntopng
26/May/2017 14:35:36 [Ntop.cpp:292] Welcome to ntopng x86_64 v.2.5.170427 - (C) 1998-17 ntop.org
26/May/2017 14:35:36 [Ntop.cpp:297] Built on Debian GNU/Linux 8.2 (jessie)
26/May/2017 14:35:36 [PeriodicActivities.cpp:56] Started periodic activities loop...
26/May/2017 14:35:36 [NtopPro.cpp:272] [LICENSE] ntopng systemId: xxxxxx
26/May/2017 14:35:36 [NtopPro.cpp:283] [LICENSE] ntopng license: xxxxxx
26/May/2017 14:35:36 [NtopPro.cpp:304] [LICENSE] Maintenance is available until Fri Apr 27 13:42:49 2018 [335 days left]
26/May/2017 14:35:36 [Ntop.cpp:592] Adding fe80::4cf7:41ff:fe4f:a4ef/128 as IPv6 interface address for eth1
26/May/2017 14:35:36 [Ntop.cpp:601] Adding fe80::4cf7:41ff:fe4f:a4ef/64 as IPv6 local network for eth1
26/May/2017 14:35:36 [Ntop.cpp:612] Local Interface Addresses (System Host)
26/May/2017 14:35:36 [AddressTree.cpp:171] [AddressTree] fe80::4cf7:41ff:fe4f:a4ef/128
26/May/2017 14:35:36 [Ntop.cpp:614] Local Networks
26/May/2017 14:35:36 [AddressTree.cpp:171] [AddressTree] 127.0.0.0/8
26/May/2017 14:35:36 [AddressTree.cpp:171] [AddressTree] fe80::4cf7:41ff:fe4f:a4ef/64
26/May/2017 14:35:36 [NetworkInterface.cpp:1980] Started packet polling on interface eth1 [id: 3]...
26/May/2017 14:35:38 [NetworkInterface.cpp:1611] Invalid packet received [len: 2760][max-len: 1518].
26/May/2017 14:35:38 [NetworkInterface.cpp:1612] WARNING: If you have TSO/GRO enabled, please disable it
26/May/2017 14:35:38 [NetworkInterface.cpp:1614] WARNING: Use sudo ethtool -K eth1 gro off gso off tso off
@dkmonaghan

This comment has been minimized.

Copy link
Author

commented May 26, 2017

After a few minutes, the Javascript console has reported the following:

image

@dkmonaghan

This comment has been minimized.

Copy link
Author

commented May 26, 2017

My nginx error log reports the following:

2017/05/26 14:35:34 [error] 627#0: *76292 connect() failed (111: Connection refused) while connecting to upstream, client: 10.6.1.80, server: _, request: "GET /lua/network_load.lua HTTP/1.1", upstream: "http://127.0.0.1:3000/lua/network_load.lua", host: "netflow.dan-uni", referrer: "https://netflow.dan-uni/lua/runtime.lua"
@emanuele-f

This comment has been minimized.

Copy link
Contributor

commented May 26, 2017

For the original issue, it seems like you miss the local networks flag -m. When you used the eth0 interface before, ntopng was able to figure it out itself, but now it can't. So, please add them -m flag with a network cidr, e.g -m="192.168.1.0/24,192.168.2.0/24"

@dkmonaghan

This comment has been minimized.

Copy link
Author

commented May 26, 2017

That makes sense! Adding in -m has resolved the original issue. Many thanks for your help.

@emanuele-f

This comment has been minimized.

Copy link
Contributor

commented May 26, 2017

Ok, that's good. For the other issue, the 403 error should only appear if you restarted ntopng while the browser page was still open, and this is normal. Is this the case?

@dkmonaghan

This comment has been minimized.

Copy link
Author

commented May 26, 2017

Ah, of course! I have not seen a 403 error in my logs since and the timestamps match up with when I restarted ntopng to get the log files for you.

This issue is now resolved, many thanks for your help.

@dkmonaghan dkmonaghan closed this May 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.