Today I was playing around a little with apache cassandra, setting up internode encryption with keystore and truststore, following the tutorial in the cassandra.yaml file. But I always ended up getting the error message: Cannot support TLS_RSA_WITH_AES_256_CBC_SHA with currently installed providers.
How to fix this Error
Full error message
java.lang.IllegalArgumentException: Cannot support TLS_RSA_WITH_AES_256_CBC_SHA with currently installed providers at com.sun.net.ssl.internal.ssl.CipherSuiteList.(CipherSuiteList.java:79) at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.setEnabledCipherSuites(SSLServerSocketImpl.java:166) at org.apache.cassandra.security.SSLFactory.getServerSocket(SSLFactory.java:54) at org.apache.cassandra.net.MessagingService.getServerSocket(MessagingService.java:255) at org.apache.cassandra.net.MessagingService.listen(MessagingService.java:241) at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:485) at org.apache.cassandra.service.StorageService.initServer(StorageService.java:462) at org.apache.cassandra.service.StorageService.initServer(StorageService.java:383) at org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:215) at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:337) at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:107)
Solution
Note: I’m using jre6 on Debian Squeeze and jre7 on Windows 7 64-bit, it may differ on other distributions or operating systems
This error message has to do with missing or corrupt java security libraries.
1. Locate your jre lib/security directory
On Linux it should be by default: /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/security/
On Windows it should be by default: C:\Program Files\Java\jre7\lib\security
2. Download the Java Cryptography Extension (JCE)
Download for Java 6: http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html
Download for Java 7: http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
3. Install the JCE
Extract the downloaded zip and place the two .jar files US_export_policy.jar and local_policy.jar into your jre/lib/security folder and overwrite old files if any.
Done
You are done. Your application should now start up normally.
Written on 18.11.2011
Category: Cassandra, Java, Programming, Server, Tutorials.
Tags: apache, cassandra, java, linux, tutorial.
