7 Replies Latest reply on May 29, 2008 4:49 PM by ishai

    Access to jnp://localhost:1100 is denied on IPv6 dual stack

    ishai

      I would like to bring attention to the following issue happening with 4.0.5.GA Windows 2003

      I have a test application which works fine on IPv4 set-up cluster with nodes bound to host IPv4 ip addresses.
      Same application deployed to identically set-up cluster on IPv6 dual stack ( -Djava.net.preferIPv4Stack=true). The application fails to access HA JMS on jnp://localhost:1100 - . Localhost is resolved as ::1. 127.0.0.1 is pingable but can not be a substitution to localhost on IPv6 dual stack - binding is denied. A work around in this case was to substitute localhost with actual machine's IP in the ear, which is not feasible with farm deployment

      This is the exception on new InitialContext(). Test application can be e-mailed upon request or uploaded.

      javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1100 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 localhost:1100 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1100 [Root exception is java.net.ConnectException: Connection refused: connect]]]]
      at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1067)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:700)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:716)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
      at javax.naming.InitialContext.lookup(InitialContext.java:351)


      Thank you in advance,
      Irena

        • 1. Re: Access to jnp://localhost:1100 is denied on IPv6 dual st
          brian.stansberry

          Are you saying that if you used jnp://127.0.0.1:1100 it didn't work?

          • 2. Re: Access to jnp://localhost:1100 is denied on IPv6 dual st
            ishai

            It will not deploy to begin with.

            • 3. Re: Access to jnp://localhost:1100 is denied on IPv6 dual st
              brian.stansberry

              Can you share more details on the deployment failure?

              • 4. Re: Access to jnp://localhost:1100 is denied on IPv6 dual st
                ishai

                It's actually execution time exception with the preference to IPv4 stack

                javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1100 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 127.0.0.1:1100 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 127.0.0.1:1100 [Root exception is java.net.ConnectException: Connection refused: connect]]]]
                at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1067)
                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:700)
                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:716)
                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
                at javax.naming.InitialContext.lookup(InitialContext.java:351)

                Binding issues were happening with preference to IPv6 stack and are no longer an issue

                • 5. Re: Access to jnp://localhost:1100 is denied on IPv6 dual st
                  brian.stansberry

                  I've been unable to reproduce your problem with the setup you sent me. I have no problem sending messages.

                  What's in your /etc/hosts file? Mine includes

                  # Do not remove the following line, or various programs
                  # that require network functionality will fail.
                  127.0.0.1 localhost.localdomain localhost
                  ::1 localhost6.localdomain6 localhost6
                  


                  What params are you passing to run.sh when you start JBoss?

                  • 6. Re: Access to jnp://localhost:1100 is denied on IPv6 dual st
                    ishai

                    I have -Djava.net.preferIPv4Stack=true in run.sh

                    My localhost is resolved as ::1 and there are no explicit definitions in /etc/hosts for ::1.
                    127.0.0.1 localhost appears in the file.

                    • 7. Re: Access to jnp://localhost:1100 is denied on IPv6 dual st
                      ishai

                      I made a test on my system with the following line in the code (Windows 2k3):

                      127.0.0.1 localhost
                      ::1 localhost6
                      

                      This did not resolve the issue. I am able to ping localhost as ::1 and localhost6 as ::1 as well. 127.0.0.1 is pingable.
                      I think important part is that I am starting run.bat with -b <IPv4 IP>