[wildfly-dev] WildFly Server IP Address and Port

Arun Gupta arun.gupta at gmail.com
Tue Sep 1 19:52:31 EDT 2015


>>> Is this scenario different from running multiple WildFly instances on a
>>> single machine in a non-Docker setup?
>>
>>
>> Good point, they are the same.
>>
>
> Reading a bit more, it seems Docker gives each container its own address,
> visible to the container via the eth0 interface:
>
> https://docs.docker.com/articles/networking/

Those IP addresses are not available externally AIU.

>> So, if WildFly runs with -b <IP_ADDRESS> then the utility above will
>> give the correct address and port?
>>
>
> Yes, assuming IP_ADDRESS != 0.0.0.0, the server config is using a
> socket-binding named "http" for the web server, and the web server
> address/port is the one you want.
>

            ObjectName http = new
ObjectName("jboss.as:socket-binding-group=standard-sockets,socket-binding=http");
            hostName = (String) mBeanServer.getAttribute(http,"boundAddress");
            hostPort = (Integer) mBeanServer.getAttribute(http,"boundPort");


seems to be returning correct HTTP host/port. However

            ObjectName https = new
ObjectName("jboss.as:socket-binding-group=standard-sockets,socket-binding=https");
            hostSecurePort = (int) mBeanServer.getAttribute(https, "boundPort");

is throwing NPE.

Will this only be available if HTTPS port is accessible?

Arun



-- 
http://blog.arungupta.me
http://twitter.com/arungupta


More information about the wildfly-dev mailing list