Can't start NTOP service/daemon

I have installed version of ntop 4.0.3 by guide.
But I can't start ntop daemon/service. I didn't find a service file for starting.
During the installation there was no problem only want to RRDTool so I installed that. Now there is no necessary package required.

I didn't find in /etc/init.d/ ntop daemon.

# service ntop status
ntop: unrecognized service

What can I do in this situation?

Best regards,

I dont think ntop has a init script for starting and stopping. Please check /usr/local/bin/ntop.
and its options for starting the ntop.

Once its started access the webpage from port 3000 and start using it.

I have checked all probabilities. I can reach ntop web gui from port 3000 when I start ntop.

# ls -l /usr/local/bin/
total 0
# 

What is the main problem. :confused:

did you tried to search for ntop via find command

Thanks dude, I tried

#find / -name ntop

I followed as far as below. I was mistaken or guide is wrong.
I only run

./autogen.sh

Type the following commands to compile and install ntop:
# ./autogen.sh
Just type make to compile ntop:
# make
Just type make install to install ntop:
# make install
# make install-data-as

I installed ntop and it's running now. I accepted port 3000 from iptables.

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3000 -j ACCEPT

localhost is ok but I can't reach from outside to ntop webgui.
http://ntop-machine-ip:3000 : can't display ntop page.

I tried to enter web users path from Admin+ Configure+Web users on Ntop webpage on ntopmachine but password is not concerned.
I have already two users which are ntop and root and passwords are same.

How can I reach to ntop machine from LAN. :confused:

# netstat -tulpn | grep :3000
tcp        0      0 :::3000                     :::*                        LISTEN      2960/ntop           
# 

I hope you dont have any other iptables rule to block the IP or a subnet.
If you are suspecting the iptables, temporarily stop it and check whether you are able to access the page from the network so that we can identify the culprit.

Please post the iptables -L o/p or the contents of /etc/sysconfig/iptables file

I try to prepare some notes about Ntop Installion..

## for needed librarys that needed ntop (+rrdtool )

# yum install cairo-devel libxml2-devel pango-devel pango libpng-devel \
freetype freetype-devel libart_lgpl-devel libpcap-devel libpcap gdbm-devel

## for rrdtool install ( that needed by ntop for stores and collects datas in own database )

# wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.5.tar.gz
# tar -zxvf rrdtool-1.4.5.tar.gz
# export PKG_CONFIG_PATH=/usr/lib/pkgconfig/
# ./configure
# make && make install

## for GeoIP install ( ip adress informations..)

# wget http://www.maxmind.com/download/geoip/api/c/GeoIP.tar.gz 
# tar xzvf GeoIP.tar.gz 
# ./configure 
# make && make install

## for ntop install (finally install network monitor)

# wget http://cdnetworks-us-1.dl.sourceforge.net/project/ntop/ntop/ntop-4.0.1/ntop-4.0.1.tar.gz
# tar xvzf ntop4.0.1.tar.gz
# cd ntop-4.0.1/
# ./autogen.sh --with-rrd-home=/opt/rrdtool-1.4.5/
# make && make install
# useradd -M -s /sbin/nologin -r ntop
# chown -R ntop:ntop /usr/local/share/ntop/ /usr/local/var/ntop/ /usr/local/share/GeoIP
# /usr/local/bin/ntop -d -u ntop -P /usr/local/var/ntop --skip-version-check -L --use-syslog=daemon

or try install so that rpm way :wink:

regards
ygemici

Thanks for reply you are perfect.

I have installed ntop again but I give error messages like below.
What is the meaning of "open of /usr/local/var/ntop/prefsCache.db failed: Can't be writer"
What do I need to do for this problem. mysql or something like that. What did I do wrong? I can't reach admin panel because password isn't compatible. pictures are attached. All of the data is removing when I stop ntop. I think ntop can't write any data in own file. but why?

# ntop
Wed Jun 22 10:38:00 2011  NOTE: Interface merge enabled by default
Wed Jun 22 10:38:00 2011  Initializing gdbm databases
Wed Jun 22 10:38:00 2011  **ERROR** ....open of /usr/local/var/ntop/prefsCache.db failed: Can't be writer
Wed Jun 22 10:38:00 2011  Possible solution: please use '-P <directory>'
Wed Jun 22 10:38:00 2011  **FATAL_ERROR** GDBM open failed, ntop shutting down...
Wed Jun 22 10:38:00 2011  CLEANUP[t3086170640]: ntop caught signal 2 [state=2]
Wed Jun 22 10:38:00 2011  ntop is now quitting...
# 
#ntop -P /usr/local/var/ntop/
Wed Jun 22 11:08:53 2011  **WARNING** RRD:  rrd_update(/usr/local/var/ntop/rrd/interfaces/eth0/throughput.rrd)  error: opening '/usr/local/var/ntop/rrd/interfaces/eth0/throughput.rrd':  strerror_r failed. sorry!
# ls -l /usr/local/var/ntop/
total 6008
-rwxrwxrwx 1 root root  157692 Jun 22 10:51 addressQueue.db
-rwxrwxrwx 1 ntop root 4964435 Jun 22 10:51 dnsCache.db
-rwxrwxrwx 1 ntop root   12288 Jun 14 20:17 fingerprint.db
-rwxrwxrwx 1 ntop root   13867 Jun 22 10:51 LsWatch.db
-rwxrwxrwx 1 ntop root 1110238 Jun 14 20:17 macPrefix.db
-rwxrwxrwx 1 ntop root   12546 Jun 20 10:00 ntop_pw.db
-rwxrwxrwx 1 ntop root   13030 Jun 20 14:55 prefsCache.db
drwxrwxrwx 5 ntop root    4096 Jun 14 21:52 rrd
# 
  • what is the permission on "/usr/local/var/ntop"
# ls -ld usr/local/var/ntop
  • check if any running daemon or instances frstly kill it.
# [[ $(pgrep ntop) ]] && killall ntop

*try start ntop again

# ntop -d -u ntop -P /usr/local/var/ntop --skip-version-check -L --use-syslog=daemon
  • look ntop logs that what happened
# tail -f /var/log/messages

Thanks friend. I have controlled files and folders permissions go by /var/log/messages.
I can reach to configuration page of admin site.

*All of data is removed when service is stoped. Could you offer a suggestion about storing information.
*How can I limit to reach http://ntop:3000 page from LAN. I want that only 3 or 4 person can browse this page. Is iptables enough for limiting the users. or .....?