Closed drew1kun closed 9 years ago
So as I said before, I've uccessfully installed ntopng from homebrew. Started redis server and started ntopng: $ sudo ntopng. When going to localhost:3000 in browser, getting this:
Hey man! I have the same issue now after restarting the machine and nothing really helps. This formula works so weird! I've tried again to halt everything (redis agent and ntopng) and starting all manually:
redis:
$ redis-server /usr/local/etc/redis.conf
4924:M 13 Jul 12:07:47.054 * Increased maximum number of open files to 10032 (it was originally set to 2560).
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.0.2 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 4924
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
4924:M 13 Jul 12:07:47.056 # Server started, Redis version 3.0.2
4924:M 13 Jul 12:07:47.061 * DB loaded from disk: 0.006 seconds
4924:M 13 Jul 12:07:47.061 * The server is now ready to accept connections on port 6379
4924:M 13 Jul 12:12:48.100 * 10 changes in 300 seconds. Saving...
4924:M 13 Jul 12:12:48.101 * Background saving started by pid 5101
5101:C 13 Jul 12:12:48.204 * DB saved on disk
4924:M 13 Jul 12:12:48.205 * Background saving terminated with success
ntopng:
$ sudo ntopng
13/Jul/2015 12:10:05 [src/Ntop.cpp:781] 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
13/Jul/2015 12:10:05 [src/Redis.cpp:93] Successfully connected to redis 127.0.0.1:6379@0
13/Jul/2015 12:10:05 [src/PcapInterface.cpp:81] Reading packets from interface en0...
13/Jul/2015 12:10:05 [src/Ntop.cpp:1029] Registered interface view en0 [id: 0]
13/Jul/2015 12:10:05 [src/Ntop.cpp:999] Registered interface en0 [id: 0]
13/Jul/2015 12:10:05 [src/PcapInterface.cpp:81] Reading packets from interface fw0...
13/Jul/2015 12:10:05 [src/Ntop.cpp:1029] Registered interface view fw0 [id: 1]
13/Jul/2015 12:10:05 [src/Ntop.cpp:999] Registered interface fw0 [id: 1]
13/Jul/2015 12:10:05 [src/PcapInterface.cpp:81] Reading packets from interface awdl0...
13/Jul/2015 12:10:05 [src/Ntop.cpp:1029] Registered interface view awdl0 [id: 2]
13/Jul/2015 12:10:05 [src/Ntop.cpp:999] Registered interface awdl0 [id: 2]
13/Jul/2015 12:10:05 [src/PcapInterface.cpp:81] Reading packets from interface bridge0...
13/Jul/2015 12:10:05 [src/Ntop.cpp:1029] Registered interface view bridge0 [id: 3]
13/Jul/2015 12:10:05 [src/Ntop.cpp:999] Registered interface bridge0 [id: 3]
13/Jul/2015 12:10:05 [src/PcapInterface.cpp:81] Reading packets from interface utun0...
13/Jul/2015 12:10:05 [src/Ntop.cpp:1029] Registered interface view utun0 [id: 4]
13/Jul/2015 12:10:05 [src/Ntop.cpp:999] Registered interface utun0 [id: 4]
13/Jul/2015 12:10:05 [src/PcapInterface.cpp:81] Reading packets from interface en1...
13/Jul/2015 12:10:05 [src/Ntop.cpp:1029] Registered interface view en1 [id: 5]
13/Jul/2015 12:10:05 [src/Ntop.cpp:999] Registered interface en1 [id: 5]
13/Jul/2015 12:10:05 [src/PcapInterface.cpp:81] Reading packets from interface en2...
13/Jul/2015 12:10:05 [src/Ntop.cpp:1029] Registered interface view en2 [id: 6]
13/Jul/2015 12:10:05 [src/Ntop.cpp:999] Registered interface en2 [id: 6]
13/Jul/2015 12:10:05 [src/PcapInterface.cpp:81] Reading packets from interface p2p0...
13/Jul/2015 12:10:05 [src/Ntop.cpp:1029] Registered interface view p2p0 [id: 7]
13/Jul/2015 12:10:05 [src/Ntop.cpp:999] Registered interface p2p0 [id: 7]
13/Jul/2015 12:10:05 [src/PcapInterface.cpp:81] Reading packets from interface en3...
13/Jul/2015 12:10:05 [src/Ntop.cpp:1029] Registered interface view en3 [id: 8]
13/Jul/2015 12:10:05 [src/Ntop.cpp:999] Registered interface en3 [id: 8]
13/Jul/2015 12:10:05 [src/PcapInterface.cpp:81] Reading packets from interface en4...
13/Jul/2015 12:10:05 [src/Ntop.cpp:1029] Registered interface view en4 [id: 9]
13/Jul/2015 12:10:05 [src/Ntop.cpp:999] Registered interface en4 [id: 9]
13/Jul/2015 12:10:05 [src/PcapInterface.cpp:81] Reading packets from interface en5...
13/Jul/2015 12:10:05 [src/Ntop.cpp:1029] Registered interface view en5 [id: 10]
13/Jul/2015 12:10:05 [src/Ntop.cpp:999] Registered interface en5 [id: 10]
13/Jul/2015 12:10:05 [src/PcapInterface.cpp:81] Reading packets from interface en6...
13/Jul/2015 12:10:05 [src/Ntop.cpp:1029] Registered interface view en6 [id: 11]
13/Jul/2015 12:10:05 [src/Ntop.cpp:999] Registered interface en6 [id: 11]
13/Jul/2015 12:10:05 [src/PcapInterface.cpp:81] Reading packets from interface en7...
13/Jul/2015 12:10:05 [src/Ntop.cpp:1029] Registered interface view en7 [id: 12]
13/Jul/2015 12:10:05 [src/Ntop.cpp:999] Registered interface en7 [id: 12]
13/Jul/2015 12:10:05 [src/PcapInterface.cpp:81] Reading packets from interface en8...
13/Jul/2015 12:10:05 [src/Ntop.cpp:1029] Registered interface view en8 [id: 13]
13/Jul/2015 12:10:05 [src/Ntop.cpp:999] Registered interface en8 [id: 13]
13/Jul/2015 12:10:05 [src/PcapInterface.cpp:81] Reading packets from interface en9...
13/Jul/2015 12:10:05 [src/Ntop.cpp:1029] Registered interface view en9 [id: 14]
13/Jul/2015 12:10:05 [src/Ntop.cpp:999] Registered interface en9 [id: 14]
13/Jul/2015 12:10:05 [src/PcapInterface.cpp:81] Reading packets from interface lo0...
13/Jul/2015 12:10:05 [src/Ntop.cpp:1029] Registered interface view lo0 [id: 15]
13/Jul/2015 12:10:05 [src/Ntop.cpp:999] Registered interface lo0 [id: 15]
13/Jul/2015 12:10:05 [src/Utils.cpp:288] User changed to nobody
13/Jul/2015 12:10:05 [src/main.cpp:235] PID stored in file /var/tmp/ntopng.pid
Error Opening file /usr/local/Cellar/ntopng/2.0/share/ntopng/httpdocs/geoip/GeoIPASNum.dat
13/Jul/2015 12:10:05 [src/Geolocation.cpp:59] WARNING: Unable to read GeoIP database /usr/local/Cellar/ntopng/2.0/share/ntopng/httpdocs/geoip/GeoIPASNum.dat
Error Opening file /usr/local/Cellar/ntopng/2.0/share/ntopng/httpdocs/geoip/GeoIPASNumv6.dat
13/Jul/2015 12:10:05 [src/Geolocation.cpp:59] WARNING: Unable to read GeoIP database /usr/local/Cellar/ntopng/2.0/share/ntopng/httpdocs/geoip/GeoIPASNumv6.dat
Error Opening file /usr/local/Cellar/ntopng/2.0/share/ntopng/httpdocs/geoip/GeoLiteCity.dat
13/Jul/2015 12:10:05 [src/Geolocation.cpp:59] WARNING: Unable to read GeoIP database /usr/local/Cellar/ntopng/2.0/share/ntopng/httpdocs/geoip/GeoLiteCity.dat
Error Opening file /usr/local/Cellar/ntopng/2.0/share/ntopng/httpdocs/geoip/GeoLiteCityv6.dat
13/Jul/2015 12:10:05 [src/Geolocation.cpp:59] WARNING: Unable to read GeoIP database /usr/local/Cellar/ntopng/2.0/share/ntopng/httpdocs/geoip/GeoLiteCityv6.dat
13/Jul/2015 12:10:05 [src/HTTPserver.cpp:449] HTTPS Disabled: missing SSL certificate /usr/local/Cellar/ntopng/2.0/share/ntopng/httpdocs/ssl/ntopng-cert.pem
13/Jul/2015 12:10:05 [src/HTTPserver.cpp:451] Please read https://svn.ntop.org/svn/ntop/trunk/ntopng/README.SSL if you want to enable SSL.
13/Jul/2015 12:10:05 [src/HTTPserver.cpp:492] Web server dirs [/usr/local/Cellar/ntopng/2.0/share/ntopng/httpdocs][/Users/Andryuwka/scripts]
13/Jul/2015 12:10:05 [src/HTTPserver.cpp:495] HTTP server listening on port 3000
13/Jul/2015 12:10:05 [src/main.cpp:286] Working directory: /var/tmp/ntopng
13/Jul/2015 12:10:05 [src/main.cpp:288] Scripts/HTML pages directory: /usr/local/Cellar/ntopng/2.0/share/ntopng
13/Jul/2015 12:10:05 [src/Ntop.cpp:267] Welcome to ntopng x86_64 v.2.0.150601 - (C) 1998-15 ntop.org
13/Jul/2015 12:10:05 [src/PeriodicActivities.cpp:53] Started periodic activities loop...
13/Jul/2015 12:10:05 [src/RuntimePrefs.cpp:32] Dumping alerts into syslog
13/Jul/2015 12:10:05 [src/NetworkInterface.cpp:1193] Started packet polling on interface en0 [id: 0]...
13/Jul/2015 12:10:05 [src/NetworkInterface.cpp:1193] Started packet polling on interface fw0 [id: 1]...
13/Jul/2015 12:10:05 [src/NetworkInterface.cpp:1193] Started packet polling on interface awdl0 [id: 2]...
13/Jul/2015 12:10:05 [src/NetworkInterface.cpp:1193] Started packet polling on interface bridge0 [id: 3]...
13/Jul/2015 12:10:05 [src/NetworkInterface.cpp:1193] Started packet polling on interface utun0 [id: 4]...
13/Jul/2015 12:10:05 [src/NetworkInterface.cpp:1193] Started packet polling on interface en1 [id: 5]...
13/Jul/2015 12:10:05 [src/NetworkInterface.cpp:1193] Started packet polling on interface en2 [id: 6]...
13/Jul/2015 12:10:05 [src/NetworkInterface.cpp:1193] Started packet polling on interface p2p0 [id: 7]...
13/Jul/2015 12:10:05 [src/NetworkInterface.cpp:1193] Started packet polling on interface en3 [id: 8]...
13/Jul/2015 12:10:05 [src/NetworkInterface.cpp:1193] Started packet polling on interface en4 [id: 9]...
13/Jul/2015 12:10:05 [src/NetworkInterface.cpp:1193] Started packet polling on interface en5 [id: 10]...
13/Jul/2015 12:10:05 [src/NetworkInterface.cpp:1193] Started packet polling on interface en6 [id: 11]...
13/Jul/2015 12:10:05 [src/NetworkInterface.cpp:1193] Started packet polling on interface en7 [id: 12]...
13/Jul/2015 12:10:05 [src/NetworkInterface.cpp:1193] Started packet polling on interface en8 [id: 13]...
13/Jul/2015 12:10:05 [src/NetworkInterface.cpp:1193] Started packet polling on interface en9 [id: 14]...
13/Jul/2015 12:10:05 [src/NetworkInterface.cpp:1193] Started packet polling on interface lo0 [id: 15]...
And one thing more -- ntopng
doesn't work without sudo
... I've tried even brew reinstall ntopng
$ ntopng
13/Jul/2015 12:29:02 [src/Ntop.cpp:781] 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
13/Jul/2015 12:29:02 [src/Redis.cpp:93] Successfully connected to redis 127.0.0.1:6379@0
13/Jul/2015 12:29:02 [src/main.cpp:209] ERROR: Startup error: missing super-user privileges ?
Permissions (I have no idea how it should be but this is what they are):
/usr:
drwxr-xr-x@ 15 root wheel 510B Mar 7 12:56 usr/
/usr/local:
drwxrwxr-x 27 root admin 918B Jul 13 00:52 local/
/usr/local/bin:
drwxrwxr-x 593 root admin 20K Jul 13 01:36 bin/
/usr/local/sbin:
drwxr-xr-x 18 Andryuwka admin 612B Jul 10 16:30 sbin/
/usr/local/bin/ntopng
lrwxr-xr-x 1 Andryuwka admin 31B Jul 13 01:36 ntopng@ -> ../Cellar/ntopng/2.0/bin/ntopng
What can it be?
Your /usr/local
should not be root owned. Do this: sudo chown -R $(whoami):admin /usr/local
& sudo chown $(whoami):admin /usr/local
.
The root ownership would explain the errors you're seeing, as well as why you can't launch Homebrew installed executables without sudo
in many cases.
Ok! Thanx! I was guessing but wasn't sure... and I've actually never had cases when homebrew asked me for sudo... except this... and finally after some time (30 minutes) it started - and I did nothing to fix it... What's the freaking mystery???
And now I have this in "About ntopng" tab:
I've also changed the permission recursively like you suggested and even reinstalled the ntopng (and redis) again, but it still says:
$ ntopng
13/Jul/2015 14:21:48 [src/Ntop.cpp:781] 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
13/Jul/2015 14:21:48 [src/Redis.cpp:93] Successfully connected to redis 127.0.0.1:6379@0
13/Jul/2015 14:21:48 [src/main.cpp:209] ERROR: Startup error: missing super-user privileges ?
What's going on?
I really don't know how you're getting these errors. I've tried to reproduce them on my own machines and one clean VM with no luck.
What does ls -lh /usr/local
output?
lol:
$ ls -lh /usr/local
total 120
drwxrwxr-x 27 Andryuwka admin 918B Jul 13 13:53 ./
drwxr-xr-x@ 15 root wheel 510B Mar 7 12:56 ../
-rw-r--r--@ 1 Andryuwka admin 10K Jul 2 10:38 .DS_Store
drwxr-xr-x 16 Andryuwka admin 544B Jul 13 13:59 .git/
-rw-r--r-- 1 Andryuwka admin 301B Jul 13 13:53 .gitignore
-rw-r--r-- 1 Andryuwka admin 261B Dec 25 2014 .yardopts
-rw-r--r-- 1 Andryuwka admin 3.1K May 9 13:24 CODEOFCONDUCT.md
-rw-r--r-- 1 Andryuwka admin 1.1K Nov 11 2014 CONTRIBUTING.md
drwxr-xr-x 59 Andryuwka admin 2.0K Jul 11 00:15 Caskroom/
drwxr-xr-x 122 Andryuwka admin 4.1K Jul 13 14:20 Cellar/
drwxr-xr-x 3 Andryuwka admin 102B Feb 13 17:54 Frameworks/
-rw-r--r-- 1 Andryuwka admin 1.2K Jan 2 2015 LICENSE.txt
drwxr-xr-x 11 Andryuwka admin 374B Jul 3 10:34 Library/
-rw-r--r-- 1 Andryuwka admin 2.2K Jul 13 13:53 README.md
-rw-r--r-- 1 Andryuwka admin 23K May 15 11:59 SUPPORTERS.md
drwxrwxr-x 594 Andryuwka admin 20K Jul 13 14:20 bin/
drwxrwxr-x 3 Andryuwka admin 102B Oct 16 2014 cuda/
drwxrwxr-x 39 Andryuwka admin 1.3K Jul 11 14:29 etc/
drwxrwxr-x 141 Andryuwka admin 4.7K Jul 13 13:53 include/
drwxrwxr-x 504 Andryuwka admin 17K Jul 13 13:53 lib/
drwxrwxr-x 3 Andryuwka admin 102B Oct 16 2014 libexec/
drwxrwxr-x 4 Andryuwka admin 136B Oct 16 2014 man/
drwxr-xr-x 122 Andryuwka admin 4.1K Jul 13 14:20 opt/
drwxr-xr-x 18 Andryuwka admin 612B Jul 13 13:53 sbin/
drwxrwxr-x 57 Andryuwka admin 1.9K Jul 13 14:20 share/
drwxr-xr-x 6 Andryuwka admin 204B Jul 13 13:41 src/
drwxr-xr-x 42 Andryuwka admin 1.4K Jul 10 17:25 var/
What about /usr
directory? should it be posessed by $(whoami)
or root
?
Everything in /usr
should be root:wheel aside /usr/local
, which should be Andryuwka:admin
.
Your permissions are perhaps a little off, include
and lib
in /usr/local
should both be drwxr-xr-x
rather than drwxrwxr-x
, I believe. Not sure if that would be causing problems here.
What's in this folder?
drwxr-xr-x@ 15 root wheel 510B Mar 7 12:56 ../
.
nope - same problem ((((
Not sure there's anything actionable on our side. It seems to be a local configuration error of some sort. If you're still having issues I strongly recommend sudo chown $(whoami):admin /usr/local
.
Tried it on another machine with fresh OS X and Homebrew installation - absolutely same output.
$ ntopng
13/Jul/2015 14:21:48 [src/Ntop.cpp:781] 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
13/Jul/2015 14:21:48 [src/Redis.cpp:93] Successfully connected to redis 127.0.0.1:6379@0
13/Jul/2015 14:21:48 [src/main.cpp:209] ERROR: Startup error: missing super-user privileges ?
Can anyone check and confirm that ntopng could be run wihtout superuser prvileges?
+1 to this issue Lots of problems with the macports and source install of ntopng, on latest versions, so dropped this option, completely removed and cleaned macports, and installed homebrew, then
$ brew install ntopng -> fine
run redis-server, then
$ ntopng -i en1 (I'm on wifi) results in:
@netfortius Try:
brew install ntopng --HEAD
Should be fine now... Please let me know if you need a sudo
for running ntopng
good luck :)
$ brew uninstall ntopng
$ brew install ntopng
<...>
==> Checking out branch dev
==> ./autogen.sh
==> make
==> ./autogen.sh
==> ./configure --prefix=/usr/local/Cellar/ntopng/HEAD
==> make
Last 15 lines from /Users/
did you use --HEAD
?
yes - sorry - of course
$ brew install ntopng --HEAD
The dev version seem to be missing something else
Still no luck, in spite of all updates applied through brew packages - "Page "/lua/login.lua" was not found", while login.lua is at:
/usr/local/Cellar/ntopng/2.2_1/share/ntopng/scripts/lua/login.lua
Tried to pass the path to the URI in different formats, to no avail. Any idea?
I had this same issue, and notice this line: 04/Apr/2016 11:46:51 [HTTPserver.cpp:501] Web server dirs [/usr/local/Cellar/ntopng/2.2_1/share/ntopng/httpdocs][/usr/local/Cellar/ntopng/2.2_1/share/ntopng/scripts]
. That second part is simply your pwd
+ scripts and that's where lua/login.lua sits. If you run this from /usr/local/Cellar/ntopng/2.2_1/share/ntopng
it should work.
This is a sequel of this issue https://github.com/Homebrew/homebrew/issues/41637 (it was closed but seems like it wasn't addressed). Please help!