Problem with ScSSHClient.Connect on iOS

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
Daniele Buttarelli
Posts: 56
Joined: Fri 02 Aug 2013 07:51

Problem with ScSSHClient.Connect on iOS

Post by Daniele Buttarelli » Mon 23 Sep 2013 14:13

RAD Studio XE4 Update1 + Mobile
SecureBridge 6.0.1
ODAC 9.1.3
Oracle Database 11g Release 11.2.0.1.0

I have problems when try to connect to Oracle via ScSSHClient on iOS IPAD;

If the SSHServer is up all work properly.
If the SSHServer, for some reasons, is down, application hangs and exceptions aren't raised.

Here is my code:

////////////////////////////////////////////////////////////////////////////////
procedure TdmMain.OraSessionBeforeConnect(Sender: TObject);
////////////////////////////////////////////////////////////////////////////////
var
MyConnectParams: TStringList;

begin
// Connection to Oracle via SSH tunnel
MyConnectParams := TStringList.Create;
try
MyConnectParams.Delimiter := ':';
MyConnectParams.DelimitedText := OraSession.Server;
ScFileStorage.Path := GetHomePath + PathDelim + 'Documents' + PathDelim;
ScSSHClient.HostName := MyConnectParams[ 0 ];
ScSSHChannel.DestHost := '127.0.0.1';
ScSSHChannel.SourcePort := 1520;
ScSSHChannel.DestPort := StrToInt( MyConnectParams[ 1 ] );
OraSession.Server := '127.0.0.1:1520:' + MyConnectParams[ 2 ];
// Connessione SSH
try
ScSSHClient.Connect;
except
// 001
ErrorBox( '001: Impossibile collegarsi al server!' );
OraSession.Close;
end;
// Port forwarding
try
ScSSHChannel.Connect;
except
// 002
ErrorBox( '002: Impossibile collegarsi al server!' );
OraSession.Close;
end;
finally
MyConnectParams.Free;
end;
end;

On ScSSHClient.Connect, Delphi raise this exception:
'Socket error on connecting. Error code = 61($3$D) Connection refused';

If I continue execution, the program stalls and nothing happens.

How can I solve this problem?

Thanks.
Daniele Buttarelli

Daniele Buttarelli
Posts: 56
Joined: Fri 02 Aug 2013 07:51

Re: Problem with ScSSHClient.Connect on iOS

Post by Daniele Buttarelli » Tue 24 Sep 2013 10:21

Are you able to simulate the problem?
Thanks.
Best regards.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: Problem with ScSSHClient.Connect on iOS

Post by Dimon » Fri 27 Sep 2013 12:06

Thank you for the information. We have reproduced and investigated this problem. It seems, that the problem is arisen because of the specificity of the compiler under iOSDevice.
As a workaround, try compiling your project in the Release mode (not Debug) and check if this problem still exists.
We will avoid this behaviour in the next SecureBridge build.

Daniele Buttarelli
Posts: 56
Joined: Fri 02 Aug 2013 07:51

Re: Problem with ScSSHClient.Connect on iOS

Post by Daniele Buttarelli » Wed 02 Oct 2013 06:59

When the new version will be available?
Thanks.
Best regards.
Daniele Buttarelli

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: Problem with ScSSHClient.Connect on iOS

Post by Dimon » Mon 14 Oct 2013 12:04

New build of SecureBridge version 6.1.2 with fixed bug with hanging application on iOS is available for download now.

Post Reply