Buffer Error Consuming to many bytes (General questions)

by Kim @, (6089 days ago)

Hello!

Sometimes when connecting to a Power Distribution Unit using WodSSH and Telnet or SSH the following exception is thrown: Buffer error: consuming too many bytes .

This exception cannot be caught and handled by our code. Why does wodSSH throw this exception?

See Exception Detail from VS2005Pro below:
________________________________________________________

System.Exception was unhandled
Message= Buffer error: consuming too many bytes
Source= WeOnlyDo.Client.SSH
StackTrace:
at ..(Int32 )
at ..()
at ..(IAsyncResult )
at ..(IAsyncResult )
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.ContextAwareResult.CompleteCallback(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.ContextAwareResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

locked

Re: Buffer Error Consuming to many bytes

by Jasmine, (6089 days ago) @ Kim

Kim,

hi. This would be internal error when parsing received data. Are you using SSH or Telnet connection? Do you have the latest version of wodSSH.NET?

If you could arrange for us to connect there (several times) do duplicate the problem, that would be very helpful.

Kind regards,
Kreso

locked

Re: Buffer Error Consuming to many bytes

by Kim, (6089 days ago) @ Jasmine

Ok, is this changed/corrected in latest version of wodSSH.NET?

We are using Telnet when this error/exception occur.
The error seems very random when connecting to an power distribution unit. We are using the same implementation to other units /linux servers without any problem.

Can you explan what causes this kind of exception? Is there some kind of overflow in some buffers? What shall we look for in our code using your library?

We are currently using version 2.3.1 of wodSSH.NET.

locked

Re: Buffer Error Consuming to many bytes

by Jasmine, (6089 days ago) @ Kim

I don't know if it's fixed, I would have to try it out.

What *probably* happens is that some telnet option arrives which needs XX bytes afterwards, so we try to consume those bytes but they didn't arrive yet from remote side - thus the error.

Can you arrange us to connect there? We perhaps don't even need login/password, if error arrives sooner.

Kreso

locked

Re: Buffer Error Consuming to many bytes

by Kim Gunnarsson, Ericsson AB, (6089 days ago) @ Jasmine

Sorry, our network is very restricted and it require a lot of paper work and people involved to get permission to create a tunnel for others to use for temporary access.

Perhaps we could create some logs with wireshark for you to investigate when the error occur. Could this be to any help?

We are now trying the version 2.4.0 of wodSSH.NET.
Do you have any other tip what to try to find the problem?

BR
/ Kim

locked

Re: Buffer Error Consuming to many bytes

by woddrazen @, (6089 days ago) @ Kim Gunnarsson, Ericsson AB

Kim,


If problem persist with latest version. Can you please send us to techsupport@weonlydo.com output of DebugFile Property?

Here is example how to add DebugFile Property to your code:
[code]wodSSH1.DebugFile = c:\debug.txt
wodSSH1.Connect()[/code]

Drazen

locked