Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does cassandra-unit support SSL connections? #126

Closed
magnusart opened this issue Jun 23, 2015 · 5 comments
Closed

Does cassandra-unit support SSL connections? #126

magnusart opened this issue Jun 23, 2015 · 5 comments

Comments

@magnusart
Copy link

Hi

For the akka-persistence-cassandra I have added support for using SSL with the datastax driver. I also setup a unit test for SSL that I can not get to work. Do you have any examples of using cassandra-unit with SSL enabled for tests?

The client setup works when using a live server setup. The server setup looks correct. As far as I've seen the keystore and truststore are accessed correctly (as I get other exceptions if I change paths, passwords etc)

My test can be found here:
https://github.com/krasserm/akka-persistence-cassandra/blob/master/src/test/scala/akka/persistence/cassandra/journal/CassandraSslSpec.scala

Exception is:


Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /127.0.0.1:9142 (com.datastax.driver.core.ConnectionException: [/127.0.0.1:9142] Unexpected error during transport initialization (com.datastax.driver.core.TransportException: [/127.0.0.1:9142] Error writing: Closed channel)))

Travis output when running test:
https://travis-ci.org/krasserm/akka-persistence-cassandra/jobs/65968468

@magnusart
Copy link
Author

Hi, do you have any thoughts about above? This is still an issue for us.

@jsevellec
Copy link
Owner

Hi,

Sorry for the late answer. Unfortunately, I never tried cassandra-unit with SSL.

@magnusart
Copy link
Author

Ok. Do you know any reason to why it would not work? Is the server started in the same way as with running it in production. With default ports and communication over tcp etc.

@jsevellec
Copy link
Owner

If you start cassandra-unit with default options, it's using this cassandra.yml conf : https://github.com/jsevellec/cassandra-unit/blob/master/cassandra-unit/src/main/resources/cu-cassandra.yaml

Have you got a version of your tests working ok without the ssl conf?

@magnusart
Copy link
Author

Yes it works when I do not have the SSL configuration setup. I've also seen that the config does read the keystores (I had the wrong path at first). The client code works fine when connecting to real clusters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants