# I need some help with NTOP - SOLVED

## djbeenie

I have been trying to get ntop to work.  It was working fine until I rebooted my server.  I have tried everything I can think of.  I have tried to remerge ntop.  I have 5 nics on this machine, and I think that may be causing the issue.  This is the information I have below. 

```

atlsnort conf.d # nano ntop

atlsnort conf.d # ntop

Thu Aug  2 21:33:52 2007  NOTE: Interface merge enabled by default

Thu Aug  2 21:33:52 2007  Initializing gdbm databases

Thu Aug  2 21:33:52 2007  ntop will be started as user nobody

Thu Aug  2 21:33:52 2007  ntop v.3.2 SourceForge .tgz

Thu Aug  2 21:33:52 2007  Configured on Aug  2 2007 17:46:56, built on Aug  2 2007 17:47:34.

Thu Aug  2 21:33:52 2007  Copyright 1998-2005 by Luca Deri <deri@ntop.org>

Thu Aug  2 21:33:52 2007  Get the freshest ntop from http://www.ntop.org/

Thu Aug  2 21:33:52 2007  NOTE: ntop is running from 'ntop'

Thu Aug  2 21:33:52 2007  NOTE: (but see warning on man page for the --instance parameter)

Thu Aug  2 21:33:52 2007  NOTE: ntop libraries are in '/usr/lib'

Thu Aug  2 21:33:52 2007  Initializing ntop

Thu Aug  2 21:33:52 2007  Checking eth0 for additional devices

Thu Aug  2 21:33:52 2007  Resetting traffic statistics for device eth0

Thu Aug  2 21:33:52 2007  DLT: Device 0 [eth0] is 1, mtu 1514, header 14

Thu Aug  2 21:33:52 2007  Initializing gdbm databases

Thu Aug  2 21:33:52 2007  VENDOR: Loading MAC address table.

Thu Aug  2 21:33:52 2007  VENDOR: Checking for MAC address table file

Thu Aug  2 21:33:52 2007  **WARNING** VENDOR: Unable to open file 'specialMAC.txt'

Thu Aug  2 21:33:52 2007  VENDOR: ntop continues ok

Thu Aug  2 21:33:52 2007  VENDOR: Checking for MAC address table file

Thu Aug  2 21:33:52 2007  **WARNING** VENDOR: Unable to open file 'oui.txt'

Thu Aug  2 21:33:52 2007  VENDOR: ntop continues ok

Thu Aug  2 21:33:52 2007  Fingeprint: Loading signature file.

Thu Aug  2 21:33:55 2007  ASN: Checking for Autonomous System Number table file

Thu Aug  2 21:33:55 2007  ASN: Loading file ''

Segmentation fault

atlsnort conf.d # /etc/init.d/ntop restart

 * Caching service dependencies ...                                                                          [ ok ]

 * Starting ntop ...

Thu Aug  2 21:34:03 2007  NOTE: Interface merge enabled by default

Thu Aug  2 21:34:03 2007  Initializing gdbm databases                                                        [ ok ]

atlsnort conf.d # rc-status

Runlevel: default

 apache2                                                                                               [ started  ]

 hdparm                                                                                                [ started  ]

 local                                                                                                 [ started  ]

 mysql                                                                                                 [ started  ]

 netmount                                                                                              [ started  ]

 ntop                                                                                                  [ stopped  ]

 ntp-client                                                                                            [ started  ]

 snort                                                                                                 [ started  ]

 sshd                                                                                                  [ started  ]

 syslog-ng                                                                                             [ started  ]

 vixie-cron                                                                                            [ started  ]

 xdm                                                                                                   [ started  ]
```

MyConfig

```
# Config file for /etc/init.d/ntop

# Set preferred options here

#NTOP_OPTS="--http-server 3000 --https-server 0 --interface eth0"

# suggestions from bug #136983 (use it in case you experience ntop hangs)

#NTOP_OPTS="u ntop -P /var/lib/ntop --disable-schedyield --http-server 3000 --https-server 3001"

NTOP_OPTS="-u ntop -P /var/lib/ntop --disable-schedyield --http-server 3000 --interface eth0"

```

My tail -f /var/log/messages when I restart the ntop service

```

Aug  2 21:41:12 atlsnort ntop[19470]:   THREADMGMT[t3058005680]: ntop RUNSTATE: PREINIT(1)

Aug  2 21:41:12 atlsnort ntop[19470]:   THREADMGMT[t3058005680]: ntop RUNSTATE: INIT(2)

Aug  2 21:41:12 atlsnort ntop[19470]:   ntop v.3.2 SourceForge .tgz

Aug  2 21:41:12 atlsnort ntop[19470]:   Configured on Aug  2 2007 17:46:56, built on Aug  2 2007 17:47:34.

Aug  2 21:41:12 atlsnort ntop[19470]:   Copyright 1998-2005 by Luca Deri <deri@ntop.org>

Aug  2 21:41:12 atlsnort ntop[19470]:   Get the freshest ntop from http://www.ntop.org/

Aug  2 21:41:12 atlsnort ntop[19470]:   NOTE: ntop is running from '/usr/bin'

Aug  2 21:41:12 atlsnort ntop[19470]:   NOTE: (but see warning on man page for the --instance parameter)

Aug  2 21:41:12 atlsnort ntop[19470]:   NOTE: ntop libraries are in '/usr/lib'

Aug  2 21:41:12 atlsnort ntop[19470]:   Initializing ntop

Aug  2 21:41:12 atlsnort ntop[19470]:   Checking eth0 for additional devices

Aug  2 21:41:12 atlsnort ntop[19470]:   Resetting traffic statistics for device eth0

Aug  2 21:41:12 atlsnort ntop[19470]:   DLT: Device 0 [eth0] is 1, mtu 1514, header 14

Aug  2 21:41:12 atlsnort ntop[19470]:   Initializing gdbm databases

Aug  2 21:41:12 atlsnort ntop[19470]:   VENDOR: Loading MAC address table.

Aug  2 21:41:12 atlsnort ntop[19470]:   VENDOR: Checking for MAC address table file

Aug  2 21:41:12 atlsnort ntop[19470]:   **WARNING** VENDOR: Unable to open file 'specialMAC.txt'

Aug  2 21:41:12 atlsnort ntop[19470]:   VENDOR: ntop continues ok

Aug  2 21:41:12 atlsnort ntop[19470]:   VENDOR: Checking for MAC address table file

Aug  2 21:41:12 atlsnort ntop[19470]:   **WARNING** VENDOR: Unable to open file 'oui.txt'

Aug  2 21:41:12 atlsnort ntop[19470]:   VENDOR: ntop continues ok

Aug  2 21:41:12 atlsnort ntop[19470]:   Fingeprint: Loading signature file.

Aug  2 21:41:12 atlsnort ntop[19470]:   INIT: Parent process is exiting (this is normal)

Aug  2 21:41:12 atlsnort ntop[19471]:   INIT: Bye bye: I'm becoming a daemon...

Aug  2 21:41:12 atlsnort ntop[19471]:   THREADMGMT[t3058005680]: Now running as a daemon
```

To throw something else in the loop, it may narrow it down a little.  From my phpsysinfo I get this error at the top of the page.

```

Warning: gethostbyaddr() [function.gethostbyaddr]: Address is not a valid IPv4 or IPv6 address in /var/www/localhost/htdocs/phpsysinfo/includes/os/class.Linux.inc.php on line 68

Warning: Cannot modify header information - headers already sent by (output started at /var/www/localhost/htdocs/phpsysinfo/includes/os/class.Linux.inc.php:68) in /var/www/localhost/htdocs/phpsysinfo/includes/system_header.php on line 31

Warning: Cannot modify header information - headers already sent by (output started at /var/www/localhost/htdocs/phpsysinfo/includes/os/class.Linux.inc.php:68) in /var/www/localhost/htdocs/phpsysinfo/includes/system_header.php on line 35

```

This is line 68 on /var/www/localhost/htdocs/phpsysinfo/includes/os/class.Linux.inc.php

```
  // get our canonical hostname

  function chostname () {

    $result = rfts( '/proc/sys/kernel/hostname', 1 );

    if ( $result == "ERROR" ) {

      $result = "N.A.";

    } else {

      $result = gethostbyaddr( gethostbyname( trim( $result ) ) );

```

```
atlsnort kernel # cat /proc/sys/kernel/hostname

atlsnort

```

I don't know what else to do.  I am about to just reinstall the whole server b/c it was working before.  Can anyone help me out?

Regards,

Beenie

----------

## djbeenie

The problem was that my hostname in /etc/conf.d/hosts  was missing.  I added my hostname back and restarted.  All is well now.

----------

