Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

ds-steven-matison avatar image
ds-steven-matison asked ·

Astra Driver 3.8.0 Operation Timed out

I have a sample application on java 11,14,15 which is not able to connect to Astra with the 3.8.0 driver.

Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: 646adb8d-4395-43ac-a50d-048518df238b-us-east1.db.astra.datastax.com/<unresolved>:32403:7491c008-93fb-49b9-a184-48067543c043 (com.datastax.driver.core.exceptions.OperationTimedOutException: [646adb8d-4395-43ac-a50d-048518df238b-us-east1.db.astra.datastax.com/<unresolved>:32403:7491c008-93fb-49b9-a184-48067543c043] Operation timed out))

I have created a 4.9.0 example (to show working app framework):

https://github.com/ds-steven-matison/astra-connection

And here is the 3.8.0 example (minimal changes from app source):

https://github.com/ds-steven-matison/astra-connection-3.8

fwiw: the app source works with 3.8.0 driver on openjdk1.8, not 11+

Testing command is:

mvn clean compile exec:java -Dexec.mainClass=App.java

Some things I have tried:

- TLS argument in mvn command

- increasing timeout with socketOptions

- feeding TLS to maven env variable

- trying to execute as jar w/ tls args


Can anyone provide a work around?

java driverastra
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

ds-steven-matison avatar image
ds-steven-matison answered ·

The solution command for java 8 with 3.8.0 driver is:

% mvn clean compile exec:java -Dexec.mainClass=App.java -Djdk.tls.client.protocols="TLSv

and the expected output is:

[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------< astraconnection:astraconnection >-------------------
[INFO] Building astraconnection 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ astraconnection ---
[INFO] Deleting /Users/stevenmatison/Documents/GitHub/astra-connection-3.8/java/astraconnection/target
[INFO] 
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ astraconnection ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/stevenmatison/Documents/GitHub/astra-connection-3.8/java/astraconnection/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ astraconnection ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /Users/stevenmatison/Documents/GitHub/astra-connection-3.8/java/astraconnection/target/classes
[INFO] 
[INFO] --- exec-maven-plugin:3.0.0:java (default-cli) @ astraconnection ---
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
4.0.0.684


Thanks @sebastian.estevez@datastax.com and @Cienfueguero for assisting in testing and solving this Astra Java Driver SSL Operation Timed Out.

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.