EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SSH tunnel closing problem

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
#8337
Posted: 12/02/2008 08:11:11
by Eyal Aharoni (Standard support level)
Joined: 12/02/2008
Posts: 3

Tunneling works well for me except in one scenario:

My client application opens a regular TCP socket through a tunnel to connect to my remote server application.

Once my remote server accepts the connection, it starts sending short periodic messages (a few bytes every few seconds) to my client.
My server is designed to keep sending until the client closes the connection.
When my clinet wishes to hang up, it closes the TCP socket.

When using the LocalPortForwardDemo for tunneling, AFTER my client closes the socket, and AFTER pushing the "Stop" button I get:

1. LocalPortForwardDemo shows both "Socket state" and "Channel State"
as "Active".

2. LocalPortForwardDemo now takes 100% CPU.
profiling shows it spends most time in:
TElThread.ThreadFunc()
TElSSHForwardedConnection.Execute()
TElSocket.Send(Byte[], Int32, Int32, Int32 &)

3. After going into this state, closing the form doesn't kill the process.
After killing the process using the TaskManager, the CPU usage drops back
to nothing.

My original code did the tunneling internally, using TElSSHLocalPortForwarding, but got the same result after calling 'tunneling.close()'.
I then used the LocalPortForwardDemo to isolate the problem, and now am convinced the problem is not in my code.

Another point is that using reflector on the tunneling objects showed all methods I looked at *BUT* TElSSHForwardedConnection.Execute().
The reflector produced an exception trying to analyze TElSSHForwardedConnection.Execute()

Please help.
#8338
Posted: 12/02/2008 08:21:43
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 450

Hi. Are you using the latest 6.1. release? There were some issues with port forwarding, which has been fixed in 6.1.
#8354
Posted: 12/03/2008 07:02:56
by Eyal Aharoni (Standard support level)
Joined: 12/02/2008
Posts: 3

Hi. After upgrading from 6.0 to 6.1.149 the problem seems
to have been solved.
Thank you.

#8373
Posted: 12/04/2008 07:28:04
by Eyal Aharoni (Standard support level)
Joined: 12/02/2008
Posts: 3

Hi,
The problem still exists when the network is slow.
#8374
Posted: 12/04/2008 09:08:55
by Ken Ivanov (EldoS Corp.)

A Close() call may cause some delay if the forwarding object has cached a big amount of data internally (it is possible if network connection is slow). In this case Close() needs some time to flush cached data to the socket. Please try to set FlushCachedDataOnClose property to false and check if it solves the issue.
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.

Reply

Statistics

Topic viewed 1328 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!