2

I'm running integration tests under Arquillian + Wildfly Embedded server. Everything works fine. But as soon as I start tests when my local Wildfly is running, I get errors (when wildfly via arquillian is starting, not when I try to send a request in tests):

ERROR [org.jboss.msc.service.fail] MSC000001: Failed to start service
jboss.serverManagement.controller.management.http:
org.jboss.msc.service.StartException in service
jboss.serverManagement.controller.management.http: JBAS015811: Failed
to start the http-interface service     at
org.jboss.as.server.mgmt.UndertowHttpManagementService.start(UndertowHttpManagementService.java:258)
[wildfly-server-8.2.1.Final.jar:8.2.1.Final]    at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]     at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]     at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[rt.jar:1.8.0_45]   at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[rt.jar:1.8.0_45]   at java.lang.Thread.run(Thread.java:745)
[rt.jar:1.8.0_45] Caused by: java.lang.RuntimeException:
java.net.BindException: Address already in use  at
org.jboss.as.domain.http.server.ManagementHttpServer.start(ManagementHttpServer.java:156)
[wildfly-domain-http-interface-8.2.1.Final.jar:8.2.1.Final]     at
org.jboss.as.server.mgmt.UndertowHttpManagementService.start(UndertowHttpManagementService.java:224)
[wildfly-server-8.2.1.Final.jar:8.2.1.Final]    ... 5 more Caused by:
**java.net.BindException: Address already in use**

OK, it's jboss.management.http.port property is responsible for port changing (the jboss.http.port is changed and used already in my environment, so it's not a reason), I fixed it by setting:

<argLine>-Djboss.http.port=8181 -Djboss.management.http.port=9999</argLine>

in the pom.xml

Now when tests are running I can see that new port value is used:

INFO  [org.jboss.as] JBAS015961: Http management interface listening on http://127.0.0.1:9999/management 
INFO  [org.jboss.as] JBAS015951: Admin console listening on http://127.0.0.1:9999

But, anyway I'm getting:

Caused by: java.net.ConnectException: JBAS012144: Could not connect to
**http-remoting://127.0.0.1:9990**. The connection timed out

It seems, I could force Wildfly to use another port, 9999, but Arquillian does not know anything about it. Is there a way to resolve the issue with changing jboss.management.http.port in Arquillian tests right? Ideally without standalone-full.xml using.

Iamat8
  • 3,888
  • 9
  • 25
  • 35
Alexandr
  • 9,213
  • 12
  • 62
  • 102
  • 4
    Have a look at this answer http://stackoverflow.com/questions/24259564/wildfly-port-offset-not-working-with-arquillain#24265187 seems to cover your problem. – SubOptimal Sep 29 '15 at 06:55
  • @SubOptimal, thank you, using arquillin.xml fixed the issue. – Alexandr Sep 29 '15 at 07:25

0 Answers0