JDBC Driver can not connect to the DB when using virtual Ip
690513Mar 12 2009 — edited Mar 12 2009Scenario - we have one virtual IP address that maps to one among 2 physical ip addresses at a time. These 2 ip addresses belong to 2 different machines which have oracle DB instances that are connected via oracle streaming to enable failover among these 2 instances. We provide virtual ip address in JDBC URL while connecting to DB instance and it works fine. Now to test failover we stop network services on one of the machines and our virtual ip address automatically starts mapping to another physical ip address. But JDBC driver is still not able to connect to this new ip address and we have to restart our application to make a new connection. However if we restart the network services on the machine which we just stopped, JDBC again start making connection to the old machine.
It seems somewhere caching is happening between virtual ip address and physical ip address and it is not getting updated. We get common "17002 - Network adapter can not establish the connection."
Any pointer to solve this issue will really help us quickly move to the solution. We are using oracle jdbc driver - 10.1.0.4.0.
Thanks!!