Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-9350

Creating initial context to server bound to IPv6 global address fails

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: EAP_EWP 5.1.2
    • Fix Version/s: TBD EAP 5
    • Component/s: Naming
    • Labels:
      None
    • Environment:

      Tested on IPv6 dual-stack (dev06 in QA Lab)

    • Docs QE Status:
      NEW

      Description

      When EAP 5.1.2 server is bound to IPv6 global-address (2620:52:0:105f:214:22ff:fe1c:c53c) and standalone jms client is trying to create initial context for remote jndi lookups of connection factory and queue then following exception is thrown:

      javax.naming.CommunicationException: Could not obtain connection to any of these urls: [2620:52:0:105f:214:22ff:fe1c:c53c]:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server [2620:52:0:105f:214:22ff:fe1c:c53c]:1099:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server [2620:52:0:105f:214:22ff:fe1c:c53c]:1099:1099 [Root exception is java.net.UnknownHostException: [2620:52:0:105f:214:22ff:fe1c:c53c]:1099]]]
      	at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1828)
      	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:717)
      	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:710)
      	at javax.naming.InitialContext.lookup(InitialContext.java:392)
      	at org.jboss.qa.hornetq.TestProducer.startClient(TestProducer.java:68)
      	at org.jboss.qa.hornetq.TestProducer.main(TestProducer.java:33)
      Caused by: javax.naming.CommunicationException: Failed to connect to server [2620:52:0:105f:214:22ff:fe1c:c53c]:1099:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server [2620:52:0:105f:214:22ff:fe1c:c53c]:1099:1099 [Root exception is java.net.UnknownHostException: [2620:52:0:105f:214:22ff:fe1c:c53c]:1099]]
      	at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:359)
      	at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:284)
      	at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1798)
      	... 5 more
      Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server [2620:52:0:105f:214:22ff:fe1c:c53c]:1099:1099 [Root exception is java.net.UnknownHostException: [2620:52:0:105f:214:22ff:fe1c:c53c]:1099]
      	at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:329)
      	... 7 more
      Caused by: java.net.UnknownHostException: [2620:52:0:105f:214:22ff:fe1c:c53c]:1099
      	at java.net.InetAddress.getAllByName(InetAddress.java:1039)
      	at java.net.InetAddress.getAllByName(InetAddress.java:1019)
      	at java.net.InetAddress.getByName(InetAddress.java:969)
      	at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:81)
      	at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:325)
      	... 7 more
      

      from client code:

      Properties properties = new Properties();
                  properties.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
                  properties.setProperty("java.naming.provider.url", "jnp://[2620:52:0:105f:214:22ff:fe1c:c53c]:1099");
                  properties.setProperty("java.naming.factory.url.pkgs", "org.jnp.interfaces.NamingContextFactory");
                  context = new InitialContext(properties);
      

      It seems that IPv6 address cannot be parsed.

      Note:
      If just "jnp://2620:52:0:105f:214:22ff:fe1c:c53c" is used then initial context is created. It seems that port 1099 is added automatically. But with it that doesn't work. I could not find a way how to tell that jnp is listening on a different port.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mnovak Miroslav Novak
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: