change the service like this<br>=====================================<br><service autostart="0" domain="FirstCluster" exclusive="0"<br>
name="splunksrv-svc" recovery="relocate"><br>
        <fs ref="splunksrvdata"/><br>       <ip ref="192.168.44.4"/><br>       <script ref="splunksrv-cluster"/>      <br>
</service><br>=================================<br>rgmanager knows has an internal order <br>
<br><br><div class="gmail_quote">Il giorno 28 febbraio 2012 11:06, C. L. Martinez <span dir="ltr"><<a href="mailto:carlopmart@gmail.com">carlopmart@gmail.com</a>></span> ha scritto:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Tue, Feb 28, 2012 at 11:01 AM, Digimer <<a href="mailto:linux@alteeve.com">linux@alteeve.com</a>> wrote:<br>
> On 02/28/2012 04:20 AM, C. L. Martinez wrote:<br>
>> Hi all,<br>
>><br>
>>  What does it means?? I guess it is related to status check do it by<br>
>> rgmanager, but executing status option from shell, result is 0<br>
>> ...Then, why rgmanager returns this error??<br>
>><br>
>> Thanks.<br>
><br>
> What version of the cluster? What is the cluster's configuration? What<br>
> service is returning 139?<br>
><br>
> You need to provide much more information than this for anyone to be<br>
> able to help.<br>
><br>
<br>
My rhcs verisons:<br>
cman-3.0.12.1-23.el6.x86_64<br>
rgmanager-3.0.12.1-5.el6.x86_64<br>
<br>
cluster.conf relative to failed service:<br>
<service autostart="0" domain="FirstCluster" exclusive="0"<br>
name="splunksrv-svc" recovery="relocate"><br>
                        <fs ref="splunksrvdata"><br>
                                <ip ref="192.168.44.4"><br>
                                        <script ref="splunksrv-cluster"/><br>
                                </ip><br>
                        </fs><br>
</service><br>
<br>
My service's script:<br>
#!/bin/sh -x<br>
# Splunk:       Controls Splunk on Redhat-based systems<br>
#<br>
# chkconfig: 2345 99 15<br>
# description: Starts and stops Splunk<br>
#<br>
# This will work on Redhat systems (maybe others too)<br>
<br>
# Source function library.<br>
. /etc/init.d/functions<br>
<br>
if [ ! -d /data/splunk/instance/historydb ]; then<br>
        exit 1<br>
fi<br>
<br>
prog="/data/soft/splunk/bin/splunk"<br>
pid_files="/data/soft/splunk/var/run/splunk/splunkd.pid<br>
/data/soft/splunk/var/run/splunk/splunkweb.pid"<br>
options_up="start"<br>
options_down="stop"<br>
<br>
<br>
<br>
start() {<br>
        echo -n "Starting Splunk Server: "<br>
        $prog $options_up > /dev/null 2>&1<br>
        RETVAL=$?<br>
        if [ $RETVAL -eq 0 ]; then<br>
                success<br>
        else<br>
                failure<br>
        fi<br>
        echo<br>
        return $RETVAL<br>
}<br>
<br>
stop() {<br>
        echo -n "Stopping Splunk Server: "<br>
        $prog $options_down > /dev/null 2>&1<br>
        RETVAL=$?<br>
        if [ $RETVAL -eq 0 ]; then<br>
                success<br>
        else<br>
                failure<br>
        fi<br>
        echo<br>
        return $RETVAL<br>
}<br>
<br>
<br>
mystatus() {<br>
        for i in $pid_files; do<br>
                status -p $i > /dev/null 2>&1<br>
                status=$?<br>
                if [ $status -eq 0 ]; then<br>
                        continue<br>
                        exit 0<br>
                else<br>
                        exit $status<br>
                fi<br>
        done<br>
}<br>
<br>
<br>
<br>
case "$1" in<br>
  start)<br>
        start<br>
        ;;<br>
  stop)<br>
        stop<br>
        ;;<br>
  restart)<br>
        stop<br>
        sleep 4<br>
        start<br>
        ;;<br>
  status)<br>
        exit 0<br>
        ;;<br>
 mystatus)<br>
        mystatus<br>
        ;;<br>
  *)<br>
        echo $"Usage: $0 {start|stop|restart|status}"<br>
        exit 1<br>
esac<br>
<br>
exit $?<br>
<br>
Executing from command line:<br>
<br>
[root@clunode01 init.d]# ./splunksrv-cluster mystatus<br>
+ . /etc/init.d/functions<br>
++ TEXTDOMAIN=initscripts<br>
++ umask 022<br>
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin<br>
++ export PATH<br>
++ '[' -z '' ']'<br>
++ COLUMNS=80<br>
++ '[' -z '' ']'<br>
+++ /sbin/consoletype<br>
++ CONSOLETYPE=pty<br>
++ '[' -f /etc/sysconfig/i18n -a -z '' -a -z '' ']'<br>
++ . /etc/profile.d/lang.sh<br>
++ unset LANGSH_SOURCED<br>
++ '[' -z '' ']'<br>
++ '[' -f /etc/sysconfig/init ']'<br>
++ . /etc/sysconfig/init<br>
+++ BOOTUP=color<br>
+++ RES_COL=60<br>
+++ MOVE_TO_COL='echo -en \033[60G'<br>
+++ SETCOLOR_SUCCESS='echo -en \033[0;32m'<br>
+++ SETCOLOR_FAILURE='echo -en \033[0;31m'<br>
+++ SETCOLOR_WARNING='echo -en \033[0;33m'<br>
+++ SETCOLOR_NORMAL='echo -en \033[0;39m'<br>
+++ PROMPT=yes<br>
+++ AUTOSWAP=no<br>
+++ ACTIVE_CONSOLES='/dev/tty[1-2]'<br>
+++ SINGLE=/sbin/sushell<br>
++ '[' pty = serial ']'<br>
++ __sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d'<br>
+ '[' '!' -d /data/splunk/instance/historydb ']'<br>
+ prog=/data/soft/splunk/bin/splunk<br>
+ pid_files='/data/soft/splunk/var/run/splunk/splunkd.pid<br>
/data/soft/splunk/var/run/splunk/splunkweb.pid'<br>
+ options_up=start<br>
+ options_down=stop<br>
+ case "$1" in<br>
+ mystatus<br>
+ for i in '$pid_files'<br>
+ status -p /data/soft/splunk/var/run/splunk/splunkd.pid<br>
+ local base pid lock_file= pid_file=<br>
+ '[' 2 = 0 ']'<br>
+ '[' -p = -p ']'<br>
+ pid_file=/data/soft/splunk/var/run/splunk/splunkd.pid<br>
+ shift 2<br>
+ '[' '' = -l ']'<br>
+ base=<br>
+ __pids_var_run '' /data/soft/splunk/var/run/splunk/splunkd.pid<br>
+ local base=<br>
+ local pid_file=/data/soft/splunk/var/run/splunk/splunkd.pid<br>
+ pid=<br>
+ '[' -f /data/soft/splunk/var/run/splunk/splunkd.pid ']'<br>
+ local line p<br>
+ '[' '!' -r /data/soft/splunk/var/run/splunk/splunkd.pid ']'<br>
+ :<br>
+ read line<br>
+ '[' -z 28254 ']'<br>
+ for p in '$line'<br>
+ '[' -z '' -a -d /proc/28254 ']'<br>
+ pid=' 28254'<br>
+ :<br>
+ read line<br>
+ '[' -z 28255 ']'<br>
+ for p in '$line'<br>
+ '[' -z '' -a -d /proc/28255 ']'<br>
+ pid=' 28254 28255'<br>
+ :<br>
+ read line<br>
+ '[' -z '' ']'<br>
+ break<br>
+ '[' -n ' 28254 28255' ']'<br>
+ return 0<br>
+ RC=0<br>
+ '[' -z /data/soft/splunk/var/run/splunk/splunkd.pid -a -z ' 28254 28255' ']'<br>
+ '[' -n ' 28254 28255' ']'<br>
+ echo ' (pid  28254 28255) is running...'<br>
 (pid  28254 28255) is running...<br>
+ return 0<br>
+ status=0<br>
+ '[' 0 -eq 0 ']'<br>
+ continue<br>
+ for i in '$pid_files'<br>
+ status -p /data/soft/splunk/var/run/splunk/splunkweb.pid<br>
+ local base pid lock_file= pid_file=<br>
+ '[' 2 = 0 ']'<br>
+ '[' -p = -p ']'<br>
+ pid_file=/data/soft/splunk/var/run/splunk/splunkweb.pid<br>
+ shift 2<br>
+ '[' '' = -l ']'<br>
+ base=<br>
+ __pids_var_run '' /data/soft/splunk/var/run/splunk/splunkweb.pid<br>
+ local base=<br>
+ local pid_file=/data/soft/splunk/var/run/splunk/splunkweb.pid<br>
+ pid=<br>
+ '[' -f /data/soft/splunk/var/run/splunk/splunkweb.pid ']'<br>
+ local line p<br>
+ '[' '!' -r /data/soft/splunk/var/run/splunk/splunkweb.pid ']'<br>
+ :<br>
+ read line<br>
+ '[' -z 28316 ']'<br>
+ for p in '$line'<br>
+ '[' -z '' -a -d /proc/28316 ']'<br>
+ pid=' 28316'<br>
+ :<br>
+ read line<br>
+ '[' -z '' ']'<br>
+ break<br>
+ '[' -n ' 28316' ']'<br>
+ return 0<br>
+ RC=0<br>
+ '[' -z /data/soft/splunk/var/run/splunk/splunkweb.pid -a -z ' 28316' ']'<br>
+ '[' -n ' 28316' ']'<br>
+ echo ' (pid  28316) is running...'<br>
 (pid  28316) is running...<br>
+ return 0<br>
+ status=0<br>
+ '[' 0 -eq 0 ']'<br>
+ continue<br>
+ exit 0<br>
<br>
 ... always works ...<br>
<br>
--<br>
Linux-cluster mailing list<br>
<a href="mailto:Linux-cluster@redhat.com">Linux-cluster@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/linux-cluster" target="_blank">https://www.redhat.com/mailman/listinfo/linux-cluster</a></blockquote></div><br><br clear="all"><br>-- <br>esta es mi vida e me la vivo hasta que dios quiera<br>