[mod_cluster-dev] jboss.mod_cluster.proxyList

Bela Ban bban at redhat.com
Mon May 10 10:53:02 EDT 2010


OK, I've created https://jira.jboss.org/jira/browse/MODCLUSTER-155 to 
keep track of this.

Bela Ban wrote:
> I found that when I set jboss.mod_cluster.proxyList to include 2 
> elements, and the 2nd element is not reachable, the mod-cluster 
> subsystem takes a long time to start.
>
> How to reproduce:
>
>
> set jboss.mod_cluster.proxyList (either in the XML file, or via system 
> prop) to "http1.dyndns.org:8000,http2.dyndns.org:8000"
>
> Currently http2.dyndns.org resolves to 192.168.1.5. If we cannot connect 
> to such an interface, the socket connection blocks.
>
> I suspect, the following is done (in pseudo code) in mod-cluster (Java 
> side):
>
> for(Host host: hosts) {
>    Socket sock=new Socket(host, port);
> }
>
>
> However, this can block up to N minutes (depending on OS), I'd suggest 
> the following code:
>
> int CONNECT_TIMEOUT=1000; // try to connect, but only wait for 1 sec
> Socket sock=new Socket();
>
> try {
>    sock.connect(new InetSocketAddress(hostname, port), CONNECT_TIMEOUT);
> }
> catch(SocketTimeoutException ex) {
>     // skip hostname
> }
>
>
> WDYT ?
>
>   

-- 
Bela Ban
Lead JGroups / Clustering Team
JBoss



More information about the mod_cluster-dev mailing list