WeOnlyDo.wodSSHCom.1: The current connection has t - WeOnlyDo Discussion board

WeOnlyDo.wodSSHCom.1: The current connection has t (General questions)

by jimm3rs, Wednesday, May 01, 2013, 04:16 (4225 days ago)

Hi there

Hope you have a good time there.

Problem: using WodSSH ActiveX and WodSSH.NET results in timeout exceptions when running a command over 259 characters in length against Solaris 5.10 SPARC ssh daemon.
Is this a known issue and if so, what can be done to resolve it?

Here are more technical details:

[code]$ uname -a
SunOS sunny12 5.10 s10_72 sun4u sparc SUNW,Sun-Fire-V210[/code]

user is regular user account with [code]/bin/sh[/code] shell.

Code to reproduce the problem:

[code]
Option Explicit

Sub DoIt(n)

Dim objSSH, objKey
Set objSSH = CreateObject( WeOnlyDo.wodSSHCom )
objSSH.Blocking = True
objSSH.StripANSI = True
objSSH.Timeout = 62
objSSH.DebugFile = logsdebug_ & CStr(n) & .log
objSSH.Login = myaccount
objSSH.Password = mypassword

Call objSSH.Connect( mybox , 22, 4)
Call objSSH.Execute( echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X12345678;echo ABCD; & vbCrLf, ABCD , 15)
Set objSSH = Nothing

End Sub

Dim i
For i = 1 To 100
Call DoIt(i)
WScript.Echo(i)
Next
[/code]

It fails on very first iteration with:

[code]WeOnlyDo.wodSSHCom.1: The current connection has timeout.[/code]

I did the same thing with WodSSH.NET in C# app it throws essentially the same timeout exception.

Here is debug log content:

[code]
*** OnConnect received, err = 0
echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X12345678;echo ABCD;
Last login: Tue Apr 30 23:11:07 2013 from x.x.x.x

Sun Microsystems Inc. SunOS 5.10 s10_72 December 2004
$ echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X12345678;echo ABC....
[/code]

Dots at the end (after last ABC) are [code]0x07[/code] bytes.

If I remove a single character from the command it passes successfully.

Re: WeOnlyDo.wodSSHCom.1: The current connection h

by wodSupport, Wednesday, May 01, 2013, 08:59 (4224 days ago) @ jimm3rs

Hi.

Problem could be that after that size line wraps and perhaps is never shown. For testing, replace Execute with Send, and then call Receive several times to see exactly what is coming back. That way you can try to figure what is really coming back from the server, and how is wrapped - and perhaps change Execute line accordingly.

Hope this helps!
Kreso

Re: WeOnlyDo.wodSSHCom.1: The current connection h

by jimm3rs , Friday, May 03, 2013, 17:48 (4222 days ago) @ wodSupport

Okay, I changed the code to Send and then do Receive four times. Here is the debug log:


[code]
*** OnConnect received, err = 0
Last login: Fri May 3 12:45:54 2013 from 10.254.1.27

Sun Microsystems Inc. SunOS 5.10 s10_72 December 2004
$ echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X12345678;echo ABCD;
echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X12345678;echo ABC...[/code]

Where dots are 0x07 bytes. Then it times out with:

[code]WeOnlyDo.wodSSHCom.1: The current connection has timeout.[/code]

What's next?

Re: WeOnlyDo.wodSSHCom.1: The current connection h

by woddrazen, Friday, May 03, 2013, 18:07 (4222 days ago) @ jimm3rs

Hi,


Did you try to send same command using some other SSH client maybe? For example Putty. What happens there?

If problem occur only inside our components is there any chance we can duplicate this on our side? Is it possible maybe that we can connect there and duplicate your issue?

We will just connect few times duplicate it and immediately disconnect.


Drazen

Re: WeOnlyDo.wodSSHCom.1: The current connection h

by jimmers, Friday, May 10, 2013, 14:42 (4215 days ago) @ woddrazen

Hi,


Did you try to send same command using some other SSH client maybe? For example Putty. What happens there?

If problem occur only inside our components is there any chance we can duplicate this on our side? Is it possible maybe that we can connect there and duplicate your issue?

We will just connect few times duplicate it and immediately disconnect.


Drazen

PuTTY works fine.

You can reproduce it on Oracle Solaris 11 11/11 X86 using any regular account having /usr/bin/bash shell.

Re: WeOnlyDo.wodSSHCom.1: The current connection h

by woddrazen, Friday, May 10, 2013, 18:02 (4215 days ago) @ jimmers

Hi,


In order to deal with this issue we will need to duplicate this issue on our side.

Currently we are install Solaris.

We will send you reply when we finished with testing with our results.


Drazen

Re: WeOnlyDo.wodSSHCom.1: The current connection h

by woddrazen, Saturday, May 11, 2013, 14:50 (4214 days ago) @ woddrazen

Hi,


Unfortunately for some reason we are unable to duplicate this issue. Here is my code snippet:
[code]ssh1.Connect

ssh1.WaitFor ( regex:[$ #>] $ )
ssh1.DataReady = 0
command1 = echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X123456789X123456789X123456789X123456789;echo X123456789X12345678;echo ABCD;
Debug.Print ssh1.Execute(command1 & vbCrLf, regex:[$ #>] $ , 15)[/code]
as you can see I added WaitFor and DataReady lines inside my code before Execute Method. WaitFor is used to catch prompt when you connect to server and DataReady is used to empty buffer.

Is there any chance you can try same on your side? If problem persist we will need to duplicate it somehow on our side. So maybe it's best that you try to connect to our Solaris server.

Please send email to techsupport@weonlydo.com so we can send you there instruction how to connect. We cannot send it here because this is public forum so everyone could connect to our server.


Drazen