5 Replies Latest reply on Jul 9, 2012 6:55 AM by Hannes Weninger

    JBoss 7 not reachable

    Hannes Weninger Newbie



      I have a problem to reach JBoss7 on CentOS. When I start the JBoss I get the following trace below. Among other things I get the bold typed line (Unable to use InetAddress.getLocalHost() to resolve address.)

      and I can't reach JBoss with or

      Does anyone know what I'am doing wrong or what I have to set at CentOS that I can reach JBoss externally?


      Thanks a lot,





      ...# sh standalone.sh



        JBoss Bootstrap Environment


        JBOSS_HOME: ...


        JAVA: ...


        JAVA_OPTS:  -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml




      10:57:18,313 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA

      10:57:18,702 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA

      10:57:18,790 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting

      10:57:20,849 INFO  [org.xnio] XNIO Version 3.0.3.GA

      10:57:20,860 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)

      10:57:20,894 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA

      10:57:20,928 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA

      10:57:20,992 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers

      10:57:21,002 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem

      10:57:21,040 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.

      10:57:21,207 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension

      10:57:21,217 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem

      10:57:21,226 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem

      10:57:21,232 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem

      10:57:21,418 INFO  [org.jboss.as.connector] (MSC service thread 1-1) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)

      10:57:21,618 INFO  [org.jboss.as.security] (MSC service thread 1-2) JBAS013100: Current PicketBox version=4.0.7.Final

      10:57:21,619 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

      10:57:21,825 INFO  [org.jboss.as.naming] (MSC service thread 1-2) JBAS011802: Starting Naming Service

      10:57:22,076 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-1) JBoss Web Services - Stack CXF Server 4.0.2.GA

      10:57:22,269 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]

      10:57:22,529 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Starting Coyote HTTP/1.1 on http--

      10:57:23,138 WARN  [com.arjuna.ats.arjuna] (Transaction Expired Entry Monitor) ARJUNA012210: Unable to use InetAddress.getLocalHost() to resolve address.

      10:57:23,518 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) JBAS015012: Started FileSystemDeploymentService for directory /opt/apps/jboss-as-7.1.1.Final/standalone/deployments

      10:57:23,644 INFO  [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /

      10:57:23,645 INFO  [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /

      10:57:23,675 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

      10:57:23,838 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on

      10:57:23,839 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 5917ms - Started 133 of 207 services (73 services are passive or on-demand)

        • 1. Re: JBoss 7 not reachable
          Tomaz Cerar Master



          what does "ping localhost" do?


          does ping work?


          all running from that server?






          • 2. Re: JBoss 7 not reachable
            Hannes Weninger Newbie



            1. ping localhost works -> 64 bytes from localhost ( ...

            2. ping works -> 64 bytes from ...


            how can I determine whether all is running from that server -> I suggest that all is running because the stacktrace above is the same like at another server except the bold typed line.

            I wrote a java appl where I fetch the InetAddress.getLocalHost() address and I get the following exception:


            java -jar LocalHostTest.jar

            Exception in thread "main" java.net.UnknownHostException: my.pc.net

                    at java.net.InetAddress.getLocalHost(InetAddress.java:1426)

                    at localhosttest.LocalHostTest.<init>(LocalHostTest.java:9)

                    at localhosttest.LocalHostTest.main(LocalHostTest.java:15)


            I don't know how to solve it, I suggest it is a CentOS specific problem.

            Do you know a further hint to solve this problem?


            Thanks a lot,



            PS: I solved this by adding "IP my.pc.net" to /etc/hosts but with no improvements - I still can't reach the JBoss from externally.

            • 3. Re: JBoss 7 not reachable
              Darran Lofthouse Master

              Looking at the log whilst that error message would require further investigation the server does appear to be running so a connection should be possible.


              In another terminal window execute the following command to verify that JBoss is indeed running and listening for incomming connections: -


                netstat -anp | grep 8080


              At this point also verify that you are not running a firewall and if you are verify that the JBoss ports you are attempting to access are open.

              • 4. Re: JBoss 7 not reachable
                Hannes Weninger Newbie

                Its really funny , Port is open an in state "LISTEN":


                           Local Address               Foreign Address                    State

                tcp*                               LISTEN


                So all is fine. I think it is a security "problem" at CentOS. I havn't switched on any firewall or security concept. Maybe anyone knows how I can switch off this security things.

                Thanks for the help.


                All the best.

                Hannes Weninger

                • 5. Re: JBoss 7 not reachable
                  Hannes Weninger Newbie

                  I have the solution -> turn of firewall of CentOS!!

                  Thanks a lot for the answers