Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
cancel
Showing results for 
Search instead for 
Did you mean: 

rexec do not end

SOLVED
Go to solution
Sylvain CROUET
Respected Contributor

rexec do not end

Hi.

I try to run a script installed on a Solaris machine from a HP-UX server. I use the command rexec <script_name>. The script is correctly executed and finished without problem (I checked it by inserting set -x within the script), but I do not get the prompt back or it needs several minutes.

Any idea to explain and/or correct this?
8 REPLIES
Simon Hargrave
Honored Contributor

Re: rexec do not end

Try putting an "exit 0" at the very beginning of your script to see whether it's your script causing the problem, or the act of rexec'ing itself. This should eliminate either network config or script config.
Muthukumar_5
Honored Contributor

Re: rexec do not end

hai,

Check the amount time it is using to execute on solaris machine with time and the remote execution from HP-UX.

Try to use set +x in the end of script to close the debug mode. Use the exit 0 to exit from the script.

Is solarise machine having authentication setup? If so it will take some time. But it might not be hung.

Regards,
Muthukumar.



Easy to suggest when don't know about the problem!
Sylvain CROUET
Respected Contributor

Re: rexec do not end

There is already an 'exit 0' at the end of the script, but when I put it at the beginning, there is no more problem, I get the prompt back immediately
Simon Hargrave
Honored Contributor
Solution

Re: rexec do not end

In that case, something in your script must be causing the problem.

I suggest you keep running the script, each time move the "exit 0" further down the script. When it exhibits your problems, you'll know exactly which command/section is causing your problem.

Perhaps also attach the script, so someone may recognise what's causing it to hang up?
Sylvain CROUET
Respected Contributor

Re: rexec do not end

Well the problem is on the line $OPCAGT -start, where OPCAGT is /opt/OV/bin/OpC/opcagt. I simply try to restart the OVOU agent.
Sylvain CROUET
Respected Contributor

Re: rexec do not end

In fact I can execute the opcagt command:
- alone locally,
- alone remotely (via rexec),
- within the script locally,
but I have problem remotely within the script.
Any idea?
Geoff Wild
Honored Contributor

Re: rexec do not end

Whoa - why are you kill -9'ing opc processes?

On HP-UX: /sbin/init.d/opcagt stop

On Solaris: /etc/init.d/opcagt stop

Instead of rexec, try it with remsh

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sylvain CROUET
Respected Contributor

Re: rexec do not end

Well, I kill remaining opc processes.
I noticed that sometime there were several opcmona running simultaneously. So I completely stop the OVO agent with 'opcagt -kill', then suppress the remaining opcmona processes and finally restart the agent.