5 Replies Latest reply on Nov 10, 2011 2:25 PM by mikereiche

    Could not connect to:  : 60009                java.net.SocketException: Unrecognized Windows Sockets error: 10106: create

    Hans-Michael Rupp Novice

      Hallo,

       

      I have set up a maven project using

      org.jboss.spec.archetypes:jboss-javaee6-webapp

       

      A JBoss 7 instance has been started

      After that I have tried to run

      mvn clean test -Parq-jbossas-remote

      The is build completes succesfully however it logs:

      INFO: Could not read active container configuration: null

       

      When I try to run the same test from eclipse I get

      Could not connect to:  : 60009

      java.net.SocketException: Unrecognized Windows Sockets error: 10106: create

      at java.net.Socket.createImpl(Socket.java:397)
      at java.net.Socket.<init>(Socket.java:371)
      at java.net.Socket.<init>(Socket.java:189)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.connect(RemoteTestRunner.java:570)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:381)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

       

       

      Thanks for any help,

       

      Hans

        • 1. Re: Could not connect to:  : 60009                java.net.SocketException: Unrecognized Windows Sockets error: 10106: create
          zeeman Novice

          If you're using remote jboss with Arquillian, jboss should be already running. If you use managed, jboss should not be already running.

           

          From Eclipse you need to be sure you have the needed profile running. See https://docs.jboss.org/author/display/ARQ/Setting+up+and+running+the+test+in+Eclipse

           

          Be sure to mark this as answered.

          • 2. Re: Could not connect to:  : 60009                java.net.SocketException: Unrecognized Windows Sockets error: 10106: create
            Hans-Michael Rupp Novice

            Thanks for your answer.

            I have tried to follow the docu you have cited.

            Installed m2e. Imported the project as Existing Maven Project

            Set the Active Maven Profile to

            arq-jbossas-managed

            (JBoss not running)

             

            When I run the test as JUnit Test I get:

            26.10.2011 08:09:01 org.jboss.arquillian.container.impl.client.container.ContainerRegistryCreator getActivatedConfiguration

            INFO: Could not read active container configuration: null

             

            org.jboss.arquillian.container.spi.ConfigurationException: jbossHome '/path/to/jboss/as' must exist

                at org.jboss.arquillian.container.spi.client.deployment.Validate.configurationDirectoryExists(Validate.java:93)

                at org.jboss.as.arquillian.container.managed.ManagedContainerConfiguration.validate(ManagedContainerConfiguration.java:50)

                at org.jboss.arquillian.container.impl.ContainerImpl.createDeployableConfiguration(ContainerImpl.java:86)

                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$4.perform(ContainerLifecycleController.java:125)

                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$4.perform(ContainerLifecycleController.java:106)

                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forContainer(ContainerLifecycleController.java:182)

                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.setupContainer(ContainerLifecycleController.java:105)

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

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

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

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

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

                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.createContainerContext(ContainerDeploymentContextHandler.java:57)

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

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

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

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

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

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

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

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

                at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)

                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$1.perform(ContainerLifecycleController.java:68)

                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$1.perform(ContainerLifecycleController.java:61)

                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forEachContainer(ContainerLifecycleController.java:175)

                at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.setupContainers(ContainerLifecycleController.java:60)

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

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

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

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

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

                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:134)

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

                at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)

                at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:82)

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

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

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

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

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

                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.createSuiteContext(TestContextHandler.java:54)

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

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

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

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

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

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

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

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

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

                at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:76)

                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)

                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)

            • 3. Re: Could not connect to:  : 60009                java.net.SocketException: Unrecognized Windows Sockets error: 10106: create
              zeeman Novice

              Your jboss path is not configured as you can see from the error. You have two ways to setup the path to jboss to connect to:

               

              1- From your pom.xml set a JBOSS_HOME to point to your jboss installation.

              2- In Arquillian.xml set the jbossHome property.

              • 4. Re: Could not connect to:  : 60009                java.net.SocketException: Unrecognized Windows Sockets error: 10106: create
                Hans-Michael Rupp Novice

                Thanks for your reply,

                 

                from the pom.xml

                [code]

                <properties>

                          <!-- Specify the JBoss AS directory to be the JBOSS_HOME environment

                         variable -->

                      <jboss.home>D:\jboss-7</jboss.home>

                </properties>

                 

                <profile>

                         <!-- An optional Arquillian testing profile that executes tests

                            in a remote JBoss AS instance -->

                         <!-- Run with: mvn clean test -Parq-jbossas-remote -->

                         <id>arq-jbossas-remote</id>

                         <dependencies>

                            <dependency>

                               <groupId>org.jboss.as</groupId>

                               <artifactId>jboss-as-arquillian-container-remote</artifactId>

                               <version>7.0.0.CR1</version>

                               <scope>test</scope>

                            </dependency>

                         </dependencies>

                      </profile>

                [/code]

                 

                arquillian.xml

                [code]

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

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

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

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

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

                 

                   <!-- Uncomment to have test archives exported to the file system for inspection -->

                <!--    <engine>  -->

                <!--       <property name="deploymentExportPath">target/</property>  -->

                <!--    </engine> -->

                 

                   <!-- Example configuration for a remote JBoss AS 7 instance -->

                   <container qualifier="jboss" default="true">

                      <protocol type="jmx-as7">

                         <property name="executionType">REMOTE</property>

                      </protocol>

                      <configuration>

                         <property name="jbossHome">D:\jboss-7</property>

                      </configuration>

                   </container>

                </arquillian>

                [/code]

                 

                Active Maven Profile in Eclipse:

                arq-jbossas-remote

                 

                JBoss AS7 is running in standalone mode.

                 

                When trying to run MemberRegistrationTest

                from Eclipse as JUnit Test I get:

                [code]

                Could not connect to:  : 50494

                java.net.SocketException: Unrecognized Windows Sockets error: 10106: create

                at java.net.Socket.createImpl(Socket.java:397)
                at java.net.Socket.<init>(Socket.java:371)
                at java.net.Socket.<init>(Socket.java:189)
                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.connect(RemoteTestRunner.java:570)
                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:381)
                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

                 

                [/code]