]
Michal Babacek closed MODCLUSTER-155.
-------------------------------------
Closing. Clean-up.
At least one of the following applies:
* the issue has been thoroughly tested as a part of one of the current releases
or
* it hasn't occurred in ~2 years
or
* it's utterly harmless
jboss.mod_cluster.proxyList: invalid hosts cause mod-cluster startup
to be delayed
----------------------------------------------------------------------------------
Key: MODCLUSTER-155
URL:
https://issues.jboss.org/browse/MODCLUSTER-155
Project: mod_cluster
Issue Type: Bug
Security Level: Public(Everyone can see)
Reporter: Bela Ban
Assignee: Paul Ferraro
Fix For: 1.1.0.CR2
Attachments: tmp.txt
When I set jbss.mod_cluster.proxyList (e.g.) to
"http1.dyndns.org:8000,1.2.3.4:8000", mod-cluster does connect to
http1.dyndns.org:8000 (assuming it's running), but blocks for 10 minutes trying to
connect to 1.2.3.4:8000.
It eventually times out connecting to 1.2.3.4, and then seems to default to 127.0.0.1 !
A better mechanism would be to connect via a timeout (see code below), and to simply skip
unreachable httpd instances. The reconnect mechanism can always add httpds (which become
reachable) later.
The code to connect to a socket with a timeout would be:
Socket sock=new Socket(new InetSocketAddress("1.2.3.4", 8000), 1000);
This call blocks until it has connected to 1.2.3.4:8000, or until 1 sec has elapsed,
whichever occurs first.
In any case, it doesn't block until the OS defined socket connect timeout kicks in;
this might be up to 10 mins !