Re: What does it means "rgmanager status 139"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



change the service like this
=====================================
<service autostart="0" domain="FirstCluster" exclusive="0"
name="splunksrv-svc" recovery="relocate">
       <fs ref="splunksrvdata"/>
       <ip ref="192.168.44.4"/>
       <script ref="splunksrv-cluster"/>     
</service>
=================================
rgmanager knows has an internal order


Il giorno 28 febbraio 2012 11:06, C. L. Martinez <carlopmart@xxxxxxxxx> ha scritto:
On Tue, Feb 28, 2012 at 11:01 AM, Digimer <linux@xxxxxxxxxxx> wrote:
> On 02/28/2012 04:20 AM, C. L. Martinez wrote:
>> Hi all,
>>
>>  What does it means?? I guess it is related to status check do it by
>> rgmanager, but executing status option from shell, result is 0
>> ...Then, why rgmanager returns this error??
>>
>> Thanks.
>
> What version of the cluster? What is the cluster's configuration? What
> service is returning 139?
>
> You need to provide much more information than this for anyone to be
> able to help.
>

My rhcs verisons:
cman-3.0.12.1-23.el6.x86_64
rgmanager-3.0.12.1-5.el6.x86_64

cluster.conf relative to failed service:
<service autostart="0" domain="FirstCluster" exclusive="0"
name="splunksrv-svc" recovery="relocate">
                       <fs ref="splunksrvdata">
                               <ip ref="192.168.44.4">
                                       <script ref="splunksrv-cluster"/>
                               </ip>
                       </fs>
</service>

My service's script:
#!/bin/sh -x
# Splunk:       Controls Splunk on Redhat-based systems
#
# chkconfig: 2345 99 15
# description: Starts and stops Splunk
#
# This will work on Redhat systems (maybe others too)

# Source function library.
. /etc/init.d/functions

if [ ! -d /data/splunk/instance/historydb ]; then
       exit 1
fi

prog="/data/soft/splunk/bin/splunk"
pid_files="/data/soft/splunk/var/run/splunk/splunkd.pid
/data/soft/splunk/var/run/splunk/splunkweb.pid"
options_up="start"
options_down="stop"



start() {
       echo -n "Starting Splunk Server: "
       $prog $options_up > /dev/null 2>&1
       RETVAL=$?
       if [ $RETVAL -eq 0 ]; then
               success
       else
               failure
       fi
       echo
       return $RETVAL
}

stop() {
       echo -n "Stopping Splunk Server: "
       $prog $options_down > /dev/null 2>&1
       RETVAL=$?
       if [ $RETVAL -eq 0 ]; then
               success
       else
               failure
       fi
       echo
       return $RETVAL
}


mystatus() {
       for i in $pid_files; do
               status -p $i > /dev/null 2>&1
               status=$?
               if [ $status -eq 0 ]; then
                       continue
                       exit 0
               else
                       exit $status
               fi
       done
}



case "$1" in
 start)
       start
       ;;
 stop)
       stop
       ;;
 restart)
       stop
       sleep 4
       start
       ;;
 status)
       exit 0
       ;;
 mystatus)
       mystatus
       ;;
 *)
       echo $"Usage: $0 {start|stop|restart|status}"
       exit 1
esac

exit $?

Executing from command line:

[root@clunode01 init.d]# ./splunksrv-cluster mystatus
+ . /etc/init.d/functions
++ TEXTDOMAIN=initscripts
++ umask 022
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ export PATH
++ '[' -z '' ']'
++ COLUMNS=80
++ '[' -z '' ']'
+++ /sbin/consoletype
++ CONSOLETYPE=pty
++ '[' -f /etc/sysconfig/i18n -a -z '' -a -z '' ']'
++ . /etc/profile.d/lang.sh
++ unset LANGSH_SOURCED
++ '[' -z '' ']'
++ '[' -f /etc/sysconfig/init ']'
++ . /etc/sysconfig/init
+++ BOOTUP=color
+++ RES_COL=60
+++ MOVE_TO_COL='echo -en \033[60G'
+++ SETCOLOR_SUCCESS='echo -en \033[0;32m'
+++ SETCOLOR_FAILURE='echo -en \033[0;31m'
+++ SETCOLOR_WARNING='echo -en \033[0;33m'
+++ SETCOLOR_NORMAL='echo -en \033[0;39m'
+++ PROMPT=yes
+++ AUTOSWAP=no
+++ ACTIVE_CONSOLES='/dev/tty[1-2]'
+++ SINGLE=/sbin/sushell
++ '[' pty = serial ']'
++ __sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d'
+ '[' '!' -d /data/splunk/instance/historydb ']'
+ prog=/data/soft/splunk/bin/splunk
+ pid_files='/data/soft/splunk/var/run/splunk/splunkd.pid
/data/soft/splunk/var/run/splunk/splunkweb.pid'
+ options_up=start
+ options_down=stop
+ case "$1" in
+ mystatus
+ for i in '$pid_files'
+ status -p /data/soft/splunk/var/run/splunk/splunkd.pid
+ local base pid lock_file= pid_file=
+ '[' 2 = 0 ']'
+ '[' -p = -p ']'
+ pid_file=/data/soft/splunk/var/run/splunk/splunkd.pid
+ shift 2
+ '[' '' = -l ']'
+ base=
+ __pids_var_run '' /data/soft/splunk/var/run/splunk/splunkd.pid
+ local base=
+ local pid_file=/data/soft/splunk/var/run/splunk/splunkd.pid
+ pid=
+ '[' -f /data/soft/splunk/var/run/splunk/splunkd.pid ']'
+ local line p
+ '[' '!' -r /data/soft/splunk/var/run/splunk/splunkd.pid ']'
+ :
+ read line
+ '[' -z 28254 ']'
+ for p in '$line'
+ '[' -z '' -a -d /proc/28254 ']'
+ pid=' 28254'
+ :
+ read line
+ '[' -z 28255 ']'
+ for p in '$line'
+ '[' -z '' -a -d /proc/28255 ']'
+ pid=' 28254 28255'
+ :
+ read line
+ '[' -z '' ']'
+ break
+ '[' -n ' 28254 28255' ']'
+ return 0
+ RC=0
+ '[' -z /data/soft/splunk/var/run/splunk/splunkd.pid -a -z ' 28254 28255' ']'
+ '[' -n ' 28254 28255' ']'
+ echo ' (pid  28254 28255) is running...'
 (pid  28254 28255) is running...
+ return 0
+ status=0
+ '[' 0 -eq 0 ']'
+ continue
+ for i in '$pid_files'
+ status -p /data/soft/splunk/var/run/splunk/splunkweb.pid
+ local base pid lock_file= pid_file=
+ '[' 2 = 0 ']'
+ '[' -p = -p ']'
+ pid_file=/data/soft/splunk/var/run/splunk/splunkweb.pid
+ shift 2
+ '[' '' = -l ']'
+ base=
+ __pids_var_run '' /data/soft/splunk/var/run/splunk/splunkweb.pid
+ local base=
+ local pid_file=/data/soft/splunk/var/run/splunk/splunkweb.pid
+ pid=
+ '[' -f /data/soft/splunk/var/run/splunk/splunkweb.pid ']'
+ local line p
+ '[' '!' -r /data/soft/splunk/var/run/splunk/splunkweb.pid ']'
+ :
+ read line
+ '[' -z 28316 ']'
+ for p in '$line'
+ '[' -z '' -a -d /proc/28316 ']'
+ pid=' 28316'
+ :
+ read line
+ '[' -z '' ']'
+ break
+ '[' -n ' 28316' ']'
+ return 0
+ RC=0
+ '[' -z /data/soft/splunk/var/run/splunk/splunkweb.pid -a -z ' 28316' ']'
+ '[' -n ' 28316' ']'
+ echo ' (pid  28316) is running...'
 (pid  28316) is running...
+ return 0
+ status=0
+ '[' 0 -eq 0 ']'
+ continue
+ exit 0

 ... always works ...

--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster



--
esta es mi vida e me la vivo hasta que dios quiera
--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux