[
https://jira.jboss.org/jira/browse/JGRP-823?page=com.atlassian.jira.plugi...
]
P Eger commented on JGRP-823:
-----------------------------
This came as a bit of a shock though that our application was not able to restart after
cleaning up the (old, dead) dns entry for csvr4. I see your point definitely, but with
csrv1 and 2 both up and available to supply member lists i think definitely
counterintuitive. Maybe add this behaviour to documentation for TCPPING at least?
TCCPING: "failed creating initial list of hosts" fails
stack startup
--------------------------------------------------------------------
Key: JGRP-823
URL:
https://jira.jboss.org/jira/browse/JGRP-823
Project: JGroups
Issue Type: Bug
Affects Versions: 2.6.3
Environment: RHEL4 x64, Sun JDK 1.5.0_16 64-bit
Reporter: P Eger
Assignee: Bela Ban
Fix For: 2.7
Attachments: stack.xml
Using TCPPING is dangerous, as if any of the servers do not have a valid DNS entry the
stack will fail with below execption. I would thing a much preferable behaviour in this
case would be to silently (or with WARN) ignore those servers that do not name resolve. In
the below example, csvr1and csvr2 exist and are online/started, csvr3 is attempting to
start and csvr4 is offline/non-existent. csvr3 fails since it cannot DNS resolve csvr4,
even though csvr1,csvr2 are avaiable and ready to process. Basically i think that a DNS
lookup error should be treated equivalent to a connection failure, possibly by delaying
the name resolution until later when the actual connect is attempted.
<TCPPING timeout="15000"
initial_hosts="${jgroups.tcpping.initial_hosts:csvr1[17801],csvr2[17801],csvr3[17801],csvr4[17801]}}"
port_range="1"
num_initial_members="2"/>
ERROR | failed creating initial list of hosts
java.net.UnknownHostException: csvr4: csvr4
at java.net.InetAddress.getAllByName0(InetAddress.java:1145)
at java.net.InetAddress.getAllByName(InetAddress.java:1072)
at java.net.InetAddress.getAllByName(InetAddress.java:1008)
at java.net.InetAddress.getByName(InetAddress.java:958)
at org.jgroups.stack.IpAddress.<init>(IpAddress.java:53)
at org.jgroups.protocols.TCPPING.createInitialHosts(TCPPING.java:147)
at org.jgroups.protocols.TCPPING.setProperties(TCPPING.java:77)
at org.jgroups.stack.Protocol.setPropertiesInternal(Protocol.java:97)
at
org.jgroups.stack.Configurator$ProtocolConfiguration.createLayer(Configurator.java:828)
at
org.jgroups.stack.Configurator$ProtocolConfiguration.access$000(Configurator.java:724)
at org.jgroups.stack.Configurator.createProtocols(Configurator.java:505)
at org.jgroups.stack.Configurator.setupProtocolStack(Configurator.java:61)
at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:285)
at org.jgroups.JChannel.init(JChannel.java:1506)
at org.jgroups.JChannel.<init>(JChannel.java:246)
at org.jgroups.JChannel.<init>(JChannel.java:184)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira