Uploaded image for project: 'DataStax Java Driver for Apache Cassandra'
  1. DataStax Java Driver for Apache Cassandra
  2. JAVA-367

Fully downed cluster is not recognize after being restarted

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.0.3
    • Component/s: None
    • Labels:
    • Sprint:
      Java P-TEST

      Description

      http://cassci.datastax.com/view/y_Drivers/job/y_java-driver_2.0/117/testReport/com.datastax.driver.core/PreparedStatementTest/reprepareOnNewlyUpNodeTest/

      I swapped out the offending line with:

      try { Thread.sleep(180 * 1000); } catch (Exception e) {}
      

      to get rid of any possibility of race conditions.

      Running `cassandraCluster.ring();` before and after the shutting down and starting up of the node shows the cluster switched to vnodes on restart. Not sure if this affects the test result.

      That's when the session.execute() command returns the following error:

      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:103)
      	at com.datastax.driver.core.SessionManager.execute(SessionManager.java:368)
      	at com.datastax.driver.core.SessionManager.executeQuery(SessionManager.java:404)
      	at com.datastax.driver.core.SessionManager.executeAsync(SessionManager.java:85)
      	at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:52)
      	at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:36)
      	at com.datastax.driver.core.PreparedStatementTest.reprepareOnNewlyUpNodeTest(PreparedStatementTest.java:296)
      	at com.datastax.driver.core.PreparedStatementTest.reprepareOnNewlyUpNodeTest(PreparedStatementTest.java:339)
      

      Real world use case: If a cluster is running and a network partition happens, or the cluster really shuts down, on restart, it doesn't appear as though the driver will connect again without manual intervention.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                omichallat Olivier Michallat
                Reporter:
                joaquin Joaquin Casares (Inactive)
              • Votes:
                2 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated: