EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SSH tunnel closing problem

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:
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.
Posted: 12/02/2008 08:21:43
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 442

Hi. Are you using the latest 6.1. release? There were some issues with port forwarding, which has been fixed in 6.1.
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.

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

The problem still exists when the network is slow.
Posted: 12/04/2008 09:08:55
by Ken Ivanov (Team)

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.



Topic viewed 1493 times

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


Back to top

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

Got it!