Created attachment 154574 [details] patch to the smokeping rc.d init file The init script for smokeping doesn't pass the the interpreter (perl) to check_pidfile so will claim smokeping isnt running when it is. adding $command_interpreter as the 3rd argument to check_pidfile fixes this. I have attached a patch for this Also there should probably be a sleep 1 or something in smokeping_stop() as a restart happens too fast and tries to start it again before it dies but I'm unsure of best practices for that situation so I havent tried to patch this.
Hi, I tested somkeping init script in various situations, and it never failed to find the running process. I need more clues before any move so please can you provide the following: - The exact version for the OS and smokeping you are running - The scenario in which smokeping fails Regards - rodrigo
(In reply to Rodrigo Osorio from comment #1) Hi, Sorry I'm so used to the old send-pr walking me though adding environment I forgot. root@seaurchin ~]# uname -a FreeBSD seaurchin.namesco.net 10.1-RELEASE-p6 FreeBSD 10.1-RELEASE-p6 #0: Tue Feb 24 19:00:21 UTC 2015 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 [root@seaurchin ~]# service smokeping restart smokeping not running? (check /usr/local/var/smokeping/pid). smokeping already running? (pid=31723). [root@seaurchin ~]# cat /usr/local/var/smokeping/pid 31723 [root@seaurchin ~]# pkg info | grep smokeping smokeping-2.6.11_1 Latency logging and graphing system Also tested on root@parisnfsen:~ # uname -a FreeBSD parisnfsen.namesco.net 10.1-RELEASE-p5 FreeBSD 10.1-RELEASE-p5 #0 r278901: Tue Feb 17 16:04:18 CET 2015 root@parisnfsen.namesco.net:/usr/src/sys/amd64/compile/PARISNFSEN amd64 root@parisnfsen:~ # pkg info | grep smokeping smokeping-2.6.11_1 Latency logging and graphing system Initially noticed/tested with smokeping-2.6.11. Adding interpreter as per /etc/rc.subr fixes it. I think this is quite recent as i've been running smokeping for years on various freebsd versions, but as the fix was quite easy I didnt spend any time trying to track down when it broke. Thanks, Vince
(In reply to vince from comment #2) In a fresh 10.1 install I don't face this kind of issues, but keep investigating. btw, any additional information can be helpful and if I found nothing, since you request isn't harmful, I think we can commit it.
(In reply to Rodrigo Osorio from comment #3) I built a new VM to try and recreate and as you say I cant reproduceit on a vanilla build. I can only guess its because these two servers started off as 8.x and 9.x and something changed/got missed in the upgrade process. if you're happy to commit the fix that would be great, else i'll try and track down what got missed to cause this. Thanks, Vince
(In reply to Rodrigo Osorio from comment #3) Hi, i have same problem on last 9.3-release (using binary updates) FreeBSD monitor 9.3-RELEASE-p10 FreeBSD 9.3-RELEASE-p10 #0: Tue Feb 24 21:28:03 UTC 2015 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 # pkg info smokeping smokeping-2.6.11 Name : smokeping Version : 2.6.11 Installed on : Mon Mar 23 15:10:02 CET 2015 Origin : net-mgmt/smokeping Architecture : freebsd:9:x86:64 adding $command_interpreter parameter to check_pidfile rutine resolve this issue. Regards buchtajz
(In reply to buchtajz from comment #5) Hi, Testing your patch in my jails breaks smokeping start/stop process, in 10.1. I'm curious to know if someone else have issues with smokeping start / stop process. - rodrigo
I'm not able to reproduce the issue and since your patch breaks the start/stop process I can accept it. If you found more evidences about why halting smokeping doesn't work in you configurations I'm ready to discuss and despite my lack of time, help you. In the meantime, I'll close this ticket.
Hi, I have same problem and investigated it. If config has multiple definition in Probes section, (for example, FPing and FPing6) then $command_interpreter is required. In default config, there exists FPing probe only, $command_interpreter does not work. (FPing probe only) # ps axuww | grep smoke smokeping 45734 13.8 2.5 35884 24968 - Ss 4:03PM 0:00.01 /usr/local/bin/smokeping [FPing] (perl) # cat /usr/local/var/smokeping/pid 45734 (FPing and FPing6 defined) # ps axuww | grep smoke smokeping 45794 5.5 2.4 35884 24852 - Ss 4:05PM 0:00.02 /usr/local/bin/perl /usr/local/bin/smokeping --logfile=/var/log/smokeping.log smokeping 45795 2.4 2.4 35884 24856 - S 4:05PM 0:00.01 /usr/local/bin/smokeping [FPing] (perl) # cat /usr/local/var/smokeping/pid 45794 Thanks,
reopen for investigation as we have more evidences
Created attachment 157273 [details] patch for smokeping.in Hi, I have the same problem and make a patch for the script.
Created attachment 157298 [details] patch for smokeping.in
A commit references this bug: Author: rodrigo Date: Sun Jun 14 09:16:58 UTC 2015 New revision: 389609 URL: https://svnweb.freebsd.org/changeset/ports/389609 Log: Fix smokeping rc.d script who fails to check pid correctly PR: 198736 Submitted by: vince@unsane.co.uk Changes: head/net-mgmt/smokeping/Makefile head/net-mgmt/smokeping/files/smokeping.in
(In reply to Kan Sasaki from comment #11) Sasaki, I commited the first patch, let me know if it fulfills your needs if not please reopen the tiket.
committed thanks, and sorry for the delay