question

dlin avatar image
dlin asked ericnute edited

OnTerminalConnClosedWaitingForResponse for ssh session within a while loop

Hello all, I am getting OnTerminalConnClosedWaitingForResponse event for ssh session within a while loop after running for some a few minutes. What is the best way to around around this issue? It seems to resurface every 10th time. Should I modify the SendInterval between each character? Please let me know and thanks.
iTestssh
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

evdb avatar image
evdb answered evdb posted

Probably a bug on your DUT as iTest uses  a standard Java SSH session

As a workaround:

a)   Increase the time between commands ( you can also do this on the session) 

 

347i5993E9D8C0FFA31D

 

2) You can trap the OnTerminalConnClosedWaitingForResponse event and add a call to the procedure to reopen the session.

 

351iA1204A29397B698C

 

 


opt1.png (25.9 KiB)
opt2.png (45.5 KiB)
1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KumarS avatar image KumarS commented ·

If you are testing the device whose software is built by development team in your company, I would recommend to not work around this issue and get your developers to fix this bug. Imagine if your customers are getting their SSH session killed because the device is flaky.

 

If you are testing the device which you have bought from other company, then you can override this event and take appropriate actions based on your needs. But even in this case, I would file a bug with this company.

 

One last thing - "exit" and "logout" commands will generate OnTerminalConnClosedWaitingForResponse. This is perfectly normal because iTest will send logout command and then wait for the prompt. While it is waiting for the prompt, server will close the connection. This is the reason why this event has no actions by default.

0 Likes 0 ·
PaulD avatar image
PaulD answered PaulD posted

It sounds like your SSH server is closing the connection for some reason.  Are you talking directly to a device?  Or are you talking to a terminal server or some intermediary device?  

 

To troubleshoot this, I would use wireshark and watch the packets as they go back and forth.  At some point, I assume you'll see the server sending a packet to close the TCP socket.  Whatever is happening around that point might give you a clue.

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.