3 Replies Latest reply on Mar 6, 2009 1:34 AM by peterj

    Does twiddle requires -b 0.0.0.0?

    alegomes

      Look the facts I'm facing with JBoss 4.2.2.GA and tell me if this is the expected behaviour:

      First, I started JBoss with:

      run.sh
      


      and I got:

      ~/Documents/sea/edu/jboss_tuning/app/jboss-4.2.2.GA/bin$ ./twiddle.sh get jboss.system:type=ServerInfo HostAddress
      10:54:35,761 ERROR [Twiddle] Exec failed
      org.jboss.util.NestedRuntimeException: - nested throwable: (javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 192.168.1.17; nested exception is:
       java.net.ConnectException: Connection refused])
       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)
      


      Then, I started JBoss with:

      run.sh -b 192.168.1.17
      


      and got this time:

      ~/Documents/sea/edu/jboss_tuning/app/jboss-4.2.2.GA/bin$ ./twiddle.sh get jboss.system:type=ServerInfo HostAddress
      11:05:41,966 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.CommunicationException: 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: Connection refused]]])
      


      So, I tried:

      run.sh -b 0.0.0.0


      and, finally, there it goes:

      ~/Documents/sea/edu/jboss_tuning/app/jboss-4.2.2.GA/bin$ ./twiddle.sh get jboss.system:type=ServerInfo HostAddress
      HostAddress=192.168.1.17
      



      Is that correct? Should I bind JBoss AS to every interfaces to get twiddle working?

      thanks

        • 1. Re: Does twiddle requires -b 0.0.0.0?
          peterj

          Looks like your /etc/hosts file is not correct. Here's some info on checking that your hosts file is set correctly: http://www.cpqlinux.com/hostname.html

          If that doesn't help, post the hosts file.

          • 2. Re: Does twiddle requires -b 0.0.0.0?
            alegomes

            I'm not sure the problem is in hosts file.

            PowerBook-do-Ale:/ alegomes$ cat /etc/hosts
            # Host Database
            #
            # localhost is used to configure the loopback interface
            # when the system is booting. Do not change this entry.
            ##
            192.168.1.20 desenvolvimento
            127.0.0.1 localhost
            255.255.255.255 broadcasthost
            ::1 localhost
            10.18.0.34 cpe.trt18.jus.br
            PowerBook-do-Ale:/ alegomes$ hostname
            PowerBook-do-Ale.local[\code]


            • 3. Re: Does twiddle requires -b 0.0.0.0?
              peterj

              What results to you get when entering:

              telnet localhost 1099

              Try this when running JBoss AS with '-b 0.0.0.0' and '-b 192.168.1.17'. Post the response.

              (Using telnet to debug your hosts settings has been discussed before - do a search in the forums on telnet and look at some of those discussions - they might give you some ideas on what the problem might be.)