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

org.jboss.test.util.test.TwiddleUnitTestCase can't connect to host

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 4.2.0.GA_CP01
    • 4.2.RC3
    • Testsuite
    • None
    • x86, Windows 2003 , Sun and BEA JVM

    • Release Notes
    • Hide

      Run the testsuite without specifying IP addresses.

      Show
      Run the testsuite without specifying IP addresses.
    • Low

    Description

      1. The test testGet() in org.jboss.test.util.test.TwideleUnitTestCase builds a twiddle command line, execs the command line and checks that the output received from the server macthes the expected output. Comamnd lines are built, based on OS type: there is one for Windows and one for UNIX.

      The command line built when executing on Windows is:
      > cmd /C twiddle get "jboss.system:type=Server" "Started"

      and the response should be
      "Started=true"

      It appears that twiddle had an option for specifying the server host, but this option has been commented out.
      When executing the test on Windows, twiddle tries by default to connect to the server using localhost:1099.

      2. When the testsuite is run using the parameters node0/node1 to specify the host IP addresses, localhost:1099 is not available
      and the test fails. Here is the error text when run ning the test by hand:

      O:\JBPAPP\JBPAPP-05-11-07-rc3-x86-Sun\jboss-eap-4.2\jboss-as\bin>cmd /C twiddle get "jboss.system:type=Server" "Started"
      19:14:28,890 ERROR [Twiddle] Exec failed
      org.jboss.util.NestedRuntimeException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.Communicat
      ionException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]; - nested throwable: (javax.naming.CommunicationException
      : Could not obtain connection to any of these urls: localhost: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 localhost:
      1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Conne
      ction refused: connect]]])
      at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:143)
      at org.jboss.console.twiddle.command.MBeanServerCommand.getMBeanServer(MBeanServerCommand.java:59)
      at org.jboss.console.twiddle.command.GetCommand.execute(GetCommand.java:149)
      at org.jboss.console.twiddle.Twiddle.main(Twiddle.java:305)
      Caused by: javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.C
      ommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationExc
      eption: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root
      exception is java.net.ConnectException: Connection refused: connect]]]
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
      at javax.naming.InitialContext.lookup(InitialContext.java:351)
      at org.jboss.console.twiddle.Twiddle.createMBeanServerConnection(Twiddle.java:250)
      at org.jboss.console.twiddle.Twiddle.connect(Twiddle.java:268)
      at org.jboss.console.twiddle.Twiddle.access$300(Twiddle.java:62)
      at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:139)
      ... 3 more

      If the server is started without specifying IP addresses, the host names used are 127.0.0.1 and localhost.localdomain, and the test works.

      This test needs to take into account the fact that we run the testsuite using node0 and node1.

      3. I have instances of the test passing on x86_64 Windows 2003, which is puzzling. I'm looking into it.

      Attachments

        Issue Links

          Activity

            People

              rachmato@redhat.com Richard Achmatowicz
              rachmato@redhat.com Richard Achmatowicz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: