ntop issue

Darryl Clarke smartssa at gmail.com
Sat Dec 3 23:23:33 UTC 2005


On 12/3/05, Colin Bell <col at baibell.org> wrote:
> On Fri, Dec 02, 2005 at 10:52:33AM -0500, Phil wrote:
> > I installed ntop using sudo apt-get install ntop
> >
> > Now when I start the service it immediately stops and no messages are logged
> > in /var/log/messages
>
> Did you set the admin password?
>
> ntop -A
>
> Its explained in /usr/share/doc/ntop/README.Debian

I figured I'd give ntop a shot after seeing this and I too am having troubles.

The initial install setup the user 'ntop' and group 'ntop' which
appears correct.

The config file in /var/lib/ntop/ says to run as user 'ntop' which
also appears correct.

However, when I run it (as root) it fails.  It's attempting to run as
'nobody' a user that cannot read the files in /var/lib/ntop, so it
fails.

root at techno:/var/lib/ntop# ntop
Sat Dec  3 18:13:53 2005  ntop will be started as user nobody
Sat Dec  3 18:13:53 2005  ntop v.3.0 SourceForge .tgz MT (SSL)
Sat Dec  3 18:13:53 2005  Configured on Mar 24 2005  3:56:53, built on
Mar 24 2005 03:57:09.
Sat Dec  3 18:13:53 2005  Copyright 1998-2004 by Luca Deri <deri at ntop.org>
Sat Dec  3 18:13:53 2005  Get the freshest ntop from http://www.ntop.org/
Sat Dec  3 18:13:53 2005  Initializing ntop
Sat Dec  3 18:13:53 2005  Checking eth0 for additional devices
Sat Dec  3 18:13:53 2005  Resetting traffic statistics for device eth0
Sat Dec  3 18:13:53 2005  DLT: Device 0 [eth0] is 1, mtu 1514, header 14
Sat Dec  3 18:13:53 2005  Initializing gdbm databases
Sat Dec  3 18:13:53 2005  Now running as requested user 'nobody' (65534:65534)
Sat Dec  3 18:13:53 2005  **FATAL_ERROR** ....open of
/var/lib/ntop/prefsCache.db failed: File open error
Sat Dec  3 18:13:53 2005  1. Is another instance of ntop running?
Sat Dec  3 18:13:53 2005  2. Make sure that the use you specified can
write in the target directory

In answer to the troubleshooting:
1: no, there's no ntop's running
2: no, the user 'nobody' can not write. It should be running as 'ntop'

I ran `dpkg-reconfigure ntop` in an effort to fix things, and it
confirmed my settings as running as 'ntop' and still failed with the
same as above.

If I chown nobody.nobody to all those files, it'll work -- but that's
clearly the wrong solution here.

The issue apperears that the init script is failing to read
/etc/default/ntop properly.

I changed my /etc/default/ntop to this:
# This file will normally include the debconf template but you can disable
# that and use this file only.
USER="ntop"
INTERFACES="eth0,eth1"
#. /var/lib/ntop/init.cfg
#GETOPT=""

and it now works as expected.  Why isn't it sourcing
/var/lib/ntop/init.cfg ? I cannot answer...

--
~ Darryl  ~ smartssa at gmail.com
http://smartssa.com / http://darrylclarke.com




More information about the ubuntu-users mailing list