7 Replies Latest reply on Aug 31, 2014 9:49 AM by luuzz

    Unable to connect to remote host controller from slave

    suyograj

      Hello,

      I clustered JBoss as 7.1.1 (master & slave). But I unable to connect to the host controller from slave. Following is the stack trace of slave server. I go through various discussion but unable to sortout my problem please help me out of it.

      Thanks in advance & regards

      Suyog

       

      C:\SamyakSoft\jboss-as-7.1.1.Final\bin>domain.bat

      Calling "C:\SamyakSoft\jboss-as-7.1.1.Final\bin\domain.conf.bat"

      JAVA_HOME is not set. Unexpected results may occur.

      Set JAVA_HOME to the directory of your local JDK to avoid this message.

      ===============================================================================

       

        JBoss Bootstrap Environment

       

        JBOSS_HOME: C:\SamyakSoft\jboss-as-7.1.1.Final

       

        JAVA: java

       

        JAVA_OPTS: -Dprogram.name=domain.bat -Xms64M -Xmx512M -XX:MaxPermSize=256M -Ds

      un.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dj

      ava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Djboss.modules.s

      ystem.pkgs=org.jboss.byteman -Djboss.domain.default.config=domain.xml -Djboss.ho

      st.default.config=host.xml

       

      ===============================================================================

       

      19:21:30,475 INFO  [org.jboss.modules] (main) JBoss Modules version 1.1.1.GA

      19:21:30,616 INFO  [org.jboss.as.process.Host Controller.status] (main) JBAS012017: Starting process 'Host Controller'

      [Host Controller] 19:21:31,146 INFO  [org.jboss.modules] (main) JBoss Modules version 1.1.1.GA

      [Host Controller] 19:21:31,271 INFO  [org.jboss.msc] (main) JBoss MSC version 1.0.2.GA

      [Host Controller] 19:21:31,380 INFO  [org.jboss.as] (MSC service thread 1-3) JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting

      [Host Controller] 19:21:31,942 INFO  [org.xnio] (MSC service thread 1-3) XNIO Version 3.0.3.GA

      [Host Controller] 19:21:31,957 INFO  [org.xnio.nio] (MSC service thread 1-3) XNIO NIO Implementation Version 3.0.3.GA

      [Host Controller] 19:21:31,973 INFO  [org.jboss.remoting] (MSC service thread 1-3) JBoss Remoting version 3.2.3.GA

      [Host Controller] 19:21:37,308 WARN  [org.jboss.as.host.controller] (ControllerBoot Thread) JBAS010900: Could not connect to remote domain controller

      192.168.1.204:9999: java.net.ConnectException: JBAS012144: Could not connect to remote://192.168.1.204:9999. The connection timed out

      [Host Controller] 19:21:43,376 WARN  [org.jboss.as.host.controller] (ControllerBoot Thread) JBAS010900: Could not connect to remote domain controller

      192.168.1.204:9999: java.net.ConnectException: JBAS012144: Could not connect to remote://192.168.1.204:9999. The connection timed out

      [Host Controller] 19:21:49,492 WARN  [org.jboss.as.host.controller] (ControllerBoot Thread) JBAS010900: Could not connect to remote domain controller

      192.168.1.204:9999: java.net.ConnectException: JBAS012144: Could not connect to remote://192.168.1.204:9999. The connection timed out

      [Host Controller] 19:21:55,545 WARN  [org.jboss.as.host.controller] (ControllerBoot Thread) JBAS010900: Could not connect to remote domain controller

      192.168.1.204:9999: java.net.ConnectException: JBAS012144: Could not connect to remote://192.168.1.204:9999. The connection timed out

      [Host Controller] 19:22:01,613 WARN  [org.jboss.as.host.controller] (ControllerBoot Thread) JBAS010900: Could not connect to remote domain controller 192.168.1

      .204:9999: java.net.ConnectException: JBAS012144: Could not connect to remote://192.168.1.204:9999. The connection timed out

      [Host Controller] 19:22:07,666 ERROR [org.jboss.as.host.controller] (ControllerBoot Thread) JBAS010901: Could not connect to master. Aborting. Error was: java.

      lang.IllegalStateException: JBAS010951: Could not connect to master in 5 attempts within 30000 ms

      [Host Controller] 19:22:08,664 INFO  [org.jboss.as] (MSC service thread 1-3) JBAS015950: JBoss AS 7.1.1.Final "Brontes" stopped in 996ms

      19:22:09,179 INFO  [org.jboss.as.process.Host Controller.status] (reaper for Host Controller) JBAS012010: Process 'Host Controller' finished with an exit status of 99

      19:22:09,179 INFO  [org.jboss.as.process] (Thread-8) JBAS012016: Shutting down process controller

      19:22:09,195 INFO  [org.jboss.as.process] (Thread-8) JBAS012015: All processes finished; exiting

      Press any key to continue . . .

       

       

      *)here is the host.xml from slave machine

       

      <host name="slave" xmlns="urn:jboss:domain:1.2">

       

          <management>

              <security-realms>

                  <security-realm name="ManagementRealm">

                      <server-identities>

                          <secret value="MTkzMzU2ODY4MDgzMTc2OTQ4ZjBkMzQzNzMzNWI5YWQ="/>

                      </server-identities>

                      <authentication>

                          <properties path="mgmt-users.properties" relative-to="jboss.domain.config.dir"/>

                      </authentication>

                  </security-realm>

                  <security-realm name="ApplicationRealm">

                      <authentication>

                          <properties path="application-users.properties" relative-to="jboss.domain.config.dir" />

                      </authentication>

                  </security-realm>

              </security-realms>

              <management-interfaces>

                  <native-interface security-realm="ManagementRealm">

                      <socket interface="management" port="${jboss.management.native.port:9999}"/>

                  </native-interface>

                  <http-interface security-realm="ManagementRealm">

                      <socket interface="management" port="${jboss.management.http.port:9990}"/>

                  </http-interface>

              </management-interfaces>

          </management>

       

          <domain-controller>

             <remote host="${jboss.domain.master.address:192.168.1.204}" port="${jboss.domain.master.port:9999}" security-realm="ManagementRealm"/>

             <!-- Alternative remote domain controller configuration with a host and port -->

             <!-- <remote host="${jboss.domain.master.address}" port="${jboss.domain.master.port:9999}"/> -->

          </domain-controller>

       

          <interfaces>

              <interface name="management">

                  <inet-address value="${jboss.bind.address.management:192.168.1.202}"/>

              </interface>

              <interface name="public">

                 <inet-address value="${jboss.bind.address:192.168.1.202}"/>

              </interface>

              <interface name="unsecure">

                  <inet-address value="192.168.1.202"/>

              </interface>

          </interfaces>

       

           <jvms>

              <jvm name="default">

                <heap size="64m" max-size="256m"/>

                <permgen size="256m" max-size="256m"/>

                  <jvm-options>

                      <option value="-server"/>

                  </jvm-options>

             </jvm>

           </jvms>

       

          <servers>

              <server name="Samyak123" group="main-server-group">

              </server>

          </servers>

      </host>

       

       

      *)host.xml of master machine.

       

      <host name="master" xmlns="urn:jboss:domain:1.2">

       

          <management>

              <security-realms>

                  <security-realm name="ManagementRealm">

                      <authentication>

                          <properties path="mgmt-users.properties" relative-to="jboss.domain.config.dir"/>

                      </authentication>

                  </security-realm>

                  <security-realm name="ApplicationRealm">

                      <authentication>

                          <properties path="application-users.properties" relative-to="jboss.domain.config.dir" />

                      </authentication>

                  </security-realm>

              </security-realms>

              <management-interfaces>

                  <native-interface security-realm="ManagementRealm">

                      <socket interface="management" port="${jboss.management.native.port:9999}"/>

                  </native-interface>

                  <http-interface security-realm="ManagementRealm">

                      <socket interface="management" port="${jboss.management.http.port:9990}"/>

                  </http-interface>

              </management-interfaces>

          </management>

       

          <domain-controller>

             <local/>

             <!-- Alternative remote domain controller configuration with a host and port -->

             <!-- <remote host="${jboss.domain.master.address}" port="${jboss.domain.master.port:9999}"/> -->

          </domain-controller>

       

          <interfaces>

              <interface name="management">

                  <inet-address value="${jboss.bind.address.management:192.168.1.204}"/>

              </interface>

              <interface name="public">

                 <inet-address value="${jboss.bind.address:192.168.1.204}"/>

              </interface>

              <interface name="unsecure">

                  <!-- Used for IIOP sockets in the standard configuration.

                       To secure JacORB you need to setup SSL -->

                  <inet-address value="192.168.1.204"/>

              </interface>

          </interfaces>

       

           <jvms>

              <jvm name="default">

                <heap size="64m" max-size="256m"/>

                <permgen size="256m" max-size="256m"/>

                  <jvm-options>

                      <option value="-server"/>

                  </jvm-options>

             </jvm>

           </jvms>

       

          <servers>

              <server name="server-one" group="main-server-group">

              </server>

              <server name="server-two" group="main-server-group" auto-start="true">

                  <!-- server-two avoids port conflicts by incrementing the ports in

                       the default socket-group declared in the server-group -->

                  <socket-bindings port-offset="150"/>

              </server>

              <server name="server-three" group="other-server-group" auto-start="false">

                  <!-- server-three avoids port conflicts by incrementing the ports in

                       the default socket-group declared in the server-group -->

                  <socket-bindings port-offset="250"/>

              </server>

          </servers>

      </host>

        • 1. Re: Unable to connect to remote host controller from slave
          wdfink

          Looks like you can not connect from the slave machine to the master.

          A simple test is to ping the master host from the slave, if you have a browser at the slave you might use http://192.168.1.204:9990 to check whether you can see the management console or have errors here also.

          • 2. Re: Unable to connect to remote host controller from slave
            suyograj

            Hi Wolf-Dieter, thanks for the suggestion.

            I pinging from slave with http://192.168.1.204:9990 from browser, I am able to see the management console prompting me for management user name & password.

            I also check for ping from command prompt everything is looks good & no error on console.

             

            *) ping output from master machine prompt. (192.168.1.202 slave machine ip)

            C:\>ping 192.168.1.202

             

            Pinging 192.168.1.202 with 32 bytes of data:

            Reply from 192.168.1.202: bytes=32 time<1ms TTL=64

            Reply from 192.168.1.202: bytes=32 time<1ms TTL=64

            Reply from 192.168.1.202: bytes=32 time<1ms TTL=64

            Reply from 192.168.1.202: bytes=32 time<1ms TTL=64

             

            Ping statistics for 192.168.1.202:

                Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

            Approximate round trip times in milli-seconds:

                Minimum = 0ms, Maximum = 0ms, Average = 0ms

             

            *) ping output from slave machine prompt

            C:\>ping 192.168.1.204

             

            Pinging 192.168.1.204 with 32 bytes of data:

            Reply from 192.168.1.204: bytes=32 time<1ms TTL=64

            Reply from 192.168.1.204: bytes=32 time<1ms TTL=64

            Reply from 192.168.1.204: bytes=32 time=3ms TTL=64

            Reply from 192.168.1.204: bytes=32 time<1ms TTL=64

             

            Ping statistics for 192.168.1.204:

                Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

            Approximate round trip times in milli-seconds:

                Minimum = 0ms, Maximum = 3ms, Average = 0ms

            • 3. Re: Unable to connect to remote host controller from slave
              wdfink

              What about Windows firewall, maybe the java process is not able to connect because it's blocked.

              Maybe you switch of both firewalls for a test.

              • 4. Re: Unable to connect to remote host controller from slave
                suyograj

                I checked for both firewalls its off, but again it gives same previous error could not connect to remote connection time out

                Thanks,

                Suyog.

                • 5. Re: Unable to connect to remote host controller from slave
                  wdfink

                  What if you change the direction?

                  I mean use the 'master' machine as 'slave' and vice versa

                  • 6. Re: Unable to connect to remote host controller from slave
                    suyograj

                    Hi Mr. Fink, thank you for the reply & your valuable suggestion. I try it & it got works, but I unable to understand why it doesn't succed on machine which I want to make master?

                    • 7. Re: Unable to connect to remote host controller from slave
                      luuzz

                      Hi,

                      We faced the same issue and after testing we see that everything is working fine when we change the direction.

                      But in our case we can't keep it like that.

                      Is there a way to get this working without changing direction ?

                      Thanks in advance