SQL*Net connection to remote Oracle DB, through SSH, fails with ORA-12545
969533Oct 19 2012 — edited Oct 19 2012Hi all,
I have the following issue: I am unable to log in to an Oracle database using SSH tunnel. I have the following network setup:
laptop (network1) server1 (network2) oracledb (network2)
server1 is reachable via SSH from outside world ,while oracledb is not reachable outside of network2.
The listener is running on default port 1521 on oracledb server.
server1 has direct visibility with oracledb.
First, I've tried to connect using only a LOCAL tunneling like this:
laptop> ssh -L 10000:oracledb:1521 user@server1
But then, when I issue a connection attempt (using SQL*Plus, SQL Developer and/or Toad) towards laptop:10000, I get the following error:
C:>sqlplus SYS@HOME11G as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Fri Oct 19 14:51:03 2012 Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter password: ERROR: ORA-12545: Connect failed because target host or object does not exist
and the following log in listener.log on oracledb:
19-OCT-2012 06:31:33 * (CONNECT_DATA=(SID=PROD01)(CID=(PROGRAM=C:\app\rr2\product\11.2.0\client_2\bin\sqlplus.exe)(HOST=RR2-23247)(USER=rr2))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.104)(PORT=48025)) * establish * PROD01 * 0
I've also tried to connect using a LOCAL and REMOTE tunnels like this way:
laptop> ssh -L 10000:localhost:9999 user@server1 server1> ssh -R 9999:oracledb:1521 oracle@oracledb
and then when I issue a connection on laptop:10000 again I am hitting the above errors.
I suppose that the issue is because when connected to the listener, it then spawns a server process on another port, and your connection should bind to the server port on the server process, which is different every time with a range between 20000 - 50000 TCP.
I am stuck on this and I don't know how to make it work.
Please advise!!
Thanks a lot in advance.
Edited by: 966530 on 2012-10-19 5:54