Pidfile wird nicht ausgewertet

From: Nicola Tiling <nti(at)w4w.net>
Date: Mon, 29 Mar 2010 22:58:44 +0200

Ich habe Probleme mit dem restart von einem Dienst namens "exilog" (ein Perl Programm). Als Fehlermeldung kommt, exilog würde nicht laufen und es würde kein pidfile existieren.

Was aber beides Käse ist:

###
1055 [mail] =ls -la /var/run/exilog.pid
-rw-r--r-- 1 root wheel 4 16 Mar 09:37 /var/run/exilog.pid
###

###
1056 [mail] =less !$
less /var/run/exilog.pid
1059
/var/run/exilog.pid (END)
###

###
1008 [mail] =file /var/run/exilog.pid
/var/run/exilog.pid: ASCII text, with no line terminators
###

ABER:

###
1063 [mail] =/usr/local/etc/rc.d/exilog restart
exilog not running? (check /var/run/exilog.pid).
Starting exilog
###

Das führt dann dazu dass exilog doppelt und dreifach läuft.

Ich habe mal das Startscript mit "set -xv" ausgeben lassen (s.u.).
Darin ist u.a. zu sehen:

###
"+ debug pid file (/var/run/exilog.pid): not readable."
###

Was ja aber auch nicht stimmt. "exilog" läuft auch mit root-Rechten. Die Meldung kommt ja wohl vom FreeBSD rc Subsystem - Hat vielleicht jmd. eine Idee?

Grüsse
Nicola

: ${exilog_enable="NO"}
+ : YES

run_rc_command "$1"
+ run_rc_command restart
+ _return=0
+ rc_arg=restart
+ [ -z exilog ]
+ shift 1
+ rc_extra_args=
+ _rc_prefix=
+ eval _override_command=$exilog_program
+ _override_command=
+ command=/usr/local/sbin/exilog_agent.pl
+ _keywords=start stop restart rcvar
+ rc_pid=
+ _pidcmd=
+ _procname=/usr/local/sbin/exilog_agent.pl
+ [ -n /usr/local/sbin/exilog_agent.pl ]
+ [ -n /var/run/exilog.pid ]
+ _pidcmd=rc_pid=$(check_pidfile /var/run/exilog.pid /usr/local/sbin/exilog_agent.pl /usr/bin/perl)
+ [ -n rc_pid=$(check_pidfile /var/run/exilog.pid /usr/local/sbin/exilog_agent.pl /usr/bin/perl) ]
+ _keywords=start stop restart rcvar status poll
+ [ -z restart ]
+ [ -n ]
+ eval rc_flags=$exilog_flags
+ rc_flags=
+ eval _chdir=$exilog_chdir _chroot=$exilog_chroot _nice=$exilog_nice _user=$exilog_user _group=$exilog_group _groups=$exilog_groups
+ _chdir= _chroot= _nice= _user= _group= _groups=
+ [ -n ]
+ [ -n exilog_enable -a restart != rcvar ]
+ checkyesno exilog_enable
+ eval _value=$exilog_enable
+ _value=YES
+ debug checkyesno: exilog_enable is set to YES.
+ return 0
+ eval rc_pid=$(check_pidfile /var/run/exilog.pid /usr/local/sbin/exilog_agent.pl /usr/bin/perl)
+ check_pidfile /var/run/exilog.pid /usr/local/sbin/exilog_agent.pl /usr/bin/perl
+ _pidfile=/var/run/exilog.pid
+ _procname=/usr/local/sbin/exilog_agent.pl
+ _interpreter=/usr/bin/perl
+ [ -z /var/run/exilog.pid -o -z /usr/local/sbin/exilog_agent.pl ]
+ [ ! -f /var/run/exilog.pid ]
+ debug pid file (/var/run/exilog.pid): not readable.
+ return
+ rc_pid=
+ [ start != restart ]
+ continue
+ [ stop != restart ]
+ continue
+ [ restart != restart ]
+ eval _cmd=$restart_cmd _precmd=$restart_precmd _postcmd=$restart_postcmd
+ _cmd= _precmd= _postcmd=
+ [ -n ]
+ false
+ _rc_restart_done=true
+ _run_rc_precmd
+ check_required_before restart
+ local _f
+ return 0
+ [ -n ]
+ check_required_after restart
+ local _f _args
+ return 0
+ return 0
+ run_rc_command stop
+ _return=0
+ rc_arg=stop
+ [ -z exilog ]
+ shift 1
+ rc_extra_args=
+ _rc_prefix=
+ eval _override_command=$exilog_program
+ _override_command=
+ command=/usr/local/sbin/exilog_agent.pl
+ _keywords=start stop restart rcvar
+ rc_pid=
+ _pidcmd=
+ _procname=/usr/local/sbin/exilog_agent.pl
+ [ -n /usr/local/sbin/exilog_agent.pl ]
+ [ -n /var/run/exilog.pid ]
+ _pidcmd=rc_pid=$(check_pidfile /var/run/exilog.pid /usr/local/sbin/exilog_agent.pl /usr/bin/perl)
+ [ -n rc_pid=$(check_pidfile /var/run/exilog.pid /usr/local/sbin/exilog_agent.pl /usr/bin/perl) ]
+ _keywords=start stop restart rcvar status poll
+ [ -z stop ]
+ [ -n ]
+ eval rc_flags=$exilog_flags
+ rc_flags=
+ eval _chdir=$exilog_chdir _chroot=$exilog_chroot _nice=$exilog_nice _user=$exilog_user _group=$exilog_group _groups=$exilog_groups
+ _chdir= _chroot= _nice= _user= _group= _groups=
+ [ -n ]
+ [ -n exilog_enable -a stop != rcvar ]
+ checkyesno exilog_enable
+ eval _value=$exilog_enable
+ _value=YES
+ debug checkyesno: exilog_enable is set to YES.
+ return 0
+ eval rc_pid=$(check_pidfile /var/run/exilog.pid /usr/local/sbin/exilog_agent.pl /usr/bin/perl)
+ check_pidfile /var/run/exilog.pid /usr/local/sbin/exilog_agent.pl /usr/bin/perl
+ _pidfile=/var/run/exilog.pid
+ _procname=/usr/local/sbin/exilog_agent.pl
+ _interpreter=/usr/bin/perl
+ [ -z /var/run/exilog.pid -o -z /usr/local/sbin/exilog_agent.pl ]
+ [ ! -f /var/run/exilog.pid ]
+ debug pid file (/var/run/exilog.pid): not readable.
+ return
+ rc_pid=
+ [ start != stop ]
+ continue
+ [ stop != stop ]
+ eval _cmd=$stop_cmd _precmd=$stop_precmd _postcmd=$stop_postcmd
+ _cmd= _precmd= _postcmd=
+ [ -n ]
+ [ -z ]
+ [ -n ]
+ _run_rc_notrunning
+ local _pidmsg
+ [ -n /var/run/exilog.pid ]
+ _pidmsg= (check /var/run/exilog.pid).
+ echo exilog not running? (check /var/run/exilog.pid).
exilog not running? (check /var/run/exilog.pid).
+ return 1
+ run_rc_command start
+ _return=0
+ rc_arg=start
+ [ -z exilog ]
+ shift 1
+ rc_extra_args=
+ _rc_prefix=
+ eval _override_command=$exilog_program
+ _override_command=
+ command=/usr/local/sbin/exilog_agent.pl
+ _keywords=start stop restart rcvar
+ rc_pid=
+ _pidcmd=
+ _procname=/usr/local/sbin/exilog_agent.pl
+ [ -n /usr/local/sbin/exilog_agent.pl ]
+ [ -n /var/run/exilog.pid ]
+ _pidcmd=rc_pid=$(check_pidfile /var/run/exilog.pid /usr/local/sbin/exilog_agent.pl /usr/bin/perl)
+ [ -n rc_pid=$(check_pidfile /var/run/exilog.pid /usr/local/sbin/exilog_agent.pl /usr/bin/perl) ]
+ _keywords=start stop restart rcvar status poll
+ [ -z start ]
+ [ -n ]
+ eval rc_flags=$exilog_flags
+ rc_flags=
+ eval _chdir=$exilog_chdir _chroot=$exilog_chroot _nice=$exilog_nice _user=$exilog_user _group=$exilog_group _groups=$exilog_groups
+ _chdir= _chroot= _nice= _user= _group= _groups=
+ [ -n ]
+ [ -n exilog_enable -a start != rcvar ]
+ checkyesno exilog_enable
+ eval _value=$exilog_enable
+ _value=YES
+ debug checkyesno: exilog_enable is set to YES.
+ return 0
+ eval rc_pid=$(check_pidfile /var/run/exilog.pid /usr/local/sbin/exilog_agent.pl /usr/bin/perl)
+ check_pidfile /var/run/exilog.pid /usr/local/sbin/exilog_agent.pl /usr/bin/perl
+ _pidfile=/var/run/exilog.pid
+ _procname=/usr/local/sbin/exilog_agent.pl
+ _interpreter=/usr/bin/perl
+ [ -z /var/run/exilog.pid -o -z /usr/local/sbin/exilog_agent.pl ]
+ [ ! -f /var/run/exilog.pid ]
+ debug pid file (/var/run/exilog.pid): not readable.
+ return
+ rc_pid=
+ [ start != start ]
+ eval _cmd=$start_cmd _precmd=$start_precmd _postcmd=$start_postcmd
+ _cmd= _precmd= _postcmd=
+ [ -n ]
+ [ -z -a -n ]
+ [ ! -x /usr/local/sbin/exilog_agent.pl ]
+ _run_rc_precmd
+ check_required_before start
+ local _f
+ [ ! -r /usr/local/etc/exilog.conf ]
+ return 0
+ [ -n ]
+ check_required_after start
+ local _f _args
+ return 0
+ return 0
+ echo Starting exilog.
Starting exilog.
+ [ -n ]
+ _doit=/usr/local/sbin/exilog_agent.pl
+ [ -n ]
+ [ -n ]
+ _run_rc_doit /usr/local/sbin/exilog_agent.pl
+ debug run_rc_command: doit: /usr/local/sbin/exilog_agent.pl
+ eval /usr/local/sbin/exilog_agent.pl
+ /usr/local/sbin/exilog_agent.pl
+ _return=141
+ [ 141 -ne 0 ]
+ [ -z ]
+ return 1
+ return 1
+ _return=1
+ [ 1 -ne 0 ]
+ [ -z ]
+ return 1

To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Mon 29 Mar 2010 - 22:58:54 CEST

search this site