Problem with ScSSHClient.Connect on iOS
Posted: 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
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