We had some network issue where we temporarily lost connection and DNS. The zookeeper client properly triggered the watcher. However, when trying to reconnect, this following Exception is thrown:
2014-03-27 17:24:46,882 ERROR [main-EventThread] SolrException.java (line 121) :java.net.UnknownHostException: <host name (scrubbed)>: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
I tried to look at the code and it seems that there'd be no further retries to connect to Zookeeper, and the node is basically left in a bad state and will not recover on its own. (Please correct me if I'm reading this wrong.) Thinking about it, this is probably fair, since normally you wouldn't expect retries to fix an "unknown host" issue (even though in our case it would have) but I'm wondering what we should do to handle this situation if it happens again in the future.
Any advice is appreciated.
From Mark Miller:
We don’t currently retry, but I don’t think it would hurt much if we did - at least briefly.
If you want to file a JIRA issue, that would be the best way to get it in a future release.