Hi, I'm using the code Lukas supplied in reply to a previous question of mine:

http://forum.rebex.net/questions/342/ssh-runcommand-vs-startcommand-for-stdout-stderr-and-exit-code/347#347

I'm using it to run an Expect script and it works great most of the time.

Sometimes though we get the error below when it tries to close the underlying channel. The Expect script I'm running seems to have completed fine but we still get the error on close.

The operation was not completed within the specified time limit.
at Rebex.Net.SshSession.BXQTfX(Int32 ) 
at Rebex.Net.SshSession.AePCoRZ(Byte[]& ) 
at Rebex.Net.SshSession.cDtmAOZ(Int64& , Boolean ) 
at Rebex.Net.SshChannel.cDtmAOZ(Boolean , Int64& ) 
at Rebex.Net.SshChannel.Close() 

There can be multiple independent Rebex.Ssh sessions open at once all running different Expect scripts so I'm wondering if perhaps they are blocking causing random ones to timeout when trying to close, especially as re-running a failed one again usually completes and closes without error.

I've set _ssh.Timeout to be higher than the time the Expect script takes when run manually but the error still randomly happens.

I'm adding LogWriter to create a communication log but wondered if there was any known issues or suggestions to look at in the meantime.

Thanks

asked 21 Feb '11, 18:35

Ian's gravatar image

Ian
161
accept rate: 0%


The latest release of Rebex SSH Shell fixed a possible race condition that might have occurred when running several SshChannels over a single SshSession. I'm not sure whether this is related to the problem you encountered, but upgrading your application to latest release of Rebex SSH Shell is recommended.

If the problem persists in the latest release, please add the LogWriter log (at Debug lebel) to your question (or mail it to support@rebex.net if it's too long) - that should make it possible to tell what is going on.

Alternatively, post a piece of code and a sample Expect script that reproduce this issue - we should be able to fix this easily without any further help from you if we are able to reproduce it.

link

answered 22 Feb '11, 12:03

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.4k28
accept rate: 31%

Thanks Lukas. I upgraded to the latest version but the problem still occurs. I've sent the log and example Expect script by email.

(10 Mar '11, 14:09) Ian

This issue was most likely fixed in version 2012 R1 (http://www.rebex.net/sftp.net/history.aspx#4444).

(19 Mar, 13:27) Lukas Pokorny ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×44
×20
×11

Asked: 21 Feb '11, 18:35

Seen: 2,171 times

Last updated: 19 Mar, 13:27