remote execution of idl script [message #91203] |
Wed, 17 June 2015 03:09  |
trisb
Messages: 18 Registered: November 2010
|
Junior Member |
|
|
Hello IDL hive mind,
after going through the post archives, I could not find a suitable solution to my problem, so here comes a new thread.
I have an IDL script file ~/hw.isc that contains only
print,"Hello world"
Now I want to execute this IDL script (or command, to start with) from the shell of a remote computer. My IDL version is 8.3 and I am operating under a UNIX system. If I do the following, it works:
ssh remote_server_name
idl -e "@~/hw.isc"
It correctly starts IDL, prints "Hello world", and exits.
Now I want to have that as a batch execution from my home server and want to use a one-liner:
ssh remote_server_name 'idl -e "@~/hw.isc"'
What happens is that it logs into the remote server, starts IDL, but hangs upon startup after the license server is loaded. No X commands are used in the script nor the startup file. The result is the same if I use -X, -Y, or >& outfile in the IDL call command to redirect screen output.
Thanks for your help!
Flo.
|
|
|
Re: remote execution of idl script [message #91204 is a reply to message #91203] |
Wed, 17 June 2015 05:51   |
Lajos Foldy
Messages: 176 Registered: December 2011
|
Senior Member |
|
|
On Wednesday, June 17, 2015 at 12:09:05 PM UTC+2, trisb wrote:
> Hello IDL hive mind,
>
> after going through the post archives, I could not find a suitable solution to my problem, so here comes a new thread.
>
> I have an IDL script file ~/hw.isc that contains only
> print,"Hello world"
>
> Now I want to execute this IDL script (or command, to start with) from the shell of a remote computer. My IDL version is 8.3 and I am operating under a UNIX system. If I do the following, it works:
>
> ssh remote_server_name
> idl -e "@~/hw.isc"
>
> It correctly starts IDL, prints "Hello world", and exits.
>
> Now I want to have that as a batch execution from my home server and want to use a one-liner:
>
> ssh remote_server_name 'idl -e "@~/hw.isc"'
>
> What happens is that it logs into the remote server, starts IDL, but hangs upon startup after the license server is loaded. No X commands are used in the script nor the startup file. The result is the same if I use -X, -Y, or >& outfile in the IDL call command to redirect screen output.
>
> Thanks for your help!
> Flo.
Try "ssh ... idl hw.isc' (and append "exit" to hw.isc).
regards,
Lajos
|
|
|
|
|
|
|
|
Re: remote execution of idl script [message #91212 is a reply to message #91211] |
Wed, 17 June 2015 08:20   |
Lajos Foldy
Messages: 176 Registered: December 2011
|
Senior Member |
|
|
On Wednesday, June 17, 2015 at 4:55:59 PM UTC+2, trisb wrote:
> This is my hw.isc:
> -----
> print,"Hello world"
> exit
> -----
>
> This is the output from running
>
> ssh remote_server_name 'idl hw.isc'
>
> once it stalls:
> -----
> IDL Version 8.3 (linux x86_64 m64). (c) 2013, Exelis Visual Information Solutions, Inc.
> Installation number: [redacted]
> Licensed for use by: [redacted]
>
> -----
>
> I also tried to ssh into the host server/headnode, but it results in the same problem.
>
> Thanks,
> Flo.
Is there any IDL_STARTUP file on the remote host?
What does "ssh remote_server_name 'cat hw.isc'" print?
If it is OK and the remote host is Linux, you can try
ssh remote_server_name 'strace idl hw.isc'
This will print a zillion lines but you will see where IDL stalls at the end.
I can not guess your setup problem without access to the system. Show my previous working example to your IDL or system admin.
regards,
Lajos
|
|
|
|
Re: remote execution of idl script [message #91214 is a reply to message #91212] |
Wed, 17 June 2015 08:49   |
Nigel Wade
Messages: 286 Registered: March 1998
|
Senior Member |
|
|
On 17/06/15 16:20, fawltylanguage@gmail.com wrote:
> On Wednesday, June 17, 2015 at 4:55:59 PM UTC+2, trisb wrote:
>> This is my hw.isc:
>> -----
>> print,"Hello world"
>> exit
>> -----
>>
>> This is the output from running
>>
>> ssh remote_server_name 'idl hw.isc'
>>
>> once it stalls:
>> -----
>> IDL Version 8.3 (linux x86_64 m64). (c) 2013, Exelis Visual Information Solutions, Inc.
>> Installation number: [redacted]
>> Licensed for use by: [redacted]
>>
>> -----
>>
>> I also tried to ssh into the host server/headnode, but it results in the same problem.
Is it IDL which is hanging or ssh?
Try adding an additional command after idl to see if IDL exits, and ssh hangs.
If IDL exits then it's definitely something to do with the ssh environment rather than IDL.
It may also be X causing the problem, so get rid of X and unset DISPLAY:
ssh -x remote_server_name 'unset DISPLAY;idl hw.isc;ls'
If IDL exits it should list your files.
>>
>> Thanks,
>> Flo.
>
> Is there any IDL_STARTUP file on the remote host?
>
> What does "ssh remote_server_name 'cat hw.isc'" print?
>
> If it is OK and the remote host is Linux, you can try
>
> ssh remote_server_name 'strace idl hw.isc'
>
> This will print a zillion lines but you will see where IDL stalls at the end.
>
You can't strace IDL, it's a script.
|
|
|
Re: remote execution of idl script [message #91215 is a reply to message #91214] |
Wed, 17 June 2015 08:57   |
trisb
Messages: 18 Registered: November 2010
|
Junior Member |
|
|
On Wednesday, June 17, 2015 at 4:49:27 PM UTC+1, Nigel Wade wrote:
> On 17/06/15 16:20, fawltylanguage@gmail.com wrote:
>> On Wednesday, June 17, 2015 at 4:55:59 PM UTC+2, trisb wrote:
>>> This is my hw.isc:
>>> -----
>>> print,"Hello world"
>>> exit
>>> -----
>>>
>>> This is the output from running
>>>
>>> ssh remote_server_name 'idl hw.isc'
>>>
>>> once it stalls:
>>> -----
>>> IDL Version 8.3 (linux x86_64 m64). (c) 2013, Exelis Visual Information Solutions, Inc.
>>> Installation number: [redacted]
>>> Licensed for use by: [redacted]
>>>
>>> -----
>>>
>>> I also tried to ssh into the host server/headnode, but it results in the same problem.
>
> Is it IDL which is hanging or ssh?
>
> Try adding an additional command after idl to see if IDL exits, and ssh hangs.
> If IDL exits then it's definitely something to do with the ssh environment rather than IDL.
>
> It may also be X causing the problem, so get rid of X and unset DISPLAY:
>
> ssh -x remote_server_name 'unset DISPLAY;idl hw.isc;ls'
>
> If IDL exits it should list your files.
Thanks for the suggestion, Nigel. It stalls at the same point as before, ls is not being executed.
|
|
|
|
|
|
Re: remote execution of idl script [message #91251 is a reply to message #91234] |
Tue, 23 June 2015 05:07  |
trisb
Messages: 18 Registered: November 2010
|
Junior Member |
|
|
On Friday, June 19, 2015 at 9:26:20 AM UTC+1, Nigel Wade wrote:
> On 17/06/15 16:57, trisb wrote:
>>> Is it IDL which is hanging or ssh?
>>>>
>>>> Try adding an additional command after idl to see if IDL exits, and ssh hangs.
>>>> If IDL exits then it's definitely something to do with the ssh environment rather than IDL.
>>>>
>>>> It may also be X causing the problem, so get rid of X and unset DISPLAY:
>>>>
>>>> ssh -x remote_server_name 'unset DISPLAY;idl hw.isc;ls'
>>>>
>>>> If IDL exits it should list your files.
>> Thanks for the suggestion, Nigel. It stalls at the same point as before, ls is not being executed.
>>
>
> That makes me think that there's something different about how the idl command is working on that remote system.
> Also, the fact that Lajos suggestion to use strace fails to locate the idl command adds weight to this.
>
> Do you know how the idl command is configured on that system?
Thanks. Indeed, it was a problem with how the idl call related to the execution of idl. Problem solved with help of the sys admin.
Flo.
|
|
|