问题
We recently (this week) upgraded our java driver from 2.0.4 to 2.1.4 (we are running Cassandra version 2.0.12). We were using 2.0.4 for a long time (more than an year) in production and did not have this issue. But, after upgrading we starting seeing intermittent NoHostAvailableExceptions (that fail all the requests on client side):
Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (no host was tried)
at com.datastax.driver.core.RequestHandler.sendRequest(RequestHandler.java:108) ~[stormjar.jar:na]
at com.datastax.driver.core.SessionManager.execute(SessionManager.java:530) ~[stormjar.jar:na]
at com.datastax.driver.core.SessionManager.executeQuery(SessionManager.java:566) ~[stormjar.jar:na]
at com.datastax.driver.core.SessionManager.executeAsync(SessionManager.java:119) ~[stormjar.jar:na]
We are having this issue in production, so would love to get some advice on how to triage this. What we know for sure: * When errors start happening Cassandra cluster isn't under unusual load. * We are able to reach Cassandra hosts (cluster) from client side - Not a connection issue.
Cheers, -Ankush
来源:https://stackoverflow.com/questions/28770889/nohostavailableexception-all-hosts-tried-for-query-failed-no-host-was-tried