Forum Discussion

NK_50834's avatar
NK_50834
Icon for Nimbostratus rankNimbostratus
Aug 09, 2012

Issues with BIH-IP LTM for Oracle Database:

Here is what I've done:

1. created an Oracle health monitor

 

2. created nodes for each host (2 in this case [x.y.z.152, x.y.z.154] )

 

3. created an oracle pool with both the members in it

 

4. created a tcp profile for server & client

 

5. created a virtual server x.y.z.162 @ port 1521.

 

 

 

Using SQL Developer, if I test a connection to the virtual server 162 @ port 1521 and oracle_sid being set to primary;

 

it fails with the following message:

 

io exception - connection reset.

 

 

 

If I try using sqlplus, I get ORA-12545

 

 

 

sqlplus system@ODYSSEY_F5

 

 

 

SQL*Plus: Release 11.2.0.2.0 Production on Thu Aug 9 12:36:27 2012

 

 

 

Copyright (c) 1982, 2010, Oracle. All rights reserved.

 

 

 

Enter password:

 

ERROR:

 

ORA-12545: Connect failed because target host or object does not exist

 

 

 

 

 

 

I'm using instance switching irule.

 

 

 

 

Any pointers would be helpful.

 

 

 

thanks & regards,

 

NK

 

 

 

4 Replies

  • Chris_Akker_129's avatar
    Chris_Akker_129
    Historic F5 Account
    Hi NK. From first look and the ORA-12545 error message, it would appear that the instance name is incorrect/does not match. When using RAC, the first Node could be "primary1", the second Node "primary2", etc. The switch_map in the iRule must be updated to match the instance names and the correct Node IP Addresses.

     

     

    To help you out, there are quite a few "log local0." lines in the iRule to use for debugging. I would try uncommenting some of them out, and see if you can find out what/where the iRule is working/sending the TCP connection. The log local0. iRule messages are sent to /var/log/ltm.

     

     

    Also, as a troubleshooting step, try removing the iRule from the virtual server, and disable the second Node in the pool, to find out what instance names are registered/work on Node 1 by itself. Then reverse the process, only enable Node2 in the pool, and see what works. I know it might sound simplistic, but with RAC clusters, the details can be tough to pin down sometimes.

     

     

    Let us know what you find !

     

     

    -Chris
  • Thanks for you response Chris..

     

     

     

    Below are my responses to your comments:

     

     

     

    Hi NK. From first look and the ORA-12545 error message, it would appear that the instance name is incorrect/does not match. When using RAC, the first Node could be "primary1", the second Node "primary2", etc. The switch_map in the iRule must be updated to match the instance names and the correct Node IP Addresses.

     

     

    We are NOT in a RAC environment. The sid for both the primary and physical standby (on a different m/c) is same.

     

     

     

     

     

    Also, as a troubleshooting step, try removing the iRule from the virtual server, and disable the second Node in the pool, to find out what instance names are registered/work on Node 1 by itself. Then reverse the process, only enable Node2 in the pool, and see what works. I know it might sound simplistic, but with RAC clusters, the details can be tough to pin down sometimes.

     

     

     

    Aug 10 10:42:21 pscsb11F5 mcpd[729]: 01070641:3: Node 10.136.100.154 session status enabled.

     

    Aug 10 10:42:33 pscsb11F5 mcpd[729]: 01070640:3: Node 10.136.100.154 monitor status up.

     

    Aug 10 10:42:43 pscsb11F5 mcpd[729]: 01070641:3: Node 10.136.100.152 session status enabled.

     

    Aug 10 10:42:55 pscsb11F5 mcpd[729]: 01070640:3: Node 10.136.100.152 monitor status up.

     

    Aug 10 10:48:48 pscsb11F5 mcpd[729]: 01070638:3: Pool member 10.136.100.152:1521 monitor status up.

     

    Aug 10 10:48:48 pscsb11F5 mcpd[729]: 01070639:3: Pool member 10.136.100.152:1521 session status disabled.

     

     

     

    Aug 10 11:08:

     

     

    12 tmm tmm[732]: 01220001:3: TCL error: Rule instance-switching-irule - list must have an even number of elements while executing "array set switch_map { "odyssey" "10.136.100.154" "odyssey" "10.136.100.152" "paradox2" "10.136.100.152" "paradox" ..."

     

     

     

     

     

     

    I hope this should help you point me in the right direction.

     

     

     

    Thanks for your help.

     

     

     

    regards,

     

    NK

     

     

     

     

     

  • Chris_Akker_129's avatar
    Chris_Akker_129
    Historic F5 Account
    Hi NK, I guess we need to know more about your database environment, so it woud help if you could describe what you have and what you are trying to do in detail.

     

     

    My previous suggestions were based on the assumption that you were using Oracle RAC. The RAC load balancing deployment guide and iRules are for RAC clusters with two or more RAC Nodes. If you are trying to load balance standalone databases, it will not work. The Standby database will never pass the SQL health check, because it is not in the OPEN state - as shown by the last "Pool member ... sessin status disabled" log message.

     

     

    However, if you have standalone database servers, and are trying to use LTM to automate the TCP connection failover, you could use the priority group activation feature. You could have the Prinary database server in the high prioirty group, and your Standby database in the low priority group, and set up the failover to use that feature. This woud be one pool with 2 priority levels. The iRule is not needed for this.

     

     

    The iRule debug log statement that you included, the "list must have an even number of elements..." error. It appears you have the name odyssey with two different IP addresses - .152 and .154. This will not work, the array must contain unique key-value pairs.

     

     

    So I think the architecture you have is different than what the deployment guide and iRules were written for. So plz explain what you have and what you want to accomplish so we can make better suggestions.

     

     

    Thanx,

     

    Chris.
  • I have a lot of small to mid-sized stand-alone databases, & apart from DR providing HA via DG is our goal.

     

     

    In order for applications to continue working even after switch-over w/o any changes to connect strings- I set-up the physical standby with the same SID, (db_unique_name and service are different).

     

     

     

    However, if you have standalone database servers, and are trying to use LTM to automate the TCP connection failover, you could use the priority group activation feature. You could have the Prinary database server in the high prioirity group, and your Standby database in the low priority group, and set up the failover to use that feature. This woud be one pool with 2 priority levels.

     

    I do have it set up as suggested - odyssey_pool has both the primary& phys-standby nodes and primary has high priority (100) and standby has low (1). (Attached is the screen shot). I had disabled the standby node for debugging. I want to see if atleast the request is sent over to the primary member of the pool via the virtual server...

     

     

     

    regards,

     

    NK