com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /127.0.0.1:10030 (com.datastax.driver.core.exceptions.DriverException: Host replied with server error: java.lang.SecurityException: Cannot make java.lang.Class.classLoader accessible))

jetbrains.com | 9 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Problem when running Upsource 1.0 in Docker image – Upsource

    jetbrains.com | 9 months ago
    com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /127.0.0.1:10030 (com.datastax.driver.core.exceptions.DriverException: Host replied with server error: java.lang.SecurityException: Cannot make java.lang.Class.classLoader accessible))
  2. 0

    I test tps. But running for a while, throw exception beblow: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /x.x.x.1:9042 (com.datastax.driver.core.TransportException: [/x.x.x.2:9042] Connection has been closed), /x.x.x.3:9042 (com.datastax.driver.core.TransportException: [/x.x.x.3:9042] Connection has been closed), /x.x.x.1:9042 (com.datastax.driver.core.TransportException: [/x.x.x.2:9042] Connection has been closed))        at com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:84)        at com.datastax.driver.core.DefaultResultSetFuture.extractCauseFromExecutionException(DefaultResultSetFuture.java:289)        at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:205)        at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:52)        at com.duowan.test.cassandra.TPSTest$2.run(TPSTest.java:107)        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)        at java.util.concurrent.FutureTask.run(FutureTask.java:262)        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)        at java.lang.Thread.run(Thread.java:745) my code: {code:java} PoolingOptions poolingOptions = new PoolingOptions();   poolingOptions.setMaxSimultaneousRequestsPerHostThreshold(HostDistance.LOCAL, 1024).setMaxSimultaneousRequestsPerHostThreshold(HostDistance.REMOTE, 256);   poolingOptions.setPoolTimeoutMillis(60000);   ReconnectionPolicy reconnectionPolicy = new ExponentialReconnectionPolicy(1000,10000);   SocketOptions socketOptions = new SocketOptions();   socketOptions.setReadTimeoutMillis(30000);   cluster = Cluster.builder().addContactPoint(node)     .withPoolingOptions(poolingOptions)     .withReconnectionPolicy(reconnectionPolicy)     .withSocketOptions(socketOptions)     .withProtocolVersion(ProtocolVersion.V3)     .withRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE)     .build();   session = cluster.connect(); {code}

    DataStax JIRA | 2 years ago | chenwu
    com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /x.x.x.1:9042 (com.datastax.driver.core.TransportException: [/x.x.x.2:9042] Connection has been closed), /x.x.x.3:9042 (com.datastax.driver.core.TransportException: [/x.x.x.3:9042] Connection has been closed), /x.x.x.1:9042 (com.datastax.driver.core.TransportException: [/x.x.x.2:9042] Connection has been closed))        at com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:84)        at com.datastax.driver.core.DefaultResultSetFuture.extractCauseFromExecutionException(DefaultResultSetFuture.java:289)        at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:205)        at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:52)        at com.duowan.test.cassandra.TPSTest$2.run(TPSTest.java:107)        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)        at java.util.concurrent.FutureTask.run(FutureTask.java:262)        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)       

    Root Cause Analysis

    1. com.datastax.driver.core.exceptions.NoHostAvailableException

      All host(s) tried for query failed (tried: /127.0.0.1:10030 (com.datastax.driver.core.exceptions.DriverException: Host replied with server error: java.lang.SecurityException: Cannot make java.lang.Class.classLoader accessible))

      at com.datastax.driver.core.exceptions.NoHostAvailableException.copy()
    2. DataStax Java Driver for Apache Cassandra - Core
      WriteSessionWrapper.prepare
      1. com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:65)
      2. com.datastax.driver.core.DefaultResultSetFuture.extractCauseFromExecutionException(DefaultResultSetFuture.java:259)
      3. com.datastax.driver.core.AbstractSession.prepare(AbstractSession.java:79)
      4. com.datastax.driver.core.WriteSessionWrapper.prepare(WriteSessionWrapper.java:42)
      4 frames
    3. com.jetbrains.upsource
      BufferingTable.iterateRow
      1. com.jetbrains.upsource.database.datastax.StatementFactory$3.convert(StatementFactory.java:78)
      2. com.jetbrains.upsource.database.datastax.StatementFactory$3.convert(StatementFactory.java:75)
      3. com.jetbrains.upsource.database.datastax.ThroughDbMediator$1.consume(ThroughDbMediator.java:39)
      4. com.jetbrains.upsource.database.datastax.ThroughDbMediator$1.consume(ThroughDbMediator.java:36)
      5. com.jetbrains.upsource.database.datastax.WriteExecutor.execute(WriteExecutor.java:31)
      6. com.jetbrains.upsource.database.datastax.ThroughDbMediator.submitSync(ThroughDbMediator.java:36)
      7. com.jetbrains.upsource.database.datastax.StatementFactory.fromSelect(StatementFactory.java:75)
      8. com.jetbrains.upsource.database.datastax.StatementFactory.access$400(StatementFactory.java:16)
      9. com.jetbrains.upsource.database.datastax.StatementFactory$2.get(StatementFactory.java:55)
      10. com.jetbrains.upsource.database.datastax.StatementFactory$2.get(StatementFactory.java:43)
      11. com.jetbrains.upsource.database.datastax.StatementFactory.createSelect(StatementFactory.java:137)
      12. com.jetbrains.upsource.database.datastax.StatementFactory.createSelect(StatementFactory.java:67)
      13. com.jetbrains.upsource.database.datastax.CqlDynamicTable.iterateRow(CqlDynamicTable.java:61)
      14. com.jetbrains.upsource.database.datastax.CqlDynamicTable.iterateRow(CqlDynamicTable.java:20)
      15. com.jetbrains.upsource.db.impl.BufferingTable.iterateRow(BufferingTable.java:94)
      15 frames
    4. JetBrains upsource
      UpsourceDaemonBase.start
      1. com.jetbrains.upsource.backend.server.core.db.SystemDatabase.getDatabaseVersion(SystemDatabase.java:94)
      2. com.jetbrains.upsource.backend.cli.FirstTimeInit.run(FirstTimeInit.java:89)
      3. com.jetbrains.upsource.backend.server.facade.UpsourceApplicationEnvironment.<init>(UpsourceApplicationEnvironment.java:103)
      4. com.jetbrains.upsource.backend.cli.UpsourceApplicationEnvironmentDaemonBase.startDaemon(UpsourceApplicationEnvironmentDaemonBase.java:12)
      5. com.jetbrains.upsource.backend.cli.UpsourceAnalyzerDaemon.startDaemon(UpsourceAnalyzerDaemon.java:51)
      6. com.jetbrains.upsource.backend.cli.UpsourceDaemonBase.start(UpsourceDaemonBase.java:145)
      7. com.jetbrains.upsource.backend.cli.UpsourceDaemonBase.start(UpsourceDaemonBase.java:206)
      7 frames
    5. com.jetbrains.launcher
      AppProxy$4.call
      1. com.jetbrains.launcher.AppProxy$4.call(AppProxy.java:79)
      2. com.jetbrains.launcher.AppProxy$4.call(AppProxy.java:77)
      2 frames
    6. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      4. java.lang.Thread.run(Thread.java:745)
      4 frames