Script failed to run on RHCS, but it is successful on manually

HI,

tomcat_agent script failed to run when RHCS started. But I can run it successfully on manually. could you please check my script and tell me what problem?Below is cluster configuration and script:

[root <at> db05 init.d]# cat /etc/cluster/cluster.conf

<?xml version="1.0"?>

<cluster config_version="4" name="NLS_Test">

        <fence_daemon post_fail_delay="0" post_join_delay="3"/>

        <clusternodes>

                <clusternode name="db05" nodeid="1" votes="1">

                        <fence>

                                <method name="1"/>

                        </fence>

                </clusternode>

                <clusternode name="db07" nodeid="2" votes="1">

                        <fence>

                                <method name="1"/>

                        </fence>

                </clusternode>

        </clusternodes>

        <cman expected_votes="1" two_node="1"/>

        <fencedevices>

                <fencedevice agent="fence_ipmilan" auth="none" ipaddr="10.69.128.25" login="test" name="ilo_db05" passwd="Administrator"/>

                <fencedevice agent="fence_ipmilan" auth="none" ipaddr="10.69.128.27" login="test" name="ilo_db07" passwd="Administrator"/>

        </fencedevices>

        <rm>

                <failoverdomains>

                        <failoverdomain name="ALLFOD" ordered="1" restricted="1">

                                <failoverdomainnode name="db05" priority="3"/>

                                <failoverdomainnode name="db07" priority="4"/>

                        </failoverdomain>

                        <failoverdomain name="ODDFOD" ordered="1" restricted="1">

                                <failoverdomainnode name="db05" priority="3"/>

                        </failoverdomain>

                </failoverdomains>

                <resources>

                        <script file="/etc/init.d/tomcat_agent" name="tomcat_agent"/>

                </resources>

                <service autostart="1" domain="allFOD" name="tomcat" recovery="restart">

                        <ip address="198.18.27.125/24" monitor_link="1"/>

                        <fs device="/dev/mapper/nls_testp2" force_fsck="1" force_unmount="0" fstype="ext3" mountpoint="/opt/nls/float/tomcat" name="tomcat" options="" self_fence="0"/>

                        <script ref="tomcat_agent"/>

                </service>

        </rm>

</cluster>

[root <at> db05 init.d]# cat tomcat_agent

#!/bin/bash

# file: tomcat_agent

# desc: Tomcat service agent, invoked by RHCS

source /etc/init.d/core_agent

TOMCAT_DIR=`ls ${_tomcat_home} | grep tomcat`

TOMCAT_BIN_DIR="${_tomcat_home}/${TOMCAT_DIR}/bin"

RETVAL=1

TOMCAT_STOP="./shutdown.sh"

TOMCAT_START="./startup.sh"

status() {

echo "status test" >> /tmp/wxg.txt

    #TODO: to monitor the port or whatever else in drop1a

    ps aux | grep -v grep | grep ${TOMCAT_DIR} 2>&1 > /dev/null

    return $?

}


start() {

echo "start" >>/tmp/wxg.txt

    sudo -i -u nls sh -c "/opt/nls/float/tomcat/apache-tomcat-6.0.33/bin/startup.sh" 2>&1 > /dev/null

    sleep 3

    status

        return $?

}

stop() {

echo "stop" >>/tmp/wxg.txt

sudo -i -u nls sh -c "/opt/nls/float/tomcat/apache-tomcat-6.0.33/bin/shutdown.sh" 2>&1 > /dev/null

    sleep 3

    status

    if [ $? -ne 0 ]; then return 0; fi

}


case "$1" in

        start)

                start

                RETVAL=$?

        ;;

        stop)

                stop

                RETVAL=$?

        ;;

        status)

                status

                RETVAL=$?

        ;;

        restart)

                echo $1

                stop

                start

                RETVAL=$?

        ;;

        *)

               echo $1

                logger "Usage: $0 {start|stop|status|restart}"

                RETVAL=2

        ;;

esac

exit ${RETVAL}

<div>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">HI,</span><span lang="en-us"></span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">tomcat_agent</span><span lang="en-us"> script failed to run when R</span><span lang="en-us">HCS started.</span><span lang="en-us"> B</span><span lang="en-us">ut</span><span lang="en-us"> I</span><span lang="en-us"> can run it successfully on manually. could you please check my script and tell me what problem?Below is</span><span lang="en-us"> cluster</span><span lang="en-us"> configuration and script:</span><span lang="en-us"></span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">[root <at> db05 init.d]# cat /etc/cluster/cluster.conf</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&lt;?xml version="1.0"?&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&lt;cluster config_version="4" name="NLS_Test"&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fence_daemon post_fail_delay="0" post_join_delay="3"/&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;clusternodes&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;clusternode name="db05" nodeid="1" votes="1"&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fence&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;method name="1"/&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/fence&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/clusternode&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;clusternode name="db07" nodeid="2" votes="1"&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fence&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;method name="1"/&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/fence&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/clusternode&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/clusternodes&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;cman expected_votes="1" two_node="1"/&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fencedevices&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fencedevice agent="fence_ipmilan" auth="none" ipaddr="10.69.128.25" login="test" name="ilo_db05" passwd="Administrator"/&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fencedevice agent="fence_ipmilan" auth="none" ipaddr="10.69.128.27" login="test" name="ilo_db07" passwd="Administrator"/&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/fencedevices&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;rm&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;failoverdomains&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;failoverdomain name="ALLFOD" ordered="1" restricted="1"&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;failoverdomainnode name="db05" priority="3"/&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;failoverdomainnode name="db07" priority="4"/&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/failoverdomain&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;failoverdomain name="ODDFOD" ordered="1" restricted="1"&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;failoverdomainnode name="db05" priority="3"/&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/failoverdomain&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/failoverdomains&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;resources&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;script file="/etc/init.d/tomcat_agent" name="tomcat_agent"/&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/resources&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;service autostart="1" domain="allFOD" name="tomcat" recovery="restart"&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ip address="198.18.27.125/24" monitor_link="1"/&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fs device="/dev/mapper/nls_testp2" force_fsck="1" force_unmount="0" fstype="ext3" mountpoint="/opt/nls/float/tomcat" name="tomcat" options="" self_fence="0"/&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;script ref="tomcat_agent"/&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/service&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/rm&gt;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&lt;/cluster&gt;</span><span lang="en-us"></span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">[root <at> db05 init.d]# cat tomcat_agent</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">#!/bin/bash</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us"># file: tomcat_agent</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us"># desc: Tomcat service agent, invoked by RHCS</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">source /etc/init.d/core_agent</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">TOMCAT_DIR=`ls ${_tomcat_home} | grep tomcat`</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">TOMCAT_BIN_DIR="${_tomcat_home}/${TOMCAT_DIR}/bin"</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">RETVAL=1</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">TOMCAT_STOP="./shutdown.sh"</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">TOMCAT_START="./startup.sh"</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">status() {</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">echo "status test" &gt;&gt; /tmp/wxg.txt</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp; #TODO: to monitor the port or whatever else in drop1a</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp; ps aux | grep -v grep | grep ${TOMCAT_DIR} 2&gt;&amp;1 &gt; /dev/null</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp; return $?</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">}</span></p>
<br><p dir="LTR" align="JUSTIFY"><span lang="en-us">start() {</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">echo "start" &gt;&gt;/tmp/wxg.txt</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp; sudo -i -u nls sh -c "/opt/nls/float/tomcat/apache-tomcat-6.0.33/bin/startup.sh" 2&gt;&amp;1 &gt; /dev/null</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp; sleep 3</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp; status</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return $?</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">}</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">stop() {</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">echo "stop" &gt;&gt;/tmp/wxg.txt</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">sudo -i -u nls sh -c "/opt/nls/float/tomcat/apache-tomcat-6.0.33/bin/shutdown.sh" 2&gt;&amp;1 &gt; /dev/null</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp; sleep 3 </span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp; status</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp; if [ $? -ne 0 ]; then return 0; fi</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">}</span></p>
<br><p dir="LTR" align="JUSTIFY"><span lang="en-us">case "$1" in</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start)</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RETVAL=$?</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stop)</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stop</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; RETVAL=$?</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status)</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RETVAL=$?</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; restart)</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo $1</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stop</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; start</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RETVAL=$?</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *)</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo $1</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; logger "Usage: $0 {start|stop|status|restart}"</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RETVAL=2</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">esac</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us">exit ${RETVAL}</span></p>

<p dir="LTR" align="JUSTIFY"><span lang="en-us"></span></p>

</div>
Marek Grac | 19 Apr 09:04 2012
Picon

Re: Script failed to run on RHCS, but it is successful on manually

On 04/19/2012 07:14 AM, Wang, Kevin G1. (NSN - CN/Cheng Du) wrote:
Script failed to run on RHCS,but it is successful on manually

HI,

tomcat_agent script failed to run when RHCS started. But I can run it successfully on manually. could you please check my script and tell me what

problem?Below is cluster configuration and script:

Is there a reason why you  don't want to use prepared resource agent for tomcat5 or tomcat6 ?

m,
<div>
    On 04/19/2012 07:14 AM, Wang, Kevin G1. (NSN - CN/Cheng Du) wrote:
    <blockquote cite="mid:44A5364BC1FA1E42B1F133529EC2C729020C34EC <at> CNBEEXC007.nsn-intra.net" type="cite">
      Script failed to run on RHCS,but it is successful on
        manually<p dir="LTR" align="JUSTIFY"><span lang="en-us">HI,</span><span lang="en-us"></span></p>
      <p dir="LTR" align="JUSTIFY"><span lang="en-us">tomcat_agent</span><span lang="en-us"> script failed to run when R</span><span lang="en-us">HCS started.</span><span lang="en-us"> B</span><span lang="en-us">ut</span><span lang="en-us"> I</span><span lang="en-us"> can run it successfully on
            manually. could you please
            check my script and tell me what </span></p>
    </blockquote>
    <blockquote cite="mid:44A5364BC1FA1E42B1F133529EC2C729020C34EC <at> CNBEEXC007.nsn-intra.net" type="cite">
      <p dir="LTR" align="JUSTIFY"><span lang="en-us">problem?Below is</span><span lang="en-us"> cluster</span><span lang="en-us"> configuration and script:</span></p>
    </blockquote>
    Is there a reason why you&nbsp; don't want to use prepared resource agent
    for tomcat5 or tomcat6 ? <br><br>
    m,<br>
</div>

Re: Script failed to run on RHCS, but it is successful on manually

HI,Grac

 

Where is prepared resource agent? Can you send me one ? Thanks

 

From: linux-cluster-bounces <at> redhat.com [mailto:linux-cluster-bounces <at> redhat.com] On Behalf Of ext Marek Grac
Sent: Thursday, April 19, 2012 3:05 PM
To: linux-cluster <at> redhat.com
Subject: Re: [Linux-cluster] Script failed to run on RHCS, but it is successful on manually

 

On 04/19/2012 07:14 AM, Wang, Kevin G1. (NSN - CN/Cheng Du) wrote:

HI,

tomcat_agent script failed to run when RHCS started. But I can run it successfully on manually. could you please check my script and tell me what

problem?Below is cluster configuration and script:

Is there a reason why you  don't want to use prepared resource agent for tomcat5 or tomcat6 ?

m,

<div><div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">HI,Grac<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">Where is prepared resource agent? Can you send me one ? Thanks<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<div><div><p class="MsoNormal"><span lang="EN-US">From:</span><span lang="EN-US"> linux-cluster-bounces <at> redhat.com [mailto:linux-cluster-bounces <at> redhat.com] On Behalf Of ext Marek Grac<br>Sent: Thursday, April 19, 2012 3:05 PM<br>To: linux-cluster <at> redhat.com<br>Subject: Re: [Linux-cluster] Script failed to run on RHCS, but it is successful on manually<p></p></span></p></div></div>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">On 04/19/2012 07:14 AM, Wang, Kevin G1. (NSN - CN/Cheng Du) wrote: <p></p></span></p>
<p><span lang="EN-US">HI,</span><span lang="EN-US"><p></p></span></p>
<p><span lang="EN-US">tomcat_agent script failed to run when RHCS started.</span><span lang="EN-US"> </span><span lang="EN-US">But</span><span lang="EN-US"> </span><span lang="EN-US">I</span><span lang="EN-US"> </span><span lang="EN-US">can run it successfully on manually.</span><span lang="EN-US"> </span><span lang="EN-US">could you please check my script and tell me what </span><span lang="EN-US"><p></p></span></p>
<blockquote><p><span lang="EN-US">problem?Below is</span><span lang="EN-US"> </span><span lang="EN-US">cluster</span><span lang="EN-US"> </span><span lang="EN-US">configuration and script:</span><span lang="EN-US"><p></p></span></p></blockquote>
<p class="MsoNormal"><span lang="EN-US">Is there a reason why you&nbsp; don't want to use prepared resource agent for tomcat5 or tomcat6 ? <br><br>m,<p></p></span></p>
</div></div>
Marek Grac | 19 Apr 10:04 2012
Picon

Re: Script failed to run on RHCS, but it is successful on manually

On 04/19/2012 09:52 AM, Wang, Kevin G1. (NSN - CN/Cheng Du) wrote:
Script failed to run on RHCS,but it is successful on manually<!-- /* Font Definitions */ <at> font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1;} <at> font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} <at> font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} <at> font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} <at> font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif"; color:black;} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} p {mso-style-priority:99; mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; font-size:12.0pt; font-family:"Times New Roman","serif"; color:black;} span.EmailStyle18 {mso-style-type:personal-reply; font-family:"Calibri","sans-serif"; color:#1F497D;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt;} <at> page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt;} div.WordSection1 {page:WordSection1;} -->

HI,Grac

 

Where is prepared resource agent? Can you send me one ? Thanks


For the most frequent applications there are prepared resource agents scripts - package resource-agents (or https://github.com/ClusterLabs/resource-agents). More info on https://fedorahosted.org/cluster/wiki/RGManager

m,
<div>
    On 04/19/2012 09:52 AM, Wang, Kevin G1. (NSN - CN/Cheng Du) wrote:
    <blockquote cite="mid:44A5364BC1FA1E42B1F133529EC2C729020F834D <at> CNBEEXC007.nsn-intra.net" type="cite">
      Script failed to run on RHCS,but it is successful on
        manually&lt;!--
/* Font Definitions */
 <at> font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
 <at> font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
 <at> font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
 <at> font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
 <at> font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	color:black;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p
	{mso-style-priority:99;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	color:black;}
span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
 <at> page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
	{page:WordSection1;}
--&gt;<div class="WordSection1">
        <p class="MsoNormal"><span lang="EN-US">HI,Grac<p></p></span></p>
        <p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
        <p class="MsoNormal"><span lang="EN-US">Where is prepared resource agent? Can you send
            me one ? Thanks<p></p></span></p>
        <br>
</div>
    </blockquote>
    For the most frequent applications there are prepared resource
    agents scripts - package resource-agents (or
    <a class="moz-txt-link-freetext" href="https://github.com/ClusterLabs/resource-agents">https://github.com/ClusterLabs/resource-agents</a>). More info on
    <a class="moz-txt-link-freetext" href="https://fedorahosted.org/cluster/wiki/RGManager">https://fedorahosted.org/cluster/wiki/RGManager</a><br><br>
    m,<br>
</div>

Gmane