2 Replies Latest reply on Jan 18, 2015 7:35 AM by Ralf Battenfeld

    Arquillian Cube with remote docker server

    Ralf Battenfeld Apprentice

      Hi, I'd like to thank you again for the Cube extension.

       

      There are some issues I face with our docker setup:

      • Docker runs on a remote server
      • Unit tests executed by Arquillian are not running on the docker host
      • The instantiated docker container is not accessible (ip address) from remote
      • All communication goes over the exposed ports

       

      I know that it should work when the ip address of the bootstrapped docker container is visible for remote servers but currently we would like to get around this.

       

      The problems are:

      • await strategies. It seems that all strategies do not work with this setup (perhaps only in case of using wildfly)
      • deployment issue. I faked the first issue by hacking one of the strategies but then I get this error:

       

      Jan 17, 2015 10:30:41 AM org.jboss.arquillian.container.impl.MapObject populate
      WARNING: Configuration contain properties not supported by the backing object org.jboss.as.arquillian.container.remote.RemoteContainerConfiguration
      Unused property entries: {target=wildfly:8.2.0.Final:remote}
      Supported property names: [managementPort, username, managementAddress, managementProtocol, password]
      SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
      SLF4J: Defaulting to no-operation (NOP) logger implementation
      SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
      Jan 17, 2015 10:30:42 AM org.glassfish.jersey.filter.LoggingFilter log
      INFO: 1 * Sending client request on thread main
      1 > GET http://mtzhrnesig01:4243/v1.15/_ping
      
      
      Jan 17, 2015 10:30:42 AM org.glassfish.jersey.filter.LoggingFilter log
      INFO: 2 * Client response received on thread main
      2 < 200
      2 < Content-Length: 2
      2 < Content-Type: application/json; charset=utf-8
      2 < Date: Sat, 17 Jan 2015 09:30:50 GMT
      OK
      
      
      Jan 17, 2015 10:30:43 AM org.glassfish.jersey.filter.LoggingFilter log
      INFO: 3 * Sending client request on thread main
      3 > POST http://mtzhrnesig01:4243/v1.15/containers/create?name=wildfly
      3 > Accept: application/json
      3 > Content-Type: application/json
      {"name":"wildfly","dns":null,"capAdd":null,"capDrop":null,"Hostname":"","User":"","Memory":0,"MemorySwap":0,"CpuShares":0,"AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"PortSpecs":null,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":null,"Cmd":null,"Image":"jboss/wildfly-admin","Volumes":{},"VolumesFrom":[],"WorkingDir":"","DisableNetwork":false,"ExposedPorts":{"9990/tcp":{},"8080/tcp":{}},"HostConfig":{"Binds":null,"Links":null,"LxcConf":null,"PortBindings":null,"PublishAllPorts":false,"Privileged":false,"Dns":null,"DnsSearch":null,"VolumesFrom":null,"ContainerIDFile":null,"CapAdd":null,"CapDrop":null,"RestartPolicy":null,"NetworkMode":null,"Devices":null}}
      
      
      Jan 17, 2015 10:30:43 AM org.glassfish.jersey.filter.LoggingFilter log
      INFO: 4 * Client response received on thread main
      4 < 201
      4 < Content-Length: 90
      4 < Content-Type: application/json
      4 < Date: Sat, 17 Jan 2015 09:30:50 GMT
      {"Id":"815e60328493c56aba7684da812e018540ae1e3c517e0af3dc998c2af7093685","Warnings":null}
      
      
      
      
      Jan 17, 2015 10:30:44 AM org.glassfish.jersey.filter.LoggingFilter log
      INFO: 5 * Sending client request on thread main
      5 > POST http://mtzhrnesig01:4243/v1.15/containers/wildfly/start
      5 > Accept: application/json
      5 > Content-Type: application/json
      {"containerId":"wildfly","Binds":[],"Links":[],"LxcConf":null,"PortBindings":{"9990/tcp":[{"HostIp":"","HostPort":"9990"}],"8080/tcp":[{"HostIp":"","HostPort":"8080"}]},"PublishAllPorts":false,"Privileged":false,"Dns":null,"DnsSearch":null,"VolumesFrom":null,"NetworkMode":"bridge","Devices":null,"RestartPolicy":null,"CapAdd":null,"CapDrop":null}
      
      
      Jan 17, 2015 10:30:44 AM org.glassfish.jersey.filter.LoggingFilter log
      INFO: 6 * Client response received on thread main
      6 < 204
      6 < Date: Sat, 17 Jan 2015 09:30:51 GMT
      
      
      Jan 17, 2015 10:30:44 AM org.glassfish.jersey.filter.LoggingFilter log
      INFO: 7 * Sending client request on thread main
      7 > GET http://mtzhrnesig01:4243/v1.15/containers/wildfly/json
      7 > Accept: application/json
      
      
      Jan 17, 2015 10:30:44 AM org.glassfish.jersey.filter.LoggingFilter log
      INFO: 8 * Client response received on thread main
      8 < 200
      8 < Content-Type: application/json
      8 < Date: Sat, 17 Jan 2015 09:30:51 GMT
      8 < Transfer-Encoding: chunked
      {"AppArmorProfile":"","Args":["-b","0.0.0.0","-bmanagement","0.0.0.0"],"Config":{"AttachStderr":false,"AttachStdin":false,"AttachStdout":false,"Cmd":["/opt/jboss/wildfly/bin/standalone.sh","-b","0.0.0.0","-bmanagement","0.0.0.0"],"CpuShares":0,"Cpuset":"","Domainname":"","Entrypoint":null,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","JAVA_HOME=/usr/lib/jvm/java","WILDFLY_VERSION=8.2.0.Final","JBOSS_HOME=/opt/jboss/wildfly"],"ExposedPorts":{"8080/tcp":{},"9990/tcp":{}},"Hostname":"815e60328493","Image":"jboss/wildfly-admin","Memory":0,"MemorySwap":0,"NetworkDisabled":false,"OnBuild":null,"OpenStdin":false,"PortSpecs":null,"StdinOnce":false,"Tty":false,"User":"jboss","Volumes":null,"WorkingDir":"/opt/jboss"},"Created":"2015-01-17T09:30:50.709825038Z","Driver":"devicemapper","ExecDriver":"native-0.2","HostConfig":{"Binds":[],"CapAdd":null,"CapDrop":null,"ContainerIDFile":"","Devices":null,"Dns":null,"DnsSearch":null,"ExtraHosts":null,"Links":null,"LxcConf":null,"NetworkMode":"bridge","PortBindings":{"8080/tcp":[{"HostIp":"","HostPort":"8080"}],"9990/tcp":[{"HostIp":"","HostPort":"9990"}]},"Privileged":false,"PublishAllPorts":false,"RestartPolicy":{"MaximumRetryCount":0,"Name":""},"SecurityOpt":null,"VolumesFrom":null},"HostnamePath":"/var/lib/docker/containers/815e60328493c56aba7684da812e018540ae1e3c517e0af3dc998c2af7093685/hostname","HostsPath":"/var/lib/docker/containers/815e60328493c56aba7684da812e018540ae1e3c517e0af3dc998c2af7093685/hosts","Id":"815e60328493c56aba7684da812e018540ae1e3c517e0af3dc998c2af7093685","Image":"8548566469bee50135d89dd1534b7900be7ae5e43968feea511f6c53f9bf4fdf","MountLabel":"","Name":"/wildfly","NetworkSettings":{"Bridge":"docker0","Gateway":"172.17.42.1","IPAddress":"172.17.0.146","IPPrefixLen":16,"MacAddress":"02:42:ac:11:00:92","PortMapping":null,"Ports":{"8080/tcp":[{"HostIp":"0.0.0.0","HostPort":"8080"}],"9990/tcp":[{"HostIp":"0.0.0.0","HostPort":"9990"}]}},"Path":"/opt/jboss/wildfly/bin/standalone.sh","ProcessLabel":"","ResolvConfPath":"/var/lib/docker/containers/815e60328493c56aba7684da812e018540ae1e3c517e0af3dc998c2af7093685/resolv.conf","State":{"ExitCode":0,"FinishedAt":"0001-01-01T00:00:00Z","Paused":false,"Pid":39768,"Restarting":false,"Running":true,"StartedAt":"2015-01-17T09:30:51.951080928Z"},"Volumes":{},"VolumesRW":{}}
      
      
      
      
      Jan 17, 2015 10:31:07 AM org.xnio.Xnio <clinit>
      INFO: XNIO version 3.2.0.Beta4
      Jan 17, 2015 10:31:08 AM org.xnio.nio.NioXnio <clinit>
      INFO: XNIO NIO Implementation Version 3.2.0.Beta4
      Jan 17, 2015 10:31:10 AM org.jboss.remoting3.EndpointImpl <clinit>
      INFO: JBoss Remoting version (unknown)
      Jan 17, 2015 10:32:43 AM org.jboss.as.arquillian.container.ArchiveDeployer undeploy
      WARN: Cannot undeploy: hello.war
      org.jboss.as.controller.client.helpers.standalone.ServerDeploymentHelper$ServerDeploymentException: java.lang.RuntimeException: java.net.ConnectException: JBAS012144: Could not connect to http-remoting://127.0.0.1:9990. The connection timed out
        at org.jboss.as.controller.client.helpers.standalone.ServerDeploymentHelper.undeploy(ServerDeploymentHelper.java:109)
        at org.jboss.as.arquillian.container.ArchiveDeployer.undeploy(ArchiveDeployer.java:55)
        at org.jboss.as.arquillian.container.CommonDeployableContainer.undeploy(CommonDeployableContainer.java:152)
        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$4.call(ContainerDeployController.java:205)
        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$4.call(ContainerDeployController.java:185)
        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271)
        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.undeploy(ContainerDeployController.java:184)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
        at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
        at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
        at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
        at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$2.perform(ContainerDeployController.java:119)
        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$2.perform(ContainerDeployController.java:110)
        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263)
        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployedDeployment(ContainerDeployController.java:249)
        at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.undeployManaged(ContainerDeployController.java:109)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
        at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
        at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
        at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:108)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
        at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
        at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
        at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
        at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.afterClass(EventTestRunnerAdaptor.java:87)
        at org.jboss.arquillian.junit.Arquillian$3$1.evaluate(Arquillian.java:212)
        at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345)
        at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49)
        at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155)
        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
      Caused by: java.lang.RuntimeException: java.net.ConnectException: JBAS012144: Could not connect to http-remoting://127.0.0.1:9990. The connection timed out
        at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeAsync(AbstractModelControllerClient.java:103)
        at org.jboss.as.controller.client.helpers.standalone.impl.ModelControllerClientServerDeploymentManager.executeOperation(ModelControllerClientServerDeploymentManager.java:50)
        at org.jboss.as.controller.client.helpers.standalone.impl.AbstractServerDeploymentManager.execute(AbstractServerDeploymentManager.java:79)
        at org.jboss.as.controller.client.helpers.standalone.ServerDeploymentHelper.undeploy(ServerDeploymentHelper.java:106)
        ... 82 more
      Caused by: java.net.ConnectException: JBAS012144: Could not connect to http-remoting://127.0.0.1:9990. The connection timed out
        at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:119)
        at org.jboss.as.protocol.ProtocolConnectionManager$EstablishingConnection.connect(ProtocolConnectionManager.java:256)
        at org.jboss.as.protocol.ProtocolConnectionManager.connect(ProtocolConnectionManager.java:70)
        at org.jboss.as.protocol.mgmt.FutureManagementChannel$Establishing.getChannel(FutureManagementChannel.java:204)
        at org.jboss.as.controller.client.impl.RemotingModelControllerClient.getOrCreateChannel(RemotingModelControllerClient.java:148)
        at org.jboss.as.controller.client.impl.RemotingModelControllerClient$1.getChannel(RemotingModelControllerClient.java:67)
        at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:117)
        at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:92)
        at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeRequest(AbstractModelControllerClient.java:236)
        at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:141)
        at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeAsync(AbstractModelControllerClient.java:101)
        ... 85 more
      
      
      Jan 17, 2015 10:32:43 AM org.glassfish.jersey.filter.LoggingFilter log
      INFO: 9 * Sending client request on thread main
      9 > POST http://mtzhrnesig01:4243/v1.15/containers/wildfly/stop?t=10
      9 > Accept: application/json
      9 > Content-Type: application/json
      
      
      Jan 17, 2015 10:32:54 AM org.glassfish.jersey.filter.LoggingFilter log
      INFO: 10 * Client response received on thread main
      10 < 204
      10 < Date: Sat, 17 Jan 2015 09:33:01 GMT
      
      
      Jan 17, 2015 10:32:54 AM org.glassfish.jersey.filter.LoggingFilter log
      INFO: 11 * Sending client request on thread main
      11 > DELETE http://mtzhrnesig01:4243/v1.15/containers/wildfly?v=0&force=0
      11 > Accept: application/json
      
      
      Jan 17, 2015 10:32:56 AM org.glassfish.jersey.filter.LoggingFilter log
      INFO: 12 * Client response received on thread main
      12 < 204
      12 < Date: Sat, 17 Jan 2015 09:33:03 GMT
      
      

       

       

      Are there some additional settings required? I certainly offer to contribute in any way.

       

      Regards,
      Ralf