com.datastax.driver.core.exceptions.NoHostAvailableException

All host(s) tried for query failed (no host was tried)

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web52

  • via Unknown by Lukas Stefaniak,
  • via Unknown by Lukas Stefaniak,
  • via Unknown by Unknown author,
  • Stack trace

    • com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (no host was tried) at com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:84) at com.datastax.driver.core.DefaultResultSetFuture.extractCauseFromExecutionException(DefaultResultSetFuture.java:271) at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:185) at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:55) at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:47) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.datastax.spark.connector.cql.SessionProxy.invoke(SessionProxy.scala:33) at com.sun.proxy.$Proxy4.execute(Unknown Source) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.datastax.spark.connector.cql.SessionProxy.invoke(SessionProxy.scala:33) at com.sun.proxy.$Proxy4.execute(Unknown Source) at buggy.Main$$anonfun$doMappingInPartitions$1$$anonfun$apply$1$$anonfun$apply$2.apply(Main.scala:77) at buggy.Main$$anonfun$doMappingInPartitions$1$$anonfun$apply$1$$anonfun$apply$2.apply(Main.scala:76) at scala.collection.Iterator$$anon$11.next(Iterator.scala:370) at org.apache.spark.util.Utils$.getIteratorSize(Utils.scala:1555) at org.apache.spark.rdd.RDD$$anonfun$count$1.apply(RDD.scala:1121) at org.apache.spark.rdd.RDD$$anonfun$count$1.apply(RDD.scala:1121) at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1848) at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1848) at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66) at org.apache.spark.scheduler.Task.run(Task.scala:88) at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:214) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 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.reportNoMoreHosts(RequestHandler.java:220) at com.datastax.driver.core.RequestHandler.access$900(RequestHandler.java:45) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.sendRequest(RequestHandler.java:279) at com.datastax.driver.core.RequestHandler.startNewExecution(RequestHandler.java:118) at com.datastax.driver.core.RequestHandler.sendRequest(RequestHandler.java:94) at com.datastax.driver.core.SessionManager.execute(SessionManager.java:565) at com.datastax.driver.core.SessionManager.executeQuery(SessionManager.java:602) at com.datastax.driver.core.SessionManager.executeAsync(SessionManager.java:98) ... 26 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    4 more bugmates