7 Replies Latest reply on Jun 4, 2014 3:25 AM by kpiwko

    Connection problem when running Arquillian test on a remote machine

    dave00

      Hi all,

       

      I have problems executing my Arquillian tests on a remote machine (hence also as a remote container).

       

      When i had my first trials i had to realize that the JBoss container binding is not right. I modified it as follows:

       

          <interfaces>
              <interface name="management">
                  <inet-address value="${jboss.bind.address.management:0.0.0.0}"/>
              </interface>
              <interface name="public">
                  <any-address/>
              </interface>
              <interface name="unsecure">
                  <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
              </interface>
          </interfaces>
      
      

       

      Previously the management was binding to 127.0.0.1.

      First of all is this alright?

       

      After this change the connection could be made then i had some authentication problem which i resolved by adding the correct credentials (username, password) to the arquillian.xml.

       

      Now my test is deployed succesfully but when the actual test execution is on plate the following happens:

       

      Caused by: java.lang.IllegalStateException: Error launching request at http://0.0.0.0:15080/arquillian_20140529_143931/ArquillianServletRunner?outputMode=serializedObject&className=...... No result returned
          [junit] at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.executeWithRetry(ServletMethodExecutor.java:139)
          [junit] at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:99)
      
      

       

      Please forgive this stupid question, but the actual URL lookup for the ArquillianServletRunner is happening in the container or from the client side? Should i finesse the binding to make this work?

       

      I am using Arquillian 1.1.1.Final right now. Just let me know if i should communicate further details of my setup.

       

      Many thanks in advance,
      Dave

        • 1. Re: Connection problem when running Arquillian test on a remote machine
          yck

          I have the exact same problem with following configuration (remote machine is a vm running JbossAS 7.2)                                                                                    

           

           

          <interfaces>
          <interface name="management">
          <inet-address value="${jboss.bind.address.management:0.0.0.0}"/>
          </interface>
          <interface name="public">
          <inet-address value="${jboss.bind.address:0.0.0.0}"/>
          </interface>
          <interface name="unsecure">
          <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
          </interface>
          </interfaces>
          • 2. Re: Connection problem when running Arquillian test on a remote machine
            kpiwko

            Hi,

             

            can you try to replace 0.0.0.0 with a real IP address in Arquillian configuration?

             

            URL lookup is performed on client side - container is supposed to return metadata in deployment phase that are used to construct URL.

             

            Karel

            • 3. Re: Connection problem when running Arquillian test on a remote machine
              yck

              Hey,

              i have the  following arquillian configuration

               

              <property name="username">RIS TESTER</property>

                    <property name="password">xx</property>

                    <property name="managementPort">9999</property>

                    <property name="managementAddress">connectm-wn-01</property> (name of the vm in network)

               

              this used to work for me.. but i dont get why the arquillian takes the 0.0.0.0 as the host?

              • 4. Re: Connection problem when running Arquillian test on a remote machine
                dave00

                Hi,

                 

                Thanks for the tip! I will give it a try. I will have to think through though then how to configure the remote instance. It is an integration environment but nearly the same package is deployed as for dev. It seems i will then probably need to make some config changes.

                I will get back with the result.

                 

                Cheers!

                • 5. Re: Connection problem when running Arquillian test on a remote machine
                  dave00

                  Hi,

                  I have changed the JBoss binding for "management" to be a real IP. Also set the real IP in the Arquillian config. For some reason it still it tries to resolve it as 0.0.0.0.

                   

                  (i have verified the jboss binding from the log and the arquillian config by once mistyping the IP address intentionally)

                   

                  You said the url lookup is performed on the client side (thanks for the explanation) but then i don't understand from where it gets the 0.0.0.0.

                   

                  Regards

                  • 6. Re: Connection problem when running Arquillian test on a remote machine
                    yck

                    Hi, Try to set all interface adresses to 0.0.0.0, that worked for me

                    • 7. Re: Connection problem when running Arquillian test on a remote machine
                      kpiwko

                      Related to can kesen's response, it is likely that server returns 0.0.0.0 as it is setup as its bind address. This 0.0.0.0 is returned in metada by server to client that constructs the response.

                       

                      Would starting JBoss AS/ WildFly with -Djboss.bind.address=real.ip -Djboss.bind.address.management=real.ip fix the problem?