KlausR_DXC
Visitor.
594 views

SSH command via RAS to Linux box over slow network results in "timeout: socket is not established"

Hello, I am an architect who inherited an installation of HPE Codar/OO 10.70 with some designs, installing an application on a Linux farm over a sometimes very slow gateway via a Windows 2012 VM based RAS. The slow gateway unfortunately is beyond our control.

What happens now is that, after the gateway became extra-slow recently (SSH from hand takes anywhere from 0.5 to 10 seconds to respond), the RemoteCommand execution aborts because its timeout is reached. I now have a hard time finding the place where a low timeout is set, as the default shouldn't be 1 second.

Where could that setting be lowered to such a low value, and what methods are there to set this SSH timeout ? I cross-read all of the OO 10.70 documentation PDFs I found on the installation folder, but couldn't find any configuration value for the SSH timeout in general, or an example. On OO 9.0 I found the info that a parameter dharma.ssh.session.timeout exists, but no documentation if that still exists in 10.70.

This is the stacktrace from the execution log, any help would be deeply appreciated by me and my colleagues. 😞

2017-11-10 23:51:20,174 [1_WorkerExecutionThread-7_225311154] (PluginAdapterImpl.java:331) ERROR - com.hp.oo.content.ssh.exceptions.SSHException: com.jcraft.jsch.JSchException: timeout: socket is not established
at com.hp.oo.content.ssh.services.impl.SSHServiceImpl.<init>(SSHServiceImpl.java:137)
at com.hp.oo.content.ssh.actions.SSHShellCommand.runSshShellCommand(SSHShellCommand.java:116)
at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.hp.oo.sdk.plugins.abstracts.BaseActionPlugin.execute(BaseActionPlugin.java:53)
at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.hp.oo.maven.PluginAdapterImpl.executePlugin(PluginAdapterImpl.java:328)
at com.hp.oo.maven.PluginAdapterImpl.execute(PluginAdapterImpl.java:248)
at com.hp.oo.execution.control.actions.contentexecution.ContentExecutionActions.executeContentAction(ContentExecutionActions.java:97)
at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.cloudslang.worker.execution.reflection.ReflectionAdapterImpl.executeControlAction(ReflectionAdapterImpl.java:62)
at io.cloudslang.worker.execution.services.ExecutionServiceImpl.executeStep(ExecutionServiceImpl.java:326)
at io.cloudslang.worker.execution.services.ExecutionServiceImpl.execute(ExecutionServiceImpl.java:80)
at io.cloudslang.worker.management.services.SimpleExecutionRunnable.executeRegularStep(SimpleExecutionRunnable.java:167)
at io.cloudslang.worker.management.services.SimpleExecutionRunnable.run(SimpleExecutionRunnable.java:120)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at io.cloudslang.worker.management.services.WorkerThreadFactory$1.run(WorkerThreadFactory.java:33)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.jcraft.jsch.JSchException: timeout: socket is not established
at com.jcraft.jsch.Util.createSocket(Util.java:394)
at com.jcraft.jsch.Session.connect(Session.java:215)
at com.hp.oo.content.ssh.services.impl.SSHServiceImpl.<init>(SSHServiceImpl.java:127)
... 25 more
com.jcraft.jsch.JSchException: timeout: socket is not established

0 Likes
5 Replies
Outstanding Contributor.. JarodMB Outstanding Contributor..
Outstanding Contributor..

Re: SSH command via RAS to Linux box over slow network results in "timeout: socket is not estab

Did you review the "SSH Command" in the Studio workflow? 
There are two timeout values you can set on the operation
 - timeout (defaults to 90000ms), -readTimeout (defaults to 20000ms)

If the flow is using the "SSH Shell" you can also set a 'wait' in the (send/expect) command stack

 

 

KlausR_DXC
Visitor.

Re: SSH command via RAS to Linux box over slow network results in "timeout: socket is not estab

Thanks for the fast answer. I am a newbie at OO, and have a hard time finding the things mentioned in the threads on the subject. My colleague is the person handling the programming, so I will ask her to register here and pick up the conversation. 🙂

What I am wondering is, everywhere it is stated that the timeout is comparably high. However, in unsuccessful case, the flow returns almost immediately, so it must be way less than 90 or 20 seconds. I wonder if somebody of the people who already left the company have configured somewhere a very low timeout, which is biting us now.

0 Likes
KlausR_DXC
Visitor.

Re: SSH command via RAS to Linux box over slow network results in "timeout: socket is not estab

This is the location in question, is there a parameter readTimeout possible in this place ? Or do we need to go deeper into the scripting for that ?

SSH parms.jpg

0 Likes
AndreiTruta Outstanding Contributor.
Outstanding Contributor.

Re: SSH command via RAS to Linux box over slow network results in "timeout: socket is not estab

At runtime the values of those timeouts can come from AssignFrom - as they are both set to the variable name.

If you can trace during remote debugging how those values are initialized at runtime - you might find out if the custom values are considered or not.

 

Andrei Vasile Truta
0 Likes
Outstanding Contributor.. JarodMB Outstanding Contributor..
Outstanding Contributor..

Re: SSH command via RAS to Linux box over slow network results in "timeout: socket is not estab

They're greyed out - you should be taking the defaults

I would edit them to a higher value (maybe 90000, 30000) and set 'assign-from, assign-to' to '<not assigned>'

Debug the flow (or build and deploy if you're unable to debug against this RAS from your dev env)

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.