0 Replies Latest reply on Aug 17, 2019 12:48 PM by rameshsah

    Arquillian Test: Interceptor for {unix://localhost:80/v1.30/networks/create}WebClient has thrown exception

    rameshsah

      Server Version: 18.09.0

      java version "1.8.0_172"

      Apache Maven 3.5.4

       

       

      <artifactId>cxf-rt-transports-http</artifactId>

      <version>3.1.8</version>

       

      I am trying to setup arquillian. Any idea what might be cause the error below, it appears that its failing while creating docker network.

       

      ERROR:

       

      WARNING: Argument 2 (of type ContainerRegistry) for org.arquillian.cube.impl.client.container.ContainerMetadataUpdater#updateResolvedContainersName is null. Observer method won't be invoked.

      CubeDockerConfiguration:

        serverVersion = 1.30

        serverUri = unix:///var/run/docker.sock

        tlsVerify = false

        dockerServerIp = localhost

        definitionFormat = COMPOSE

        autoStartContainers = unifiedPromiseService_3a5c7a1e-cdfc-4d97-99c0-69cee83a0735

        clean = true

        removeVolumes = true

        dockerContainers = containers:

        unifiedPromiseService_3a5c7a1e-cdfc-4d97-99c0-69cee83a0735:

          aliases: [promiseService]

          alwaysPull: false

          image: tutum/tomcat

          killContainer: false

          manual: false

          networkMode: automationNetworkTest_3a5c7a1e-cdfc-4d97-99c0-69cee83a0735

          networks: [automationNetworkTest_3a5c7a1e-cdfc-4d97-99c0-69cee83a0735]

          portBindings: !!set {65499->8080/tcp: null}

          readonlyRootfs: false

          removeVolumes: true

      networks:

        automationNetworkTest_3a5c7a1e-cdfc-4d97-99c0-69cee83a0735: {driver: bridge}

       

       

        (E) HostIpContext

        (E) CubeDockerConfiguration

        (O) StandaloneAutoStartConfigurator.configure

        (O) DockerClientCreator.createClient

        (E) DockerClientExecutor

        (O) CubeDockerRegistrar.register

        (O) ClientCubeControllerCreator.createClientCubeController

        (E) ClientCubeController

        (O) ContainerObjectFactoryRegistrar.createClientCubeController

        (E) DockerContainerObjectFactory

        (O) RestAssuredConfigurator.configure

        (E) RestAssuredConfiguration

        (O) RestAssuredCustomizer.configureRequestSpecBuilder

      Aug 17, 2019 9:12:44 AM org.jboss.arquillian.core.impl.ObserverImpl resolveArguments

      WARNING: Argument 3 (of type RequestSpecBuilder) for org.arquillian.cube.docker.restassured.RestAssuredCustomizer#configureRequestSpecBuilder is null. Observer method won't be invoked.

        (O) RestAssuredCustomizer.configure

        (E) RequestSpecBuilder

      (E) BeforeSuite

        (I) TestContextHandler.createSuiteContext

        (O) NetworkLifecycleController.createNetworks

      "Interceptor for {unix://localhost:80/v1.30/networks/create}WebClient has thrown exception, unwinding now

      "org.apache.cxf.interceptor.Fault: Could not send Message.

        at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:48)

        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)

        at org.apache.cxf.jaxrs.client.AbstractClient.doRunInterceptorChain(AbstractClient.java:666)

        at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1034)

        at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:892)

        at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:863)

        at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:426)

        at org.apache.cxf.jaxrs.client.WebClient$SyncInvokerImpl.method(WebClient.java:1562)

        at org.apache.cxf.jaxrs.client.WebClient$SyncInvokerImpl.post(WebClient.java:1502)

        at org.apache.cxf.jaxrs.client.spec.InvocationBuilderImpl.post(InvocationBuilderImpl.java:150)

        at com.github.dockerjava.jaxrs.CreateNetworkCmdExec.execute(CreateNetworkCmdExec.java:29)

        at com.github.dockerjava.jaxrs.CreateNetworkCmdExec.execute(CreateNetworkCmdExec.java:14)

        at com.github.dockerjava.jaxrs.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:23)

        at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)

        at org.arquillian.cube.docker.impl.docker.DockerClientExecutor.createNetwork(DockerClientExecutor.java:1104)

        at org.arquillian.cube.docker.impl.client.NetworkLifecycleController.createNetworks(NetworkLifecycleController.java:34)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:498)

        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)

        at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)

        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)

        at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:69)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:498)

        at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)

        at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)

        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)

        at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)

        at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:71)

        at org.jboss.arquillian.testng.Arquillian.arquillianBeforeSuite(Arquillian.java:65)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:498)

        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)

        at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:523)

        at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:224)

        at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:146)

        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:326)

        at org.testng.SuiteRunner.run(SuiteRunner.java:289)

        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)

        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)

        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)

        at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)

        at org.testng.TestNG.runSuites(TestNG.java:1144)

        at org.testng.TestNG.run(TestNG.java:1115)

        at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281)

        at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)

        at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121)

        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)

        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)

        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)

      Caused by: java.net.MalformedURLException: unknown protocol: unix

        at java.net.URL.<init>(URL.java:600)

        at java.net.URL.<init>(URL.java:490)

        at java.net.URL.<init>(URL.java:439)

        at java.net.URI.toURL(URI.java:1089)

        at org.apache.cxf.transport.http.Address.getURL(Address.java:60)

        at org.apache.cxf.transport.http.URLConnectionHTTPConduit.createConnection(URLConnectionHTTPConduit.java:104)

        at org.apache.cxf.transport.http.URLConnectionHTTPConduit.setupConnection(URLConnectionHTTPConduit.java:117)

        at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:497)

        at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)

        ... 55 more

        (E) ProcessingException

       

       

      Arquillian.xml

       

       

      <?xml version="1.0" encoding="UTF-8"?>

      <arquillian

              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

              xmlns="http://jboss.org/schema/arquillian"

              xsi:schemaLocation="http://jboss.org/schema/arquillian

        http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

       

              <extension qualifier="docker">

                      <property name="serverVersion">1.30</property>

                   <!--    <property name="serverUri">${DOCKER_SERVER}</property>-->

                      <property name="serverUri">unix:///var/run/docker.sock</property>

                      <property name="definitionFormat">COMPOSE</property>

                      <property name="dockerContainersFile">docker-compose.yml</property>

                       <property name="autoStartContainers">regexp:(.*)</property>

              <property name="clean">true</property>

       

       

        <property name="cubeSpecificProperties">

                  unifiedPromiseService:

                    await:

                      strategy: sleeping

                      sleepTime: 70 s

                    beforeStop:

                        - log:

                            to: logs/unifiedpromise.log

                            stdout: true

                            stderr: true

       

          </property>

       

              </extension>

          <extension qualifier="restassured">

              <property name="port">1000</property>

          </extension>

            </arquillian>

      ~

       

       

      docker-compose.yml

       

       

      version: '3'

      networks:

        automationNetworkTest*:

          driver: bridge

      services:

          unifiedPromiseService*:

            image: tutum/tomcat

            ports:

              - "8080"

            networks:

              automationNetworkTest*:

                aliases:

                  - promiseService