Datastax transport exception error writing
Asked Answered
C

0

6

I have a java API application which connects to cassandra instance. My cassandra instance is hosted on google cloud platform. When I run the program in my IDE, it works fine and is able to connect to the cassandra instance. However when I deploy the application in a docker container I am getting the following error

com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /104.X.X.X:9042 (com.datastax.driver.core.exceptions.TransportException: [/104.X.X.X:9042] Error writing

From inside the container, I am able to ping the Cassandra instance. Most of the error I have seen on google end with "Connection closed" or "Channel closed" or "Cannot connect". However this one ends with "Error writing", can someone please help me troubleshoot this issue.

Chiron answered 11/5, 2018 at 2:36 Comment(8)
Do you have logs from Cassandra itself?Regin
Its not even reaching cassandra and timing out in the container. I think this might be because of the java version. I have oracle java on my machine and I have openJDK in the container, thats the only difference. I will test that out and update everyone if that works.Chiron
It shouldn't be a problem. If it timeouts in container, maybe there firewalls between?Regin
I tried with oracle jdk and it did not work. @AlexOtt all the outbound connection from docker container are open so how there be a firewallChiron
I would recommend to perform capture of network traffic and see what happensRegin
I have the exact same problem, I'm trying to diagnose it right now. I have a quite small range of commits that broke it so I'll probably come back with a solution soon :)Bloodworth
Guys, any progress in this??? @Bloodworth did you find a solution?Leftward
I have this same problem too. I can connect from DataGrip but not from the app due to this error. My previous error is also TransportException but that was because I forgot to provide path to the truststore file. After I add it, still TransportException but I notice the "Error Writing". Does this mean it can reach cassandra but no write permission?Gorge

© 2022 - 2024 — McMap. All rights reserved.