cancel
Showing results for 
Search instead for 
Did you mean: 

bpstart_notify script hangs when a script is called via ssh on a remote server

Tarminator
Level 2
Partner

Hi Folks,

 

I'm hoping someone might be able to help me out, Some background info first:

 

NBU v6.5.2A ; Sol10 Master; RHEL4x64 Media; WIN2k3 Media

 

bpstart_notify.POLICY.SCHED.FULL created on the RHEL media server, this script in turn calls a script on the master server via ssh (Key Auth configured)

 

If I run the script interactivly it completes with a status code 0, but when I manually start a backup the job eventually times out.

 

Even the following fails:

 

ssh user@mediaserver  date >> logfile

 

All local commands work and write their output to a logfile.

 

Does anyone have any syntax examples they would like to share?

 

Thanks in advance,

Nick.

1 ACCEPTED SOLUTION

Accepted Solutions

Tarminator
Level 2
Partner

For anyone interested in the fix for this issue, (I'm surprised - not even one response, surely someone has encountered this issue before? Hopefully others will find this useful though):

 

Calling the script like this works from within bpstart_notify and bpend_notify scripts.  (The script writes output to a log file on the remote client and returns a status 0 or 1):

 

SNAPVAL=`ssh nbuadm@nbumaster /export/home/nbuadm/scripts/client/client.sh TEST`

 

But calling it directly like this didn't:

 

ssh nbuadm@nbumaster '/export/home/nbuadm/scripts/client/client.sh TEST' >>$OUTF 2>&1

 

Regards,

Myself.

View solution in original post

2 REPLIES 2

Tarminator
Level 2
Partner

For anyone interested in the fix for this issue, (I'm surprised - not even one response, surely someone has encountered this issue before? Hopefully others will find this useful though):

 

Calling the script like this works from within bpstart_notify and bpend_notify scripts.  (The script writes output to a log file on the remote client and returns a status 0 or 1):

 

SNAPVAL=`ssh nbuadm@nbumaster /export/home/nbuadm/scripts/client/client.sh TEST`

 

But calling it directly like this didn't:

 

ssh nbuadm@nbumaster '/export/home/nbuadm/scripts/client/client.sh TEST' >>$OUTF 2>&1

 

Regards,

Myself.

nmw
Level 3
I've just encountered this exact problem. I'd spent half a day figuring out what was going wrong. Thankfully searching the forum turned up this solution, which is now working perfectly.

I don't know how you thought of running ssh in a shell command substitution, but it I'm glad you did...