Connect to WildFly Docker container from host

944 views
Skip to first unread message

Timofey Nevolin

unread,
Jul 18, 2022, 10:34:20 PM7/18/22
to WildFly
Launch some basic Docker WildFly container and expose admin port.

```
docker run --env "WILDFLY_PASSWORD=something" --publish "9990:9990" bitnami/wildfly
```

Connecting to admin interface from inside the container works just fine.
```
$ /opt/bitnami/wildfly/bin/jboss-cli.sh --connect
[standalone@localhost:9990 /]
```

I checked that the port is listening on host.
```
netstat -an | find """9990"""
  TCP    127.0.0.1:9990         0.0.0.0:0              LISTENING
```


But connecting from host never works.
```
jboss-cli.bat --connect
Failed to connect to the controller: The controller is not available at localhost:9990: java.net.ConnectException: WFLYPRT0053: Could not connect to remote+http://localhost:9990. The connection failed: WFLYPRT0053: Could not connect to remote+http://localhost:9990. The connection failed: XNIO000812: Connection closed unexpectedly
```

I tried to enable/disable admin management user. Set its password. Using `--user=adming --password=password` authentication. Nothing works. Any clue?

Thank you.
Tim.

Manuel Finelli

unread,
Jul 20, 2022, 4:43:41 AM7/20/22
to Timofey Nevolin, WildFly
Hi Tim,

Have you already had a look at [1]? In particular, this command

docker run -p 8080:8080 -p 9990:9990 -it quay.io/wildfly/wildfly /opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0

seems to work for me

--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/1b877597-382e-4412-9ba7-3d242a5f180en%40googlegroups.com.

Timofey Nevolin

unread,
Jul 21, 2022, 6:00:41 PM7/21/22
to WildFly
Hi jfinelli.

Exactly! That solved it for me. Thank you for pointing this out.
Reply all
Reply to author
Forward
0 new messages