Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ssh tunneling to Oracle RAC

User_S3VWYFeb 15 2012 — edited Feb 16 2012
Would anyone please help to solve the problem as titled...

There is an Oracle RAC consist of 2 AIX servers.
The server-side tnsnames.ora include the below information, which I believe it is used to redirect connections when load-balancing is enabled.
remote_listener = '(description=(address=(protocol=tcp)(host=RAC_NODE1)(port=1521))
*(address=(protocol=tcp)(host=RAC_NODE2)(port=1521)))'*

The server is protected by firewall.

Now our system as client is going to connect to this RAC DB. Due to security rules, only port 22 is opened.
I tried to use ssh tunneling to connect to the DB:
ssh -f -N -L 8888:RAC_NODE1:1521 root@RAC_NODE1
ssh -f -N -L 9999:RAC_NODE2:1521 root@RAC_NODE2

with client-side tnsnames.ora:
EXAMPLE=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=8888))(ADDRESS=(PROTOCAL=TCP)(HOST=127.0.0.1)(PORT=9999))(LOAD_BALANCE=YES)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XXXX)))

so when using tnsping etc to check connection, sometimes it will connect successfully, while sometimes will return an error ORA-12545 Connect failed because target host or object does not exist.


I tried another system with port 1521 opened, and no such error occur.
I believe when redirection occur, the server will pass the information bolded above. I don't know how the server redirect connection from RAC_NODE1 to RAC_NODE2.



Please refer to this thread
1101570
In the thread, Billy Verreynne has suggested a solution to use ssh tunneling with RAC environment, but I don't know how to apply it to my situation. Would anyone please help!!! Thanks very much!

Edited by: 914595 on Feb 15, 2012 5:30 AM

Edited by: 914595 on Feb 15, 2012 5:31 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 15 2012
Added on Feb 15 2012
5 comments
3,391 views