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

ERROR: Unable to start HTTP server #2

Closed
atin001 opened this issue May 4, 2015 · 19 comments
Closed

ERROR: Unable to start HTTP server #2

atin001 opened this issue May 4, 2015 · 19 comments
Assignees
Labels
Milestone

Comments

@atin001
Copy link

atin001 commented May 4, 2015

I have installed ntopng and redis server successfully on one of my VMs

  • OS Version: 2.6.39-400.109.6.el6uek.x86_64
  • Installed by compiling from source checked out from svn

Not able to start ntopng. The error that I am facing is as follows

[root@ucf2b-docs-psr0427-ms1 bin]# ./ntopng
30/Apr/2015 10:48:53 [Ntop.cpp:779] Setting local networks to 192.168.0.0/16,172.16.0.0/12,10.0.0.0/8,127.0.0.0/8,0.0.0.0/32,224.0.0.0/8,239.0.0.0/8,255.255.255.255/32,127.0.0.0/8
30/Apr/2015 10:48:53 [Redis.cpp:93] Successfully connected to Redis 127.0.0.1:6379@0
30/Apr/2015 10:48:54 [main.cpp:201] ERROR: Startup error: missing super-user privileges ? (I am already running as su!)

[root@ucf2b-docs-psr0427-ms1 bin]# ./ntopng -i eth0
30/Apr/2015 10:48:57 [Ntop.cpp:779] Setting local networks to 192.168.0.0/16,172.16.0.0/12,10.0.0.0/8,127.0.0.0/8,0.0.0.0/32,224.0.0.0/8,239.0.0.0/8,255.255.255.255/32,127.0.0.0/8
30/Apr/2015 10:48:57 [Redis.cpp:93] Successfully connected to Redis 127.0.0.1:6379@0
30/Apr/2015 10:48:57 [PcapInterface.cpp:81] Reading packets from interface eth0...
30/Apr/2015 10:48:57 [Ntop.cpp:1027] Registered interface view eth0 [id: 0]
30/Apr/2015 10:48:57 [Ntop.cpp:997] Registered interface eth0 [id: 0]
30/Apr/2015 10:48:57 [Utils.cpp:277] User changed to nobody
30/Apr/2015 10:48:57 [main.cpp:227] PID stored in file /var/tmp/ntopng.pid
30/Apr/2015 10:48:57 [HTTPserver.cpp:449] HTTPS Disabled: missing SSL certificate /usr/local/share/ntopng/httpdocs/ssl/ntopng-cert.pem
30/Apr/2015 10:48:57 [HTTPserver.cpp:451] Please read https://svn.ntop.org/svn/ntop/trunk/ntopng/README.SSL if you want to enable SSL.
30/Apr/2015 10:48:57 [HTTPserver.cpp:486] ERROR: Unable to start HTTP server (IPv4) on ports 3000 (no su error now!)

Confirmed that 3000 port is not in use
[root@ucf2b-docs-psr0427-ms1 bin]# netstat -nap|grep 3000
[root@ucf2b-docs-psr0427-ms1 bin]#

Tried to start it on a different port just in case
[root@ucf2b-docs-psr0427-ms1 bin]# ./ntopng -i eth0 -w 25436
30/Apr/2015 10:58:15 [Ntop.cpp:779] Setting local networks to 192.168.0.0/16,172.16.0.0/12,10.0.0.0/8,127.0.0.0/8,0.0.0.0/32,224.0.0.0/8,239.0.0.0/8,255.255.255.255/32,127.0.0.0/8
30/Apr/2015 10:58:15 [Redis.cpp:93] Successfully connected to Redis 127.0.0.1:6379@0
30/Apr/2015 10:58:15 [PcapInterface.cpp:81] Reading packets from interface eth0...
30/Apr/2015 10:58:15 [Ntop.cpp:1027] Registered interface view eth0 [id: 0]
30/Apr/2015 10:58:15 [Ntop.cpp:997] Registered interface eth0 [id: 0]
30/Apr/2015 10:58:15 [Utils.cpp:277] User changed to nobody
30/Apr/2015 10:58:15 [main.cpp:227] PID stored in file /var/tmp/ntopng.pid
30/Apr/2015 10:58:15 [HTTPserver.cpp:449] HTTPS Disabled: missing SSL certificate /usr/local/share/ntopng/httpdocs/ssl/ntopng-cert.pem
30/Apr/2015 10:58:15 [HTTPserver.cpp:451] Please read https://svn.ntop.org/svn/ntop/trunk/ntopng/README.SSL if you want to enable SSL.
30/Apr/2015 10:58:15 [HTTPserver.cpp:486] ERROR: Unable to start HTTP server (IPv4) on ports 25436

Enabled SSL and tried to start it
[root@ucf2b-docs-psr0427-ms1 bin]# ./ntopng -i eth0 -w 25436 -s
30/Apr/2015 10:58:19 [Ntop.cpp:779] Setting local networks to 192.168.0.0/16,172.16.0.0/12,10.0.0.0/8,127.0.0.0/8,0.0.0.0/32,224.0.0.0/8,239.0.0.0/8,255.255.255.255/32,127.0.0.0/8
30/Apr/2015 10:58:19 [Redis.cpp:93] Successfully connected to Redis 127.0.0.1:6379@0
30/Apr/2015 10:58:19 [PcapInterface.cpp:81] Reading packets from interface eth0...
30/Apr/2015 10:58:19 [Ntop.cpp:1027] Registered interface view eth0 [id: 0]
30/Apr/2015 10:58:19 [Ntop.cpp:997] Registered interface eth0 [id: 0]
30/Apr/2015 10:58:19 [main.cpp:227] PID stored in file /var/tmp/ntopng.pid
30/Apr/2015 10:58:19 [HTTPserver.cpp:486] ERROR: Unable to start HTTP server (IPv4) on ports 25436,3001s

Checked /var/log/messages and /var/tmp/ntopng to see if there are any logs but couldn’t find anything relevant.

@atin001
Copy link
Author

atin001 commented May 4, 2015

Additional Info: This issue happens only on a VM. Ntopng starts fine on physical box.

@ariava
Copy link
Contributor

ariava commented May 4, 2015

Hi,

thanks for the report. Could you provide some more details about the VM setup? E.g. network configuration.

Thanks,
Arianna

@ariava ariava self-assigned this May 4, 2015
@atin001
Copy link
Author

atin001 commented May 4, 2015

Hi Arianna
Here is the ifconfig output

[paasusr@ucf2b-docs-psr0427-ms1 ~]$ ifconfig
eth0 Link encap:Ethernet HWaddr C6:B0:3D:21:E4:CA
inet addr:10.241.239.42 Bcast:10.241.239.43 Mask:255.255.255.252
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:43530133 errors:0 dropped:4 overruns:0 frame:0
TX packets:41398108 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:42226439124 (39.3 GiB) TX bytes:41512543431 (38.6 GiB)
Interrupt:80

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1892 errors:0 dropped:0 overruns:0 frame:0
TX packets:1892 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:161086 (157.3 KiB) TX bytes:161086 (157.3 KiB)

Please let me know what other info is reqd. OS version is mentioned in the bug.
Thanks
Atin

@lucaderi lucaderi added this to the ntopng 2.0 milestone May 4, 2015
@lucaderi lucaderi added the Bug label May 4, 2015
@ariava
Copy link
Contributor

ariava commented May 5, 2015

@chris4269 you seem to be starting ntopng as a non-privileged user. Have you tried starting it as superuser (e.g. sudo ./ntopng)?

@lucaderi
Copy link
Member

lucaderi commented May 5, 2015

Any chance to provide SSH access to your box to debug the issue locally?

@lucaderi
Copy link
Member

lucaderi commented May 5, 2015

What Linux distribution are you using exactly ? Please use the GIT code as we have made fixes in the past days (you said you are using the SVN code)

@lucaderi
Copy link
Member

lucaderi commented May 5, 2015

We cannot support you if you use an old code version. Please update to github and try again

@lucaderi lucaderi closed this as completed May 5, 2015
@ariava
Copy link
Contributor

ariava commented May 5, 2015

@chris4269 ntopng 1.2.1 is a really old version. Could you please clone this repo and try it? Or just grab some nightly build from the repo.

@atin001
Copy link
Author

atin001 commented May 5, 2015

Question: The issue @chris4269 is facing seems to be different from what I have reported. In my case I ran ntopng as root and specifying the interface did not help. The error message is different also. Perhaps it needs to be tracked as a new bug?

The version I used was
[root@ucf2b-docs-psr0427-ms1 paasusr]# /usr/local/bin/ntopng --version
v.1.99.150430 (r9332)

@ariava
Copy link
Contributor

ariava commented May 5, 2015

@atin001 Probably you should, but still, from the log you reported it seems you are not using the very latest code. Could you please try with the latest github code and, if you still see the error, file a new issue? Thanks.

@lucaderi
Copy link
Member

lucaderi commented May 5, 2015

Like I have said we cannot support you unless you give access to your box where we can reproduce the bug.

@ariava
Copy link
Contributor

ariava commented May 7, 2015

@chris4269, please do try to install the latest ntopng. It is version 1.99 and you can download it from this very same repo. Version 1.2.1 is very old.

@alenauta
Copy link

alenauta commented May 7, 2015

@chris4269 you can git clone version 1.99 from https://github.com/ntop/ntopng.git

@ariava
Copy link
Contributor

ariava commented May 7, 2015

@chris4269, use git (available for all Linux distributions as a package) and do
git clone https://github.com/ntop/ntopng.git

@lucaderi
Copy link
Member

lucaderi commented May 8, 2015

@alenauta
Copy link

alenauta commented May 8, 2015

@chris4269 after you have installed all dependencies, prior to do ./configure, you have to git clone https://github.com/ntop/nDPI.git and compile it.

@chris4269
Copy link

ERROR: Unable to start HTTP server (IPv4) on ports 3000

sudo ./ntopng
08/May/2015 10:27:08 [src/Ntop.cpp:779] Setting local networks to 192.168.0.0/16,172.16.0.0/12,10.0.0.0/8,127.0.0.0/8,0.0.0.0/32,224.0.0.0/8,239.0.0.0/8,255.255.255.255/32,127.0.0.0/8
08/May/2015 10:27:08 [src/Redis.cpp:93] Successfully connected to Redis 127.0.0.1:6379@0
08/May/2015 10:27:08 [src/PcapInterface.cpp:81] Reading packets from interface eth0...
08/May/2015 10:27:08 [src/Ntop.cpp:1027] Registered interface view eth0 [id: 0]
08/May/2015 10:27:08 [src/Ntop.cpp:997] Registered interface eth0 [id: 0]
08/May/2015 10:27:09 [src/PcapInterface.cpp:81] Reading packets from interface lo...
08/May/2015 10:27:09 [src/Ntop.cpp:1027] Registered interface view lo [id: 1]
08/May/2015 10:27:09 [src/Ntop.cpp:997] Registered interface lo [id: 1]
08/May/2015 10:27:09 [src/Utils.cpp:277] User changed to nobody
08/May/2015 10:27:09 [src/main.cpp:227] PID stored in file /var/tmp/ntopng.pid
08/May/2015 10:27:09 [src/HTTPserver.cpp:449] HTTPS Disabled: missing SSL certificate /tmp/ntopng/httpdocs/ssl/ntopng-cert.pem
08/May/2015 10:27:09 [src/HTTPserver.cpp:451] Please read https://svn.ntop.org/svn/ntop/trunk/ntopng/README.SSL if you want to enable SSL.
08/May/2015 10:27:09 [src/HTTPserver.cpp:486] ERROR: Unable to start HTTP server (IPv4) on ports 3000
pi@raspberrypi /tmp/ntopng $ sudo ./ntopng -w 666
08/May/2015 10:27:15 [src/Ntop.cpp:779] Setting local networks to 192.168.0.0/16,172.16.0.0/12,10.0.0.0/8,127.0.0.0/8,0.0.0.0/32,224.0.0.0/8,239.0.0.0/8,255.255.255.255/32,127.0.0.0/8
08/May/2015 10:27:15 [src/Redis.cpp:93] Successfully connected to Redis 127.0.0.1:6379@0
08/May/2015 10:27:15 [src/PcapInterface.cpp:81] Reading packets from interface eth0...
08/May/2015 10:27:15 [src/Ntop.cpp:1027] Registered interface view eth0 [id: 0]
08/May/2015 10:27:15 [src/Ntop.cpp:997] Registered interface eth0 [id: 0]
08/May/2015 10:27:16 [src/PcapInterface.cpp:81] Reading packets from interface lo...
08/May/2015 10:27:16 [src/Ntop.cpp:1027] Registered interface view lo [id: 1]
08/May/2015 10:27:16 [src/Ntop.cpp:997] Registered interface lo [id: 1]
08/May/2015 10:27:16 [src/Utils.cpp:277] User changed to nobody
08/May/2015 10:27:16 [src/main.cpp:227] PID stored in file /var/tmp/ntopng.pid
08/May/2015 10:27:16 [src/HTTPserver.cpp:449] HTTPS Disabled: missing SSL certificate /tmp/ntopng/httpdocs/ssl/ntopng-cert.pem
08/May/2015 10:27:16 [src/HTTPserver.cpp:451] Please read https://svn.ntop.org/svn/ntop/trunk/ntopng/README.SSL if you want to enable SSL.
08/May/2015 10:27:16 [src/HTTPserver.cpp:486] ERROR: Unable to start HTTP server (IPv4) on ports 666
pi@raspberrypi /tmp/ntopng $

@chris4269
Copy link

i'ts ok

I just discovered Raspbian (August image) has no IPv6 enabled by default.

To solve this, I used "sudo nano /etc/modules", added "ipv6" at the end, and rebooted.

@ariava
Copy link
Contributor

ariava commented May 9, 2015

@chris4269 commit b72bba5 should add a workaround which should allow you to now use ntopng even with IPv6 disabled

lucaderi pushed a commit that referenced this issue Apr 2, 2019
Add local networks alias configuration
simonemainardi added a commit that referenced this issue Oct 31, 2019
Fixes

Thread 15 "TrPoolWorker" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffc9df4700 (LWP 314)]
0x000000000047e743 in Mac::incnDPIStats (this=0x7fff7a30a080, when=1572439200, ndpi_category=NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, sent_packets=0, sent_bytes=0, sent_goodput_bytes=0, rcvd_packets=1,
    rcvd_bytes=60, rcvd_goodput_bytes=2) at /home/deri/ntopng/include/Mac.h:140
    140         stats->incnDPIStats(when, ndpi_category, sent_packets, sent_bytes, sent_goodput_bytes,
    (gdb) bt
    #0  0x000000000047e743 in Mac::incnDPIStats (this=0x7fff7a30a080, when=1572439200, ndpi_category=NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, sent_packets=0, sent_bytes=0, sent_goodput_bytes=0, rcvd_packets=1, rcvd_bytes=60, rcvd_goodput_bytes=2)
        at /home/deri/ntopng/include/Mac.h:140
	#1  0x00000000004715b0 in Flow::periodic_stats_update (this=0x7ffee7685d50, user_data=0x7fffc9df3880, quick=true) at src/Flow.cpp:1154
	#2  0x000000000048a175 in host_flow_update_stats (node=0x7ffee7685d50, user_data=0x7fffc9df3880, matched=0x7fffc9df37db) at src/NetworkInterface.cpp:2647
	#3  0x00000000004596f4 in GenericHash::walk (this=0x4ab5ee0, begin_slot=0x7fffc9df387c, walk_all=true, walker=0x48a119 <host_flow_update_stats(GenericHashEntry*, void*, bool*)>, user_data=0x7fffc9df3880) at src/GenericHash.cpp:192
	#4  0x000000000048365c in NetworkInterface::walker (this=0x113a570, begin_slot=0x7fffc9df387c, walk_all=true, wtype=walker_flows, walker=0x48a119 <host_flow_update_stats(GenericHashEntry*, void*, bool*)>, user_data=0x7fffc9df3880) at src/NetworkInterface.cpp:859
	#5  0x000000000048a4e2 in NetworkInterface::periodicStatsUpdate (this=0x113a570) at src/NetworkInterface.cpp:2739
	#6  0x00000000004cb574 in ntop_periodic_stats_update (vm=0x7fff91cf4e48) at src/LuaEngine.cpp:5891
	#7  0x0000000000589a04 in luaD_precall ()
	#8  0x0000000000595025 in luaV_execute ()
	#9  0x0000000000589ccf in luaD_call ()
	#10 0x0000000000589d21 in luaD_callnoyield ()
	#11 0x000000000058913f in luaD_rawrunprotected ()
	#12 0x000000000058a03d in luaD_pcall ()
	#13 0x000000000058746f in lua_pcallk ()
	#14 0x000000000053f280 in LuaHandler::luaL_dofileM (this=0x7fff90d5bb00, execute=true) at pro/LuaHandler.cpp:32
	#15 0x00000000004d866f in __ntop_lua_handlefile (L=0x7fff91cf4e48, script_path=0x7fff8c0008e0 "/home/deri/ntopng/scripts/callbacks/interface/stats_update.lua", ex=true) at src/LuaEngine.cpp:10107
	#16 0x00000000004d99ae in LuaEngine::run_script (this=0x7fff9076c530, script_path=0x7fff8c0008e0 "/home/deri/ntopng/scripts/callbacks/interface/stats_update.lua", iface=0x113a570, load_only=false) at src/LuaEngine.cpp:11095
	#17 0x00000000004aa6c5 in ThreadedActivity::runScript (this=0xae03410, script_path=0x7fff8c0008e0 "/home/deri/ntopng/scripts/callbacks/interface/stats_update.lua", iface=0x113a570) at src/ThreadedActivity.cpp:232
	#18 0x00000000004e435c in ThreadPool::run (this=0xacc4620) at src/ThreadPool.cpp:100
	#19 0x00000000004e3f3f in doRun (ptr=0xacc4620) at src/ThreadPool.cpp:31
	#20 0x00007ffff65bd6ba in start_thread (arg=0x7fffc9df4700) at pthread_create.c:333
	#21 0x00007ffff490941d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
	(gdb) f 140
	#0  0x0000000000000000 in ?? ()
	(gdb) f 0
	#0  0x000000000047e743 in Mac::incnDPIStats (this=0x7fff7a30a080, when=1572439200, ndpi_category=NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, sent_packets=0, sent_bytes=0, sent_goodput_bytes=0, rcvd_packets=1, rcvd_bytes=60, rcvd_goodput_bytes=2)
	    at /home/deri/ntopng/include/Mac.h:140
	    140         stats->incnDPIStats(when, ndpi_category, sent_packets, sent_bytes, sent_goodput_bytes,
	    (gdb) p stats
	    $1 = (MacStats *) 0x0
emanuele-f pushed a commit that referenced this issue Feb 17, 2020
Leak trace:

Direct leak of 14 byte(s) in 1 object(s) allocated from:
    #0 0x564eb47ef589 in strdup (/home/emanuele/src/ntopng/ntopng+0x15a589)
    #1 0x564eb4ad5d85 in ZMQParserInterface::parsePENNtopField(ParsedFlow*, unsigned int, ParsedValue*) const /home/emanuele/src/ntopng/src/ZMQParserInterface.cpp:556:25
    #2 0x564eb4adae10 in ZMQParserInterface::parseSingleTLVFlow(ndpi_serializer*, unsigned char) /home/emanuele/src/ntopng/src/ZMQParserInterface.cpp:1237:14
    #3 0x564eb4adbd3e in ZMQParserInterface::parseTLVFlow(char const*, int, unsigned char, void*) /home/emanuele/src/ntopng/src/ZMQParserInterface.cpp:1423:8
    #4 0x564eb4ad06a1 in ZMQCollectorInterface::collect_flows() /home/emanuele/src/ntopng/src/ZMQCollectorInterface.cpp:421:38
    #5 0x564eb4ad105f in packetPollLoop(void*) /home/emanuele/src/ntopng/src/ZMQCollectorInterface.cpp:469:10
    #6 0x7fc0b4a0b46e in start_thread (/usr/lib/libpthread.so.0+0x946e)
j0ji-k pushed a commit to j0ji-k/ntopng that referenced this issue May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants