It looks like the init script looks for ntop.pid in /var/run but when ntop starts, it places ntop.pid in /var/lib/ntop. Therefore when it attempts to stop the process, it can't find the pid file because it's looking in the wrong place. Reproducible: Always Actual Results: ntop does not stop when attempting to stop it with its init script Expected Results: ntop should stop emerge --info Portage 2.1.6.4 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.28-gentoo i686) ================================================================= System uname: Linux-2.6.28-gentoo-i686-Genuine_Intel-R-_CPU_T2300_@_1.66GHz-with-glibc2.0 Timestamp of tree: Wed, 07 Jan 2009 14:15:03 +0000 ccache version 2.4 [disabled] app-shells/bash: 3.2_p39 dev-java/java-config: 1.3.7-r1, 2.1.6-r1 dev-lang/python: 2.4.4-r13, 2.5.2-r7 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.4.6-r1 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.4.1-r1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.63 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages metadata-transfer parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://portage.home http://lug.mtu.edu/gentoo/ http://gentoo.netnitco.net " LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="en ru" MAKEOPTS="-j6" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp/portage" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/sajinet /usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi adns ads alsa apache2 async audiofile automount avi bcmath bdf berkdb bzip2 cairo calendar caps cddb cdparanoia cdr cjk clamav cli cpudetection cracklib crypt ctype cups curl curlwrappers dbus directfb djvu dri dts dvb dvd dvdnav dvdread encode exif fam fbcon ffmpeg flac foomaticdb fortran ftp gd gdbm gif glib gmp gnutls gpm gstreamer gtk gtk2 hal hash iconv imagemagick imap imlib innodb ipv6 isdnlog java javascript jpeg jpeg2k json kde kipi kson lcms ldap ldap-sasl live logrotate lzo mad matroska mcal mhash midi mime mjpeg mmap mmx mmxext mng mp2 mp3 mp4 mpeg mplayer msession msn mssql mudflap mysql mysqli ncurses network nls nptl nptlonly nsplugin nss nvidia offensive ogg openal opengl openmp osc oss pam passwordsave pch pcntl pcre pdf pdo perl php png posix ppds pppd python qt3 qt3support qt4 quicktime readline reflection rtc samba sasl sdl seamonkey session simplexml soap sockets spell spl sqlite sse ssl subversion suexec suhosin svg swat sysfs syslog tcpd theora threads tidy tiff tokenizer transcode truetype unicode usb v4l v4l2 vcd vorbis wddx win32codecs winbind wxwindows x264 x86 xforms xml xorg xpm xsl xv xvid zip zlib" ALSA_CARDS="hda-intel ens1371" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" USERLAND="GNU" VIDEO_CARDS="intel i810 fbdev vesa vmware" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I just tested =net-analyzer/ntop-3.3.8 and ntop.pid is placed correctly in /var/run in this version.
Hello, I have net-analyzer/ntop-3.3.10-r1 but I still have this problem. When I shutdown the system I get: start-stop-daemon: fopen `/var/run/ntop.pid': No such file or directory But the strange fact is that I made some changes to the /etc/init.d/ntop initscript i.e.: I changed the line start-stop-daemon --stop --retry 30 --pidfile /var/run/ntop.pid to start-stop-daemon --stop --retry 30 --pidfile /var/lib/ntop/ntop.pid because performing a `locate ntop.pid' it given me /var/lib/ntop/ntop.pid. Then, at the next shutdown I got: start-stop-daemon: no matching processes found. So I changed again the previous line to the original state and all seemed to be OK. But now, after another reboot the problem is still here! At the moment if I perform a `locate ntop.pid' again, it returns nothing. So the ntop.pid file is neither in /var/run, nor in in /var/lib/ntop. But, if now I restart ntop `/etc/init.d/ntop restart' i get: * Stopping ntop ... * start-stop-daemon: fopen `/var/run/ntop.pid': No such file or directory [ ok ] * Starting ntop ... Fri Jan 1 17:44:25 2010 NOTE: Interface merge enabled by default Fri Jan 1 17:44:25 2010 Initializing gdbm databases And the file /var/run/ntop.pid is right there!!! O_O Of course, if I restart ntop again no warning and error messages appear. I don't understand why these things happen, but they are very strange. Any idea?
By the way, I found out that each time ntop want to start at boot, it fails (???) but I don't see any significant message about it. Actually, if I do: # /etc/init.d/ntop status I get: * status: crashed But, why it is crashing?
This bug is not valid for any version currently in portage. Please close. Thanks flea ~ # /etc/init.d/ntop start ntop | * Caching service dependencies ... [ ok ] ntop | * Starting ntop ... ntop |Fri Feb 25 22:42:06 2011 NOTE: Interface merge enabled by default ntop |Fri Feb 25 22:42:06 2011 Initializing gdbm databases [ ok ] flea ~ # /etc/init.d/ntop stop ntop | * Stopping ntop ... [ ok ] flea ~ # ps aux | grep ntop root 15123 0.0 0.0 6252 584 pts/1 S+ 22:43 0:00 grep --color=always ntop flea ~ # emerge --nodep -vp '=ntop-3.3.10-r2' These are the packages that would be merged, in order: ... done! [ebuild R ] net-analyzer/ntop-3.3.10-r2 USE="ipv6 ssl tcpd" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB flea ~ #
(In reply to comment #4) > This bug is not valid for any version currently in portage. Please close. No, don't close it. This problem still remains instead, just right every time when I shut down the computer. Maybe the problem is due to the fact that the daemon doesn't correctly start at boot time. Actually, if I try to start and stop manually as Rick does, the problem doesn't exist and the ntop.pid can be found.
That is very odd, I'll try to reproduce that on my end and see what is going on.
(In reply to comment #6) > That is very odd, I'll try to reproduce that on my end and see what is going > on. > This is very odd to me too actually, but that's what it happens! :( Thank you for your patience.
This seems to be fixed in 4.0.x so please test 4.0.x and reopen this bug if this issue is still persistent.