I am executing a bash script from the exec node. It's a fairly long script with 18 sleeps of 15 seconds each and 18 ssh commands and some local commands in between. It seems to stop in the script at somewhat random points. I have seen it stop in the first ssh, the 3rd sleep, and several other places.
When I run the script and the command line it runs to completion every time. Has anyone else seen this behavior?
This is part of the script, there are 9 sections like this for 9 different QMGRs.
echo " " >> $LOGFILE
echo "#############################################" >> $LOGFILE
echo "## Starts SSH to MMIS_PROD_BATCH_CLAIMS ##" >> $LOGFILE
ssh 192.168.0.220 << CMDS
nodered
node20!RED22
mqcli
strmqm MMIS_PROD_BATCH_CLAIMS
exit
exit
CMDS
echo "## Spot 01 MMIS_PROD_BATCH_CLAIMS ##" >> $LOGFILE
sleep 15
echo "## Spot 02 MMIS_PROD_BATCH_CLAIMS ##" >> $LOGFILE
export MQSERVER="MQEXPLORER.SVRCONN/TCP/192.168.0.220(9401)"
QMGR=MMIS_PROD_BATCH_CLAIMS
FIX=$TODAY"_"$QMGR".fixed"
FIXED=/home/wsadmin/mqbackup/$FIX
/opt/mqm/bin/runmqsc -c $QMGR -u nodered < $FIXED >> $LOGFILE
echo "## Spot 03 MMIS_PROD_BATCH_CLAIMS ##" >> $LOGFILE
sleep 15
echo "## Spot 04 MMIS_PROD_BATCH_CLAIMS ##" >> $LOGFILE
ssh 192.168.0.220 << CMDS
nodered
node20!RED22
mqcli
endmqm MMIS_PROD_BATCH_CLAIMS
exit
exit
CMDS
echo "## Stop of MMIS_PROD_BATCH_CLAIMS COMPLETE ##" >> $LOGFILE
echo "#############################################" >> $LOGFILE
Any ideas what could be causing the exec node to "hang" ... though the pid shown by the exec node is gone, so the execution is somehow terminated.
Looking for ideas.
BTW ... all of the variable ARE defined above this section. Like I said, it works fine if I just run the script at the command line.