cannot get ntop to run
hi
when I try to run ntop I get an error knoppix@Microknoppix:/media/sda2$ ntop Fri Jun 13 13:46:07 2014 Initializing gdbm databases Fri Jun 13 13:46:07 2014 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error Fri Jun 13 13:46:07 2014 Possible solution: please use '-P <directory>' Fri Jun 13 13:46:07 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down... Fri Jun 13 13:46:07 2014 CLEANUP[t3060848640]: ntop caught signal 2 [state=2] Fri Jun 13 13:46:07 2014 ntop is now quitting... knoppix@Microknoppix:/media/sda2$ ls -lh /var/lib/ntop ls: cannot open directory /var/lib/ntop: Permission denied knoppix@Microknoppix:/media/sda2$ su ls -lh /var/lib/ntop Usage: su [options] [LOGIN] Options: -c, --command COMMAND pass COMMAND to the invoked shell -h, --help display this help message and exit -, -l, --login make the shell a login shell -m, -p, --preserve-environment do not reset environment variables, and keep the same shell -s, --shell SHELL use SHELL instead of the default in passwd knoppix@Microknoppix:/media/sda2$ sudo ls -lh /var/lib/ntop total 2.6M -rw-r----- 1 root root 12K Nov 6 2010 addressQueue.db -rw-r----- 1 root root 12K Nov 6 2010 dnsCache.db -rw-r----- 1 root root 232K Jun 12 14:01 fingerprint.db -rw-r----- 1 root root 13K Jun 12 14:01 hostSerials.db -rw-r--r-- 1 root root 30 Mar 14 2013 init.cfg -rw-r----- 1 root root 2.2M Jun 12 13:21 macPrefix.db -rw-r----- 1 root root 13K Jan 12 2011 ntop_pw.db -rw-r----- 1 root root 13K Jun 12 13:21 prefsCache.db -rw-r----- 1 root root 12K Jun 12 14:01 resolverCache.db drwx------ 5 ntop ntop 2.0K Jan 12 2011 rrd -rw-r----- 1 root root 301K Jun 13 12:32 topTalkers.db knoppix@Microknoppix:/media/sda2$ knoppix@Microknoppix:/media/sda2$ knoppix@Microknoppix:/media/sda2$ knoppix@Microknoppix:/media/sda2$ ntop -P /var/lib Fri Jun 13 14:32:15 2014 Initializing gdbm databases Fri Jun 13 14:32:15 2014 **ERROR** ....open of /var/lib/prefsCache.db failed: File open error Fri Jun 13 14:32:15 2014 Possible solution: please use '-P <directory>' Fri Jun 13 14:32:15 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down... Fri Jun 13 14:32:15 2014 CLEANUP[t3060590592]: ntop caught signal 2 [state=2] Fri Jun 13 14:32:15 2014 ntop is now quitting... knoppix@Microknoppix:/media/sda2$ sudo ls /var/lib/ntop addressQueue.db hostSerials.db ntop_pw.db rrd dnsCache.db init.cfg prefsCache.db topTalkers.db fingerprint.db macPrefix.db resolverCache.db knoppix@Microknoppix:/media/sda2$ knoppix@Microknoppix:/media/sda2$ sudo apt-get install ntop Reading package lists... Done Building dependency tree Reading state information... Done ntop is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 493 not upgraded. knoppix@Microknoppix:/media/sda2$ ntop Fri Jun 13 14:33:52 2014 Initializing gdbm databases Fri Jun 13 14:33:52 2014 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error Fri Jun 13 14:33:52 2014 Possible solution: please use '-P <directory>' Fri Jun 13 14:33:52 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down... Fri Jun 13 14:33:52 2014 CLEANUP[t3060762624]: ntop caught signal 2 [state=2] Fri Jun 13 14:33:52 2014 ntop is now quitting... knoppix@Microknoppix:/media/sda2$ |
Quote:
|
Check your use of sudo/su
If you can't read a directory with your user, and want to use su, you will need to use: Code:
su -c 'ls' Also, have you tried running ntop with sudo or su? If i remember rightly, you need to be root to be able to run it. |
It's not accurate to say I have been using linux for at least 5 years. I've used it briefly from time to time, over at least 5 years.
Quote:
Quote:
Quote:
|
Quote:
Quote:
Quote:
|
ok, so running ntop as root
(I know sudo is safer but anyhow, same error with sudo) it gives these errors Fri Jun 13 18:39:33 2014 **WARNING** INIT: Unable to create pid file (/var/lib/ntop/ntop.pid) and Fri Jun 13 18:39:38 2014 CHKVER: This version of ntop is a minimally supported but OLDER version - please upgrade Fri Jun 13 18:39:43 2014 **ERROR** RRD: Disabled - unable to create base directory (err 13, /var/lib/ntop/rrd) I tried as root, `echo dsfsdsf > /var/lib/ntop/dfds` and running `touch sdfsd` within /var/lib/ntop and it could create those files. So I don't know why running ntop as root and it couldn't create /var/lib/ntop/ntop.pid I checked https://wiki.archlinux.org/index.php...Fntop.2Frrd.29 regarding the RRD disabled message and it said change the owner of to 'nobody' which I did as you see from my output. But I still get those errors. And if you see my first post I included output from `sudo apt-get install ntop` it said it is the latest version. (testing writing to the directory, I can) root@Microknoppix:/var/lib/ntop# echo ewr>sdf root@Microknoppix:/var/lib/ntop# ls sdf sdf (making sure the rrd directory is owned by nobody, as that html page says for when getting the RRD error I got) root@Microknoppix:/var/lib/ntop# chown nobody rrd root@Microknoppix:/var/lib/ntop# ls -l | grep 'rrd' drwx------ 5 nobody ntop 160 Jun 13 18:35 rrd root@Microknoppix:/var/lib/ntop# root@Microknoppix:/var/lib/ntop# ntop Fri Jun 13 19:20:22 2014 Initializing gdbm databases Fri Jun 13 19:20:22 2014 ntop will be started as user nobody Fri Jun 13 19:20:22 2014 ntop v.4.99.3 (32 bit) Fri Jun 13 19:20:22 2014 Configured on Mar 2 2013 6:00:33, built on Mar 2 2013 06:01:55. Fri Jun 13 19:20:22 2014 Copyright 1998-2012 by Luca Deri <deri@ntop.org> Fri Jun 13 19:20:22 2014 Get the freshest ntop from http://www.ntop.org/ Fri Jun 13 19:20:22 2014 NOTE: ntop is running from 'ntop' Fri Jun 13 19:20:22 2014 NOTE: (but see warning on man page for the --instance parameter) Fri Jun 13 19:20:22 2014 NOTE: ntop libraries are in '/usr/lib/ntop' Fri Jun 13 19:20:22 2014 Initializing ntop ............................. Fri Jun 13 19:20:28 2014 VENDOR: ntop continues ok ................. Fri Jun 13 19:20:28 2014 **ERROR** GeoIP: unable to load file GeoLiteCity.dat Fri Jun 13 19:20:28 2014 **ERROR** GeoIP: unable to load ASN file GeoIPASNum.dat ..................................... Fri Jun 13 19:20:28 2014 Calling plugin start functions (if any) Fri Jun 13 19:20:28 2014 RRD: Welcome to the RRD plugin Fri Jun 13 19:20:28 2014 RRD: Mask for new directories is 0700 Fri Jun 13 19:20:28 2014 RRD: Mask for new files is 0066 Fri Jun 13 19:20:28 2014 THREADMGMT[t3060635648]: ntop RUNSTATE: INITNONROOT(3) .................... Fri Jun 13 19:20:28 2014 Now running as requested user 'nobody' (65534:65534) Fri Jun 13 19:20:28 2014 Note: Reporting device initally set to 0 [eth0] (merged) Fri Jun 13 19:20:28 2014 **WARNING** INIT: Unable to create pid file (/var/lib/ntop/ntop.pid) ....................... Fri Jun 13 19:20:33 2014 CHKVER: Checking current ntop version at version.ntop.org/version.xml Fri Jun 13 19:20:34 2014 CHKVER: Version file is from 'version.ntop.org' Fri Jun 13 19:20:34 2014 CHKVER: as of date is '2012-10-16T11:00:47' Fri Jun 13 19:20:34 2014 CHKVER: This version of ntop is a minimally supported but OLDER version - please upgrade Fri Jun 13 19:20:38 2014 **ERROR** RRD: Disabled - unable to create base directory (err 13, /var/lib/ntop/rrd) ^CFri Jun 13 19:28:58 2014 CLEANUP[t3060635648]: ntop caught signal 2 [state=4] Fri Jun 13 19:28:58 2014 Active sessions=0/Active hosts=1 ............. Fri Jun 13 19:28:59 2014 RRD: Shutting down, locking mutex (may block for a little while) ............. Fri Jun 13 19:28:59 2014 RRD: Thanks for using the rrdPlugin Fri Jun 13 19:28:59 2014 RRD: Done ...... Fri Jun 13 19:29:00 2014 ntop is now quitting... ^Croot@Microknoppix:/var/lib/ntop# root@Microknoppix:/var/lib/ntop# |
@TBone, I wrote even in my first post that I did "$ sudo ls -lh /var/lib/ntop" it's in the output a line after the ls without sudo.
You replied "When you tried to do an ls of that directory, it said "permission denied"...wouldn't that tell you that your 'regular' user ID doesn't have permissions to that directory????" I wrote "Yes, and that is why if you check my post, I followed `$ ls -lh /var/lib/ntop` with `$ sudo ls -lh /var/lib/ntop` " What i'm trying to show you there, is that I know the regular user doesn't have permission and hence I did that sudo command. But your reply suggests you don't understand that. You replied saying "your regular user account doesn't have permissions to read that directory/files" I don't understand why you don't accept that I did Sudo ls because the regular ls didn't have permission to read it. You even quoted where I did sudo ls. You keep repeating that the regular account doesn't have permission to read the directory, but I told you that besides doing sudo with that ls command, I did run 'sudo ntop' too So I don't understand why you don't understand what i'm trying to communicate. I am aware that the regular account doesn't have permission. Giving it permission doesn't help.. and it didn't run with sudo and still doesn't. I have tried your suggestion below, but it doesn't work. knoppix@Microknoppix:~$ sudo chown -R knoppix /var/lib/ntop knoppix@Microknoppix:~$ sudo chmod 755 /var/lib/ntop knoppix@Microknoppix:~$ ls -ld /var/lib/ntop drwxr-xr-x 4 knoppix ntop 408 Jun 13 19:52 /var/lib/ntop knoppix@Microknoppix:~$ So that's your suggestion. It doesn't work knoppix@Microknoppix:~$ ntop Fri Jun 13 19:55:26 2014 Initializing gdbm databases Fri Jun 13 19:55:26 2014 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error Fri Jun 13 19:55:26 2014 Possible solution: please use '-P <directory>' Fri Jun 13 19:55:26 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down... Fri Jun 13 19:55:26 2014 CLEANUP[t3060647936]: ntop caught signal 2 [state=2] Fri Jun 13 19:55:26 2014 ntop is now quitting... knoppix@Microknoppix:~$ knoppix@Microknoppix:~$ ntop -P /var/lib Fri Jun 13 19:54:28 2014 Initializing gdbm databases Fri Jun 13 19:54:28 2014 **ERROR** ....open of /var/lib/prefsCache.db failed: File open error Fri Jun 13 19:54:28 2014 Possible solution: please use '-P <directory>' Fri Jun 13 19:54:28 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down... Fri Jun 13 19:54:28 2014 CLEANUP[t3060287488]: ntop caught signal 2 [state=2] Fri Jun 13 19:54:28 2014 ntop is now quitting... knoppix@Microknoppix:~$ ntop -P /var/lib/ntop Fri Jun 13 19:54:31 2014 Initializing gdbm databases Fri Jun 13 19:54:31 2014 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error Fri Jun 13 19:54:31 2014 Possible solution: please use '-P <directory>' Fri Jun 13 19:54:31 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down... Fri Jun 13 19:54:31 2014 CLEANUP[t3060127744]: ntop caught signal 2 [state=2] Fri Jun 13 19:54:31 2014 ntop is now quitting... knoppix@Microknoppix:~$ And if I try with sudo knoppix@Microknoppix:~$ sudo ntop Fri Jun 13 19:55:50 2014 Initializing gdbm databases Fri Jun 13 19:55:50 2014 ntop will be started as user nobody Fri Jun 13 19:55:50 2014 ntop v.4.99.3 (32 bit) Fri Jun 13 19:55:50 2014 Configured on Mar 2 2013 6:00:33, built on Mar 2 2013 06:01:55. Fri Jun 13 19:55:50 2014 Copyright 1998-2012 by Luca Deri <deri@ntop.org> Fri Jun 13 19:55:50 2014 Get the freshest ntop from http://www.ntop.org/ Fri Jun 13 19:55:50 2014 NOTE: ntop is running from 'ntop' Fri Jun 13 19:55:50 2014 NOTE: (but see warning on man page for the --instance parameter) Fri Jun 13 19:55:50 2014 NOTE: ntop libraries are in '/usr/lib/ntop' Fri Jun 13 19:55:50 2014 Initializing ntop ....... Fri Jun 13 19:55:53 2014 VENDOR: ntop continues ok Fri Jun 13 19:55:53 2014 VENDOR: Checking for MAC address table file Fri Jun 13 19:55:53 2014 VENDOR: File '/usr/share/ntop/oui.txt' does not need to be reloaded Fri Jun 13 19:55:53 2014 VENDOR: ntop continues ok ..... Fri Jun 13 19:55:53 2014 **ERROR** GeoIP: unable to load file GeoLiteCity.dat Fri Jun 13 19:55:53 2014 **ERROR** GeoIP: unable to load ASN file GeoIPASNum.dat Fri Jun 13 19:55:53 2014 NOTE: Interface merge enabled by default ...... Fri Jun 13 19:55:53 2014 RRD: Welcome to Round-Robin Database. (C) 2002-12 by Luca Deri. Fri Jun 13 19:55:53 2014 SFLOW: Welcome to sFlow.(C) 2002-12 by Luca Deri Fri Jun 13 19:55:53 2014 Calling plugin start functions (if any) Fri Jun 13 19:55:53 2014 RRD: Welcome to the RRD plugin Fri Jun 13 19:55:53 2014 RRD: Mask for new directories is 0700 Fri Jun 13 19:55:53 2014 RRD: Mask for new files is 0066 Fri Jun 13 19:55:53 2014 THREADMGMT: RRD: Started thread (t2984246080) for data collection ......... Fri Jun 13 19:55:53 2014 WEB: ntop's web server is now processing requests Fri Jun 13 19:55:53 2014 THREADMGMT[t2984246080]: RRD: Data collection thread starting [p5596] Fri Jun 13 19:55:53 2014 THREADMGMT[t3060733952]: ntop RUNSTATE: INITNONROOT(3) Fri Jun 13 19:55:53 2014 Now running as requested user 'nobody' (65534:65534) Fri Jun 13 19:55:53 2014 Note: Reporting device initally set to 0 [eth0] (merged) Fri Jun 13 19:55:53 2014 **WARNING** INIT: Unable to create pid file (/var/lib/ntop/ntop.pid) ...... Fri Jun 13 19:55:58 2014 CHKVER: Checking current ntop version at version.ntop.org/version.xml Fri Jun 13 19:55:58 2014 CHKVER: Version file is from 'version.ntop.org' Fri Jun 13 19:55:58 2014 CHKVER: as of date is '2012-10-16T11:00:47' Fri Jun 13 19:55:58 2014 CHKVER: This version of ntop is a minimally supported but OLDER version - please upgrade Fri Jun 13 19:56:03 2014 **ERROR** RRD: Disabled - unable to create base directory (err 13, /var/lib/ntop/rrd) ^C Fri Jun 13 19:56:07 2014 CLEANUP[t3060733952]: ntop caught signal 2 [state=4] ......... Fri Jun 13 19:56:08 2014 =================================== Fri Jun 13 19:56:08 2014 ntop is shutdown... Fri Jun 13 19:56:08 2014 =================================== knoppix@Microknoppix:~$ |
Quote:
Quote:
Quote:
Quote:
Quote:
Again, don't know how much more clear I can state it. Your problem is caused by the permissions on the /var/lib/ntop directory being wrong. Until you fix the permissions, ownership, or both, there's nothing else anyone can do for you. There is NOTHING anyone can do to help you, if you don't do what's suggested to you. If you don't at least TRY to follow the advice given, there's little point in posting. You were given two commands previously: use one or both of them. |
If you look in my output, I did
knoppix@Microknoppix:~$ sudo chown -R knoppix /var/lib/ntop knoppix@Microknoppix:~$ sudo chmod 755 /var/lib/ntop knoppix@Microknoppix:~$ ls -ld /var/lib/ntop drwxr-xr-x 4 knoppix ntop 408 Jun 13 19:52 /var/lib/ntop knoppix@Microknoppix:~$ And in case that's not enough i've done 777 now. On Everything in /var/lib/ntop, every file every directory. I still get. Fri Jun 13 20:54:40 2014 Now running as requested user 'nobody' (65534:65534) Fri Jun 13 20:54:40 2014 Note: Reporting device initally set to 0 [eth0] (merged) Fri Jun 13 20:54:40 2014 **WARNING** INIT: Unable to create pid file (/var/lib/ntop/ntop.pid) I've now tried root@Microknoppix:/var/lib# chown -R nobody ntop root@Microknoppix:/var/lib# But when I do sudo ntop OR just ntop without sudo, I still get Fri Jun 13 20:56:56 2014 Now running as requested user 'nobody' (65534:65534) Fri Jun 13 20:56:56 2014 Note: Reporting device initally set to 0 [eth0] (merged) Fri Jun 13 20:56:56 2014 **WARNING** INIT: Unable to create pid file (/var/lib/ntop/ntop.pid) If that is not what you mean me to do then could you tell me exactly what command you think I should be running? (I have already tried two of your suggestions as mentioned a number of times and as can be seen in my output) So please tell me what you mean me to do - that being - (A command that I haven't already run) So do check my output before you suggest something, because it may be something i've already done) And if I try ntop from my knoppix account Or ntop -P /var/lib OR ntop -P /var/lib/ntop Fri Jun 13 21:04:48 2014 Initializing gdbm databases Fri Jun 13 21:04:48 2014 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error Fri Jun 13 21:04:48 2014 Possible solution: please use '-P <directory>' Fri Jun 13 21:04:48 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down... Fri Jun 13 21:04:48 2014 CLEANUP[t3060631552]: ntop caught signal 2 [state=2] Fri Jun 13 21:04:48 2014 ntop is now quitting... knoppix@Microknoppix:~$ |
Quote:
Quote:
Quote:
Code:
**WARNING** INIT: Unable to create pid file (/var/lib/ntop/ntop.pid) |
Quote:
And you replied at 9:07AM saying I hadn't done the commands. Then when I post at 10:02AM to say I did those commands and they're there, you say it's the first time you've seen it. You ask if there is a user called knoppix. Yes there is. Look at my output Even the first line of output in my first post had a prompt that read- knoppix@Microknoppix:/media/sda2$ You quote "knoppix@Microknoppix:~$ ntop" That part before the @ is my username. If I do echo $USER it says "knoppix". As you can see, from output below, it's all owned by knoppix and 777 and i'm running ntop from user knoppix A thing I haven't done (I don't know if you think I should), is make all of /var/lib owned by knoppix but that seems like overkill and I believe /var/lib/ntop is the parent so i've only operated on that. Notice, that the following output shows that knoppix owns /var/lib/ntop and all its contents and all the contents is 777. And notice that I did ntop AND ntop -P /var/lib/ntop that is all in the output below knoppix@Microknoppix:/var/lib$ ls -l | grep ntop drwxrwxrwx 4 knoppix ntop 408 Jun 13 20:59 ntop -rw-r----- 1 root root 12546 Jun 13 18:31 ntop_pw.db knoppix@Microknoppix:/var/lib$ ls -l ntop ls: cannot open directory ntop: Permission denied (PLEASE CONTINUE READING TO THE NEXT LINE WHERE I DO THE SAME LINE WITH SUDO) knoppix@Microknoppix:/var/lib$ sudo ls -l ntop total 2630 -rwxrwxrwx 1 knoppix root 12288 Nov 6 2010 addressQueue.db -rwxrwxrwx 1 knoppix root 12288 Nov 6 2010 dnsCache.db -rwxrwxrwx 1 knoppix root 237568 Jun 13 20:59 fingerprint.db -rwxrwxrwx 1 knoppix root 12396 Jun 13 20:59 hostSerials.db -rwxrwxrwx 1 knoppix root 30 Mar 14 2013 init.cfg -rwxrwxrwx 1 knoppix root 2208040 Jun 12 13:21 macPrefix.db -rwxrwxrwx 1 knoppix root 12546 Jan 12 2011 ntop_pw.db -rwxrwxrwx 1 knoppix root 13216 Jun 13 20:59 prefsCache.db -rwxrwxrwx 1 knoppix root 12288 Jun 13 20:59 resolverCache.db drwxrwxrwx 5 knoppix ntop 160 Jun 13 18:35 rrd -rwxrwxrwx 1 knoppix root 4 Jun 13 19:18 sdf -rwxrwxrwx 1 knoppix root 307376 Jun 13 19:28 topTalkers.db knoppix@Microknoppix:/var/lib$ knoppix@Microknoppix:~$ ntop Fri Jun 13 21:43:04 2014 Initializing gdbm databases Fri Jun 13 21:43:04 2014 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error Fri Jun 13 21:43:04 2014 Possible solution: please use '-P <directory>' Fri Jun 13 21:43:04 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down... Fri Jun 13 21:43:04 2014 CLEANUP[t3060557824]: ntop caught signal 2 [state=2] Fri Jun 13 21:43:04 2014 ntop is now quitting... knoppix@Microknoppix:~$ ntop -P /var/lib/ntop Fri Jun 13 21:43:09 2014 Initializing gdbm databases Fri Jun 13 21:43:09 2014 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error Fri Jun 13 21:43:09 2014 Possible solution: please use '-P <directory>' Fri Jun 13 21:43:09 2014 **FATAL_ERROR** GDBM open failed, ntop shutting down... Fri Jun 13 21:43:09 2014 CLEANUP[t3060996096]: ntop caught signal 2 [state=2] Fri Jun 13 21:43:09 2014 ntop is now quitting... knoppix@Microknoppix:~$ |
All times are GMT -5. The time now is 02:44 AM. |