service ntop start -- failed

Issues related to software problems
Post Reply
hm2k
Posts: 24
Joined: 2006/08/17 10:03:24
Contact:

service ntop start -- failed

Post by hm2k » 2009/04/22 09:54:47

I get this issue:

[code]
[root@blade ~]# service ntop start
Starting ntop: Processing file /etc/ntop.conf for parameters...
Wed Apr 22 10:59:12 2009 NOTE: Interface merge enabled by default
Wed Apr 22 10:59:12 2009 Initializing gdbm databases
FATAL ERROR: Unrecognized/unprocessed ntop options...
> /dev/null

run /usr/sbin/ntop --help for usage information

Common problems:
-B "filter expressions" (quotes are required)
--use-syslog=facilty (the = is required)

[FAILED]
[/code]

I found this...

[code]
[root@blade ~]# cat /etc/rc.d/init.d/ntop | grep /dev/null
LANG=C daemon "$ntop @$config --daemon > /dev/null"
[/code]

I'm guessing this is wrong. What should it be?

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: service ntop start -- failed

Post by pschaff » 2009/04/22 10:05:00

Suggest you ask at [url=config-inifiles-bugs@lists.sourceforge.net]RPMforge[/url]. Not a CentOS package.

hm2k
Posts: 24
Joined: 2006/08/17 10:03:24
Contact:

Re: service ntop start -- failed

Post by hm2k » 2009/04/22 10:13:07

[quote]
pschaff wrote:
Suggest you ask at [url=config-inifiles-bugs@lists.sourceforge.net]RPMforge[/url]. Not a CentOS package.[/quote]

This list appears to be for the [url=http://sourceforge.net/projects/config-inifiles/]config-inifiles[/url] project -- Config::IniFiles A Perl module for reading ".INI" style configuration files. Provides Object-Oriented and tied hash usage styles. What does this have to do with ntop, centos or rpmforge?

I have contacted the RPM maintainers already anyway.

Meanwhile I decided to try removing the "> /dev/null", as follows:

[code]
[root@blade ~]# cat /etc/rc.d/init.d/ntop | grep LANG=
#LANG=C daemon "$ntop @$config --daemon > /dev/null"
LANG=C daemon "$ntop @$config --daemon"
[/code]

However now I get:

[code]
[root@blade ~]# service ntop start
Starting ntop: /etc/rc.d/init.d/functions: line 127: [: /var/run/ntop.conf: binary operator expected
[/code]

Is this an issue that can be solved, or should I contact someone else for this too?

hm2k
Posts: 24
Joined: 2006/08/17 10:03:24
Contact:

Re: service ntop start -- failed

Post by hm2k » 2009/04/22 13:51:23

Well, it doesn't appear to be working correctly...

[code]
[root@blade ~]# service ntop status
ntop (pid 28991) is running...

[root@blade ~]# ps aux | grep -v grep | grep ntop
root 28991 0.0 21.7 42972 23908 pts/0 S 11:40 0:00 /usr/sbin/ntop @/etc/ntop.conf --daemon

[root@blade ~]# cat /etc/ntop.conf | grep http-server
--http-server 127.0.0.1:3000 --https-server 127.0.0.1:3001

[root@blade ~]# curl 127.0.0.1:3000
curl: (7) couldn't connect
[/code]

[code]
[root@blade ~]# service ntop restart
Stopping ntop: pidof: invalid options on command line!

pidof: invalid options on command line!

[FAILED]
Starting ntop: /etc/rc.d/init.d/functions: line 127: [: /var/run/ntop.conf: binary operator expected
[ OK ]

[root@blade ~]# curl 127.0.0.1:3000
curl: (7) couldn't connect

[/code]

I've got no idea why this won't work... Who am I best contacting about this?

hm2k
Posts: 24
Joined: 2006/08/17 10:03:24
Contact:

Re: service ntop start -- failed

Post by hm2k » 2009/04/22 13:59:21

Trying to run it without the service/deamon...

[code]
[root@blade ~]# ntop
Wed Apr 22 15:29:44 2009 NOTE: Interface merge enabled by default
Wed Apr 22 15:29:44 2009 Initializing gdbm databases
Wed Apr 22 15:29:44 2009 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: Can't be writer
Wed Apr 22 15:29:44 2009 Possible solution: please use '-P <directory>'
Wed Apr 22 15:29:44 2009 **FATAL_ERROR** GDBM open failed, ntop shutting down...
Wed Apr 22 15:29:44 2009 CLEANUP[t3086916000]: ntop caught signal 2 [state=2]
Wed Apr 22 15:29:44 2009 ntop is now quitting...
[/code]

hm2k
Posts: 24
Joined: 2006/08/17 10:03:24
Contact:

Re: service ntop start -- failed

Post by hm2k » 2009/04/22 14:16:42

[url=https://rpmrepo.org/RPMforge?action=fullsearch&context=180&value=ntop&titlesearch=Titles]RPMforge has no results for ntop.[/url]

Although I did find this: http://svn.rpmforge.net/svn/trunk/rpms/ntop/ntop.spec

----

I looked at the previous error, and figured, it must be a permissions issue, right?

[code]
[root@blade ~]# chown -R ntop:ntop /var/lib/ntop/
[root@blade ~]# chmod -R 755 /var/lib/ntop/
[root@blade ~]# ntop
Wed Apr 22 15:38:16 2009 NOTE: Interface merge enabled by default
Wed Apr 22 15:38:16 2009 Initializing gdbm databases
Wed Apr 22 15:38:16 2009 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: Can't be writer
Wed Apr 22 15:38:16 2009 Possible solution: please use '-P <directory>'
Wed Apr 22 15:38:16 2009 **FATAL_ERROR** GDBM open failed, ntop shutting down...
Wed Apr 22 15:38:16 2009 CLEANUP[t3086506400]: ntop caught signal 2 [state=2]
Wed Apr 22 15:38:16 2009 ntop is now quitting...
[/code]

I checked this, apparently not.

I also searched google [url=http://groups.google.co.uk/groups?q="**ERROR** ....open of %2Fvar%2Flib%2Fntop%2FprefsCache.db failed%3A Can't be writer"]group search[/url], although other people are having this same issue on ubuntu, nobody has a definitive solution there either.

Who should I contact about this?

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: service ntop start -- failed

Post by gerald_clark » 2009/04/22 14:19:42

As Phil stated in post #2, this is not a Centos program.
You would be better off asking questions where the program is known.
I would suggest http://www.ntop.org/news.html

hm2k
Posts: 24
Joined: 2006/08/17 10:03:24
Contact:

Re: service ntop start -- failed

Post by hm2k » 2009/04/22 14:31:58

I raised a ticket with ntop here:

http://www.ntop.org/trac/ticket/76

Post Reply

Return to “CentOS 4 - Software Support”