When i start ntop service, it fails with following error.
[root@localhost bin]# ./ntop -i -d -L -u ntop -P /usr/local/ntop -w 3000 --interface eth0 --skip-version-check yes
Tue Jun 12 12:27:06 2012 NOTE: Interface merge enabled by default
Tue Jun 12 12:27:06 2012 Initializing gdbm databases
Tue Jun 12 12:27:06 2012 **ERROR** ....open of /usr/local/ntop/prefsCache.db failed: Can't be writer
Tue Jun 12 12:27:06 2012 Possible solution: please use '-P
Tue Jun 12 12:27:06 2012 **FATAL_ERROR** GDBM open failed, ntop shutting down...
Tue Jun 12 12:27:06 2012 CLEANUP[t3086178000]: ntop caught signal 2 [state=2]
Tue Jun 12 12:27:06 2012 ntop is now quitting...
Solution :-
As we can see in error, ntop enable to write in database file.
After check, found this file owned by root user.
-rw-r----- 1 root root 16K Jun 12 12:25 prefsCache.db
#killall ntop
Now this db file must written by ntop user, following command has been used to change ownsership.
[root@localhost ntop]# chown ntop:ntop prefsCache.db
Now seems likes this.
root@localhost ntop]# ls -ltrh
-rw-r----- 1 ntop ntop 16K Jun 12 12:25 prefsCache.db
Now just run service again, and it should work.
if again trough same error, kill service 2-3 time & run again.
P.S :- check staus through ps like
#ps -aux | grep ntop
Enjoy.
0 comments:
Post a Comment