I am calling a remote EJB on weblogic 12c. In the provider URL, i am setting many hosts like below:
Context.PROVIDER_URL,"t3://node1:7001,node2:7002,node3:7003"
Out of these many hosts, one host is bad and does not exist at all.
My understanding was that WebLogic will itself do the fail-over and move to the next working host. But even one host (order doesn't matter) is causing the below error while creating the Initial Context each time.
java.net.UnknownHostException: <BAD_HOST_NAME>
at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:922)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1316)
at java.net.InetAddress.getAllByName0(InetAddress.java:1269)
at java.net.InetAddress.getAllByName(InetAddress.java:1185)
at java.net.InetAddress.getAllByName(InetAddress.java:1119)
at java.net.InetAddress.getByName(InetAddress.java:1069)
at weblogic.rjvm.RJVMFinder.getDnsEntries(RJVMFinder.java:434)
at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:217)
at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:169)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:177)
at weblogic.jndi.WLInitialContextFactoryDelegate$1.run(WLInitialContextFactoryDelegate.java:342)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:365)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:337)