Could you try something please?
Update the standalone-full.xml by adding an outbound-socket-binding in the
standard-sockets group:
<outbound-socket-binding name="http-messaging">
<remote-destination host="${jboss.messaging.http.host:localhost}"
port="${jboss.http.port:8080}"/>
</outbound-socket-binding>
and reference this socket-binding (http-messaging) from the messaging’s http-connector:
<http-connector name="http-connector"
socket-binding="http-messaging">
<param key="http-upgrade-endpoint"
value="http-acceptor"/>
</http-connector>
With that changes, the host setting for the messaging’s HTTP connector is not tied to the
socket bound for the server to accept connections.
You can then start the server with ./standalone.sh -c standalone-full.xml -b 0.0.0.0
-Djboss.messaging.http.host=<your docker IP address>
The server will run fine and JMS clients would be able to connect to the servers through
the <your docker IP address> address.
I assume you can somehow pass an env variable to the Dockerfile so that the IP address can
be specified only when Docker actually run the container…
If you confirm it works, that’s a configuration we can have by default to simplify running
WildFly in a container.
jeff
On 04 May 2015, at 18:38, Arun Gupta <arun.gupta(a)gmail.com>
wrote:
Jeff,
>>
>> docker run -it -p 8080:8080 arungupta/wildfly:9cr1
>>
>> Any idea?
The complete error message is:
15:53:03,915 INFO [org.hornetq.jms.server] (ServerService Thread Pool
-- 65) HQ121005: Invalid "host" value "0.0.0.0" detected for
"http-connector" connector. Switching to "2f9ad0bb1373". If this new
address is incorrect please manually configure the connector to use
the proper one.
>
> You bind all sockets to the 0.0.0.0 address when you start WildFly
> When HornetQ starts, it looks like it is checking whether this address is valid for
clients to connect to the server.
>
> You need to either pass a “valid” address (that clients can connect to) using -b or
you need to tweak the http-connector resource and instead of using the http socket-binding
to specify port=8080 and host=<your docker container address>.
>
Running the following command inside the container:
/opt/jboss/wildfly/bin/standalone.sh -c standalone-full.xml -b 192.168.99.100
gives the following error:
16:00:58,663 INFO [org.jboss.as.server] (Controller Boot Thread)
WFLYSRV0039: Creating http management service using socket-binding
(management-http)
16:00:58,683 INFO [org.xnio] (MSC service thread 1-1) XNIO version 3.3.1.Final
16:00:58,693 INFO [org.xnio.nio] (MSC service thread 1-1) XNIO NIO
Implementation Version 3.3.1.Final
16:00:58,697 ERROR [org.jboss.msc.service.fail] (MSC service thread
1-5) MSC000001: Failed to start service jboss.network.public:
org.jboss.msc.service.StartException in service jboss.network.public:
WFLYSRV0082: failed to resolve interface public
at
org.jboss.as.server.services.net.NetworkInterfaceService.start(NetworkInterfaceService.java:91)
[wildfly-server-1.0.0.CR1.jar:1.0.0.CR1]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
[jboss-msc-1.2.4.Final.jar:1.2.4.Final]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
[jboss-msc-1.2.4.Final.jar:1.2.4.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_65]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
And then all other modules fail with the following error:
16:00:59,499 ERROR [org.jboss.as.controller.management-operation]
(Controller Boot Thread) WFLYCTL0013: Operation ("add") failed -
address: ([
("core-service" => "management"),
("management-interface" => "http-interface")
]) - failure description: {"WFLYCTL0288: One or more services were
unable to start due to one or more indirect dependencies not being
available." => {
"Services that were unable to start:" => [
"jboss.serverManagement.controller.management.http",
"jboss.serverManagement.controller.management.http.shutdown"
],
"Services that may be the cause:" => [
"jboss.http-upgrade-registry.default",
"jboss.remoting.remotingConnectorInfoService.http-remoting-connector"
]
}}
Docker container address may not be known until the actual start,
certainly not when the image is built. The IP address cannot be baked
into the Dockerfile as it may not be available during the build time.
This error message showed up for WildFly 8.2 as well but
http//<CONTAINER_IP>:8080 was accessible. Not in this case.
What changed?
Arun
--
http://blog.arungupta.me
http://twitter.com/arungupta
--
Jeff Mesnil
JBoss, a division of Red Hat
http://jmesnil.net/