<div dir="ltr">We do support some way to advertise (via jgroups) a different host/port than the one that it is actually bound to, right?<div><br></div><div>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.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 2, 2015 at 10:20 AM, Brian Stansberry <span dir="ltr"><<a href="mailto:brian.stansberry@redhat.com" target="_blank">brian.stansberry@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 9/1/15 6:52 PM, Arun Gupta wrote:<br>
>>>> Is this scenario different from running multiple WildFly instances on a<br>
>>>> single machine in a non-Docker setup?<br>
>>><br>
>>><br>
>>> Good point, they are the same.<br>
>>><br>
>><br>
>> Reading a bit more, it seems Docker gives each container its own address,<br>
>> visible to the container via the eth0 interface:<br>
>><br>
>> <a href="https://docs.docker.com/articles/networking/" rel="noreferrer" target="_blank">https://docs.docker.com/articles/networking/</a><br>
><br>
> Those IP addresses are not available externally AIU.<br>
><br>
<br>
</span>Ok, I'm getting clear on your scenario. Thanks.<br>
<span class=""><br>
>>> So, if WildFly runs with -b <IP_ADDRESS> then the utility above will<br>
>>> give the correct address and port?<br>
>>><br>
>><br>
>> Yes, assuming IP_ADDRESS != 0.0.0.0, the server config is using a<br>
>> socket-binding named "http" for the web server, and the web server<br>
>> address/port is the one you want.<br>
>><br>
><br>
> ObjectName http = new<br>
> ObjectName("jboss.as:socket-binding-group=standard-sockets,socket-binding=http");<br>
> hostName = (String) mBeanServer.getAttribute(http,"boundAddress");<br>
> hostPort = (Integer) mBeanServer.getAttribute(http,"boundPort");<br>
><br>
><br>
> seems to be returning correct HTTP host/port. However<br>
><br>
> ObjectName https = new<br>
> ObjectName("jboss.as:socket-binding-group=standard-sockets,socket-binding=https");<br>
> hostSecurePort = (int) mBeanServer.getAttribute(https, "boundPort");<br>
><br>
> is throwing NPE.<br>
><br>
> Will this only be available if HTTPS port is accessible?<br>
><br>
<br>
</span>Those attributes will only be non-null if the https socket-binding is<br>
used by some service (e.g. an undertow listener.) If the configuration<br>
doesn't require the socket binding to be used, then the resolution of<br>
the socket binding's config data to an actual IP address will not occur.<br>
<br>
> Arun<br>
<span class="im HOEnZb">><br>
><br>
><br>
<br>
<br>
--<br>
Brian Stansberry<br>
Senior Principal Software Engineer<br>
JBoss by Red Hat<br>
</span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
</div></div></blockquote></div><br></div>