cancel
Showing results for 
Search instead for 
Did you mean: 

ECC6.0 on HA Cluster with Oracle database and Linux Redhat,It cann't work

former_member324993
Active Contributor
0 Kudos

Dear All,

I have installed SAPECC6.0 system on HA Cluster with Oracle as database and Linux Redhat as OS. It works well when I run the scripts

manually,but can't work anyway when add more than one script into the HA Cluster. When I add the only one script into the HA Cluster

I find it runs times and times again and the log shows that the sap service have stared,but I can't visit the server by SAPGUI.

Please advice.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Hi,

Could you clarify the case, please?

Best regards,

Orkun Gedik

former_member324993
Active Contributor
0 Kudos

Dear Orkun Gedik,

We write the HA script:starCI \ StarDI \ StopCI \ stop DI, they are content follow as:

The StartCI file content:

########################################################################################

#!/bin/sh

HOSTNAME=`hostname`

sleep 5

if [ "$HOSTNAME" = "plmprd02" ];

then

echo "start DI on plmprd02"

mount -t gfs /dev/vg_app/lv_sapmnt /sapmnt

mount -t gfs /dev/vg_app/lv_trans /usr/sap/trans

mount -t gfs /dev/vg_app/lv_data /oracle

mount -t gfs /dev/vg_app/lv_pld /usr/sap/PLD/

mount -t gfs /dev/vg_app/lv_di /usr/sap/PLD/D00

sleep 10

su - orapld -c "lsnrctl start"

su - pldadm -c "startsap db "

su - pldadm -c "startsap ASCS01 ascspld"

su - pldadm -c "startsap"

else

echo "start CI on plmpro01..."

mount -t gfs /dev/vg_app/lv_trans /usr/sap/trans

mount -t gfs /dev/vg_app/lv_sapmnt /sapmnt

mount -t gfs /dev/vg_app/lv_data /oracle

mount -t gfs /dev/vg_app/lv_pld /usr/sap/PLD

mount -t gfs /dev/vg_app/lv_ci /usr/sap/PLD/DVEBMGS00

su - orapld -c "lsnrctl start"

su - pldadm -c "startsap db "

sleep 5

su - pldadm -c "startsap ASCS01 ascspld"

su - pldadm -c "startsap "

echo "start DI on plmpro02"

rsh plmprd02 -n "su - pldadm -c 'startsap'"

exit 0

fi

exit 0

Edited by: bill yang on Sep 26, 2011 9:09 AM

former_member324993
Active Contributor
0 Kudos

The StartdI file content:

########################################################################################

#!/bin/sh

SAPNR=00

SAPSID=PLD

SAPINST=D$SAPNR

OUT=/tmp/cluster.out

SAPADM=pldadm

ORAADM=orapld

HOSTNAME=`hostname`

echo "startDialog Instance now ..."

echo `date` >> $OUT

#mount remote filesystem

mount -t gfs /dev/vg_app/lv_trans /usr/sap/trans >> $OUT

mount -t gfs /dev/vg_app/lv_sapmnt /sapmnt >> $OUT

mount -t gfs /dev/vg_app/lv_data /oracle >> $OUT

mount -t gfs /dev/vg_app/lv_pld /usr/sap/PLD >> $OUT

mount -t gfs /dev/vg_app/lv_di /usr/sap/PLD/D00 >> $OUT

su - $SAPADM -c "startsap " >> $OUT

echo "Dialog instance started"

exit 0

former_member324993
Active Contributor
0 Kudos

the StopCI file content

#######################################################################################

#!/bin/ksh

  1. Description: Use to stop CI

SAPNR=00

DI_SVC=172.26.159.22

SAPSID=PLD

ORASID=PLD

SAPINST=DVEBMGS$SAPNR

OUT=/tmp/hacmp.out

HOSTNAME=`hostname`

echo $HOSTNAME

SAPADM=pldadm

ORAADM=orapld

if [ $HOSTNAME = "plmprd01" ]

then

  1. stop dialog instance on plmpro02

if [ "$(ping -c 2 $DI_SVC | grep transmitted | awk '{print $7}')" == "0%" ]

then

echo "stop dialog instance on plmprd02" >> $OUT

rsh plmprd02 -n "/HAscripts/stopDI.sh"

PSNUM=`rsh plmprd02 -n "ps -ef|grep sap|fgrep -v grep |wc -l"`

echo $PSNUM

while [ $PSNUM -ge 3 ]

do

PSLIST=`rsh plmprd02 -n "ps -ef|grep sap |fgrep -v grep "| awk '{print $2} '`

if [[ -n $ ]] then echo "$" | while read PSID

do

echo $PSID

rsh plmprd02 -n "kill -9 $PSID"

done

fi

PSNUM=`rsh plmprd02 -n "ps -ef|grep sap |fgrep -v grep|wc -l"`

done

rsh plmprd02 -n "umount -f /sapmnt"

rsh plmprd02 -n "umount -f /usr/sap/trans"

else

echo IP Address $DI_SVC is not pingable, then continue ...

fi

fi

#----


  1. Stop R3

  2. Stop saposcol, if running

#----


su - $SAPADM -c "stopsap" >> $OUT

su - $SAPADM -c "stopsap ASCS01 ascspld" >> $OUT

ps -ef | grep saposcol | fgrep -v grep > /dev/null 2>&1

if [ $? = 0 ]

then

su - root -c "/sapmnt/$SAPSID/exe/saposcol -k > /dev/null 2>&1"

fi

#----


  1. Stop all R3 Processes left running

  2. Clean shared memory

  3. Remove Logfiles

  4. Remove Logfiles

#----


ps -ef | grep $SAPINST | fgrep -v grep > /dev/null 2>&1

if [ $? = 0 ];then

SAPSEPID=`ps -ef | grep se.sa[p]"$SAPSID"_$SAPINST | awk '{ print $2 }'`

for i in $SAPSEPID

do

kill -2 $i

done

SAPCOPID=`ps -ef | grep co.sa[p]"$SAPSID"_$SAPINST | awk '{ print $2 }'`

for i in $SACOSPID

do

kill -2 $i

done

SAPDWPID=`ps -ef | grep dw.sa[p]"$SAPSID"_$SAPINST | awk '{ print $2 }'`

for i in $SAPDWPID

do

kill -2 $i

done

SAPMSPID=`ps -ef | grep ms.sa[p]"$SAPSID"_$SAPINST | awk '{ print $2 }'`

for i in $SAPMSPID

do

kill -2 $i

done

SAPPID=`ps -ef | grep START_$SAPINST | fgrep -v grep | awk '{ print $2 }'`

for i in $SAPPID

do

kill -2 $i

done

SAPID=`ps -ef | grep "$SAPSID"_$SAPINST | fgrep -v grep | awk '{ print $2 }'`

for i in $SAPID

do

kill -2 $i

done

fi

#----


  1. Clear shared semaphores/memory

#----


su - $SAPADM -c "/sapmnt/$SAPSID/exe/cleanipc $SAPNR remove" >> $OUT

#----


  1. If existing, remove Collector's logfiles

#----


if [ -f /usr/sap/$SAPSID/$SAPINST/data/rslg* ]

then

/usr/bin/rm /usr/sap/$SAPSID/$SAPINST/data/rslg*

fi

su - $SAPADM -c "stopsap db" >> $OUT

su - $ORAADM -c "lsnrctl stop" >> $OUT

kill -9 $(ps -ef | grep db2 | grep -v 'grep' | awk '{print $2'})

#unmount -f /sapmnt

exit 0

former_member324993
Active Contributor
0 Kudos

The STOPDI file content:

#######################################################################################

#!/bin/sh

SAPNR=00

SAPSID=PLD

SAPINST=D$SAPNR

OUT=/tmp/hacmp.out

SAPADM=sapadm

ORAADM=orapld

echo "STOP DI NOW ..."

echo `date` >> $OUT

su - $SAPADM -c "stopsap" >> $OUT

su - $SAPADM -c "stopsap ASCS01 ascspld" >> $OUT

echo "DI STOPPED"

ps -ef | grep saposcol | fgrep -v grep > /dev/null 2>&1

if [ $? = 0 ]

then

su - root -c "/sapmnt/$SAPSID/exe/saposcol -k > /dev/null 2>&1"

fi

echo "SAPOSCOL stopped"

#----


  1. Stop all R3 Processes left running

  2. Clean shared memory

  3. Remove Logfiles

  1. Remove Logfiles

#----


ps -ef | grep $SAPINST | fgrep -v grep > /dev/null 2>&1

if [ $? = 0 ];then

SAPSEPID=`ps -ef | grep se.sa[p]"$SAPSID"_$SAPINST | awk '{ print $2 }'`

for i in $SAPSEPID

do

kill -2 $i

done

SAPCOPID=`ps -ef | grep co.sa[p]"$SAPSID"_$SAPINST | awk '{ print $2 }'`

for i in $SACOSPID

do

kill -2 $i

done

SAPDWPID=`ps -ef | grep dw.sa[p]"$SAPSID"_$SAPINST | awk '{ print $2 }'`

for i in $SAPDWPID

do

kill -2 $i

done

SAPMSPID=`ps -ef | grep ms.sa[p]"$SAPSID"_$SAPINST | awk '{ print $2 }'`

for i in $SAPMSPID

do

kill -2 $i

done

SAPPID=`ps -ef | grep START_$SAPINST | fgrep -v grep | awk '{ print $2 }'`

for i in $SAPPID

do

kill -2 $i

done

SAPID=`ps -ef | grep "$SAPSID"_$SAPINST | fgrep -v grep | awk '{ print $2 }'`

for i in $SAPID

do

kill -2 $i

done

fi

#----


  1. Clear shared semaphores/memory

#----


su - $SAPADM -c "/sapmnt/$SAPSID/exe/cleanipc $SAPNR remove" >> $OUT

#----


  1. If existing, remove Collector's logfiles

#----


if [ -f /usr/sap/$SAPSID/$SAPINST/data/rslg* ]

then

rm /usr/sap/$SAPSID/$SAPINST/data/rslg*

fi

#umount the nfs filesystem

umount -f /sapmnt >> $OUT

umount -f /usr/sap/trans >> $OUT

exit 0

-


The HA structure have two server,when one server down,if we mannul run these script,all service can change to other server,But when we put the script file to HA Dir,when one server down,System can run the script file,But the service cann't change to other server,can you help me?

Former Member
0 Kudos

Hi,

Ok. I am trying to understand your problem. So, is your question; the script are failing when you add a new command in to it?

Best regards,

Orkun Gedik

former_member324993
Active Contributor
0 Kudos

Dear,

No,now our issue's:

If we only put the scripts into the HA_Dir, it runs times and times again and the log shows that the sap service have stared,but I can't

visit the server by SAPGUI.If we mannul run the scripts,the sap service have stared and we can visit the server by SAPGUI.

Former Member
0 Kudos

Hi,

What HA solution is running on your installation? GPFS, ACFS or what???

Best regards,

Orkun Gedik

former_member324993
Active Contributor
0 Kudos

Dear,

We install "GPFS".

Former Member
0 Kudos

Hi,

Did you check traces under /var/adm/ras?

Best regards,

Orkun Gedik

Former Member
0 Kudos

Hi,

Check the document, below;

http://publibfp.dhe.ibm.com/epubs/pdf/bl1pdg10.pdf

Best regards,

Orkun Gedik

former_member324993
Active Contributor
0 Kudos

Dear,

our system haven't /var/adm/ras.

Former Member
0 Kudos

Hi,

Then, check /var/log/messages

Best regards,

Orkun Gedik

former_member324993
Active Contributor
0 Kudos

Dear ,

Sorry,our system haven't DIR: /var