We do support some way to advertise (via jgroups) a different host/port than the one that it is actually bound to, right?

I thought we had to add that functionality to support OpenShift, where the internal IP given to the AS is different than the externally visible host/port for clustering.

On Wed, Sep 2, 2015 at 10:20 AM, Brian Stansberry <brian.stansberry@redhat.com> wrote:
On 9/1/15 6:52 PM, Arun Gupta wrote:
>>>> 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.
>

Ok, I'm getting clear on your scenario. Thanks.

>>> 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?
>

Those attributes will only be non-null if the https socket-binding is
used by some service (e.g. an undertow listener.) If the configuration
doesn't require the socket binding to be used, then the resolution of
the socket binding's config data to an actual IP address will not occur.

> Arun
>
>
>


--
Brian Stansberry
Senior Principal Software Engineer
JBoss by Red Hat
_______________________________________________
wildfly-dev mailing list
wildfly-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/wildfly-dev