ntop / nProbe

Open source components and extensions for nProbe
http://ntop.org
GNU General Public License v2.0
1.65k stars 44 forks source link

Script failure: iface_local_stats.lua:24: attempt to index a nil value #157

Closed kylerossd closed 7 years ago

kylerossd commented 7 years ago

Hello,

I am attempting to get my setup working here and I am not having any luck at all. I am not getting any flows displayed in ntopng.

I have 3 nprobe nodes: probe mode - 10.20.0.205

sudo nprobe -i eth1 --collector 10.1.12.150:2055 local-networks 10.20.0.0/16 --flow-version 10 --local-traffic-direction -b 1

probe mode - 10.30.0.205

sudo nprobe -i eth1 --collector 10.1.12.150:2056 local-networks 10.20.0.0/16 --flow-version 10 --local-traffic-direction -b 1

collector mode - 10.1.12.150

kyle@ntop-ng:~$ sudo nprobe --zmq "tcp://:5556" -i none -n none --collector-port 2055 02/Mar/2017 12:14:27 [nprobe.c:3407] Valid nProbe license found 02/Mar/2017 12:14:27 [nprobe.c:4872] WARNING: The output interfaceId is set to 0: did you forget to use -Q perhaps ? 02/Mar/2017 12:14:27 [nprobe.c:4875] WARNING: The input interfaceId is set to 0: did you forget to use -u perhaps ? 02/Mar/2017 12:14:27 [nprobe.c:4975] Welcome to nProbe v.7.4.170215 ($Revision: 5334 $) for x86_64-unknown-linux-gnu with native PF_RING acceleration 02/Mar/2017 12:14:27 [nprobe.c:4985] Running on Ubuntu 14.04.5 LTS 02/Mar/2017 12:14:27 [nprobe.c:4996] [LICENSE] nProbe SystemId: 3BAF2F7776066B13 02/Mar/2017 12:14:27 [nprobe.c:7308] Welcome to nProbe v.7.4.170215 for x86_64-unknown-linux-gnu 02/Mar/2017 12:14:27 [plugin.c:1045] 0 plugin(s) enabled 02/Mar/2017 12:14:27 [nprobe.c:6836] Non IPv4/v6 traffic is discarded according to the template 02/Mar/2017 12:14:27 [util.c:434] GeoIP: loaded AS config file /usr/share/ntopng/httpdocs/geoip/GeoIPASNum.dat 02/Mar/2017 12:14:27 [util.c:445] GeoIP: loaded AS IPv6 config file /usr/share/ntopng/httpdocs/geoip/GeoIPASNumv6.dat 02/Mar/2017 12:14:27 [nprobe.c:5495] Using packet capture length 128 02/Mar/2017 12:14:27 [nprobe.c:7484] IPv6 traffic will NOT be exported/accounted by this probe 02/Mar/2017 12:14:27 [nprobe.c:7485] due to configuration options (e.g. use NetFlow v9) 02/Mar/2017 12:14:32 [nprobe.c:7631] Not capturing packet from interface (collector mode) 02/Mar/2017 12:14:32 [util.c:4036] Initializing ZMQ as server 02/Mar/2017 12:14:32 [util.c:4079] Succesfully created ZMQ endpoint tcp://:5556 02/Mar/2017 12:14:32 [collect.c:147] Flow collector listening on port 2055 (IPv4/v6) 02/Mar/2017 12:14:32 [nprobe.c:7856] nProbe started successfully

ntopng is running on the same node as the collector (10.1.12.150). When I run the following command it starts but I get this error.

kyle@ntop-ng:~$ sudo ntopng -i tcp://127.0.0.1:5556 02/Mar/2017 12:11:45 [Ntop.cpp:1121] Setting local networks to 127.0.0.0/8 02/Mar/2017 12:11:45 [Redis.cpp:92] Successfully connected to redis 127.0.0.1:6379@0 02/Mar/2017 12:11:45 [NtopPro.cpp:120] [LICENSE] Reading license from /etc/ntopng.license 02/Mar/2017 12:11:45 [Ntop.cpp:1267] Registered interface tcp://127.0.0.1:5556 [id: 4] 02/Mar/2017 12:11:45 [Ntop.cpp:1279] Registered interface view tcp://127.0.0.1:5556 [id: 4] 02/Mar/2017 12:11:45 [main.cpp:255] PID stored in file /var/run/ntopng.pid 02/Mar/2017 12:11:45 [Utils.cpp:341] User changed to nobody 02/Mar/2017 12:11:45 [HTTPserver.cpp:501] Please read https://github.com/ntop/ntopng/blob/dev/doc/README.SSL if you want to enable SSL. 02/Mar/2017 12:11:45 [HTTPserver.cpp:544] Web server dirs [/usr/share/ntopng/httpdocs][/usr/share/ntopng/scripts] 02/Mar/2017 12:11:45 [HTTPserver.cpp:547] HTTP server listening on port 3000 02/Mar/2017 12:11:45 [main.cpp:309] Working directory: /var/tmp/ntopng 02/Mar/2017 12:11:45 [main.cpp:311] Scripts/HTML pages directory: /usr/share/ntopng 02/Mar/2017 12:11:45 [Ntop.cpp:271] Welcome to ntopng x86_64 v.2.4.170215 - (C) 1998-2016 ntop.org 02/Mar/2017 12:11:45 [Ntop.cpp:276] Built on Ubuntu 14.04.5 LTS 02/Mar/2017 12:11:45 [PeriodicActivities.cpp:53] Started periodic activities loop... 02/Mar/2017 12:11:45 [RuntimePrefs.cpp:34] Dumping alerts into syslog 02/Mar/2017 12:11:45 [NtopPro.cpp:259] [LICENSE] ntopng systemId: 3BAF2F7776066B13 02/Mar/2017 12:11:45 [NtopPro.cpp:270] [LICENSE] ntopng license: F5D919C6351F065849B3E66D51B1FB361519703268F6DA341E 02/Mar/2017 12:11:45 [NtopPro.cpp:291] [LICENSE] Maintenance is available until Mon Feb 26 22:47:48 2018 [361 days left] 02/Mar/2017 12:11:45 [NetworkInterface.cpp:1538] Started packet polling on interface tcp://127.0.0.1:5556 [id: 4]... 02/Mar/2017 12:11:46 [CollectorInterface.cpp:104] Collecting flows on tcp://127.0.0.1:5556 [ntopng->nprobe] 02/Mar/2017 12:11:47 [Lua.cpp:5134] WARNING: Script failure [/usr/share/ntopng/scripts/lua/iface_local_stats.lua][/usr/share/ntopng/scripts/lua/iface_local_stats.lua:24: attempt to index a nil value] 02/Mar/2017 12:11:50 [Lua.cpp:5134] WARNING: Script failure [/usr/share/ntopng/scripts/lua/iface_local_stats.lua][/usr/share/ntopng/scripts/lua/iface_local_stats.lua:24: attempt to index a nil value] 02/Mar/2017 12:11:53 [Lua.cpp:5134] WARNING: Script failure [/usr/share/ntopng/scripts/lua/iface_local_stats.lua][/usr/share/ntopng/scripts/lua/iface_local_stats.lua:24: attempt to index a nil value] 02/Mar/2017 12:11:56 [Lua.cpp:5134] WARNING: Script failure [/usr/share/ntopng/scripts/lua/iface_local_stats.lua][/usr/share/ntopng/scripts/lua/iface_local_stats.lua:24: attempt to index a nil value] 02/Mar/2017 12:11:59 [Lua.cpp:5134] WARNING: Script failure [/usr/share/ntopng/scripts/lua/iface_local_stats.lua][/usr/share/ntopng/scripts/lua/iface_local_stats.lua:24: attempt to index a nil value] 02/Mar/2017 12:12:02 [Lua.cpp:5134] WARNING: Script failure [/usr/share/ntopng/scripts/lua/iface_local_stats.lua][/usr/share/ntopng/scripts/lua/iface_local_stats.lua:24: attempt to index a nil value] 02/Mar/2017 12:12:05 [Lua.cpp:5134] WARNING: Script failure [/usr/share/ntopng/scripts/lua/iface_local_stats.lua][/usr/share/ntopng/scripts/lua/iface_local_stats.lua:24: attempt to index a nil value] 02/Mar/2017 12:12:08 [Lua.cpp:5134] WARNING: Script failure [/usr/share/ntopng/scripts/lua/iface_local_stats.lua][/usr/share/ntopng/scripts/lua/iface_local_stats.lua:24: attempt to index a nil value]

Is this a configuration error or

simonemainardi commented 7 years ago

your nprobe configuration for the zmq endpoint is wrong:

... nprobe --zmq "tcp://:5556 ..." 

either use * or an IP address, e.g.:

nprobe --zmq "tcp://*:5556"