[
https://issues.apache.org/jira/browse/CASSANDRA-16362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Erik Merkle updated CASSANDRA-16362:
------------------------------------
Description:
Trying to use sstableloader from the latest trunk produced the following
Exception:
{quote}
Exception in thread "main" java.lang.RuntimeException: Could not create SSL
Context.
at
org.apache.cassandra.tools.BulkLoader.buildSSLOptions(BulkLoader.java:261)
at org.apache.cassandra.tools.BulkLoader.load(BulkLoader.java:64)
at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:49)
Caused by: java.io.IOException: Error creating/initializing the SSL Context
at
org.apache.cassandra.security.SSLFactory.createSSLContext(SSLFactory.java:184)
at
org.apache.cassandra.tools.BulkLoader.buildSSLOptions(BulkLoader.java:257)
... 2 more
Caused by: java.lang.IllegalStateException: SSLContext is not initialized
at
sun.security.ssl.SSLContextImpl.engineGetSocketFactory(SSLContextImpl.java:208)
at javax.net.ssl.SSLContextSpi.getDefaultSocket(SSLContextSpi.java:158)
at
javax.net.ssl.SSLContextSpi.engineGetDefaultSSLParameters(SSLContextSpi.java:184)
at javax.net.ssl.SSLContext.getDefaultSSLParameters(SSLContext.java:435)
at
org.apache.cassandra.security.SSLFactory.createSSLContext(SSLFactory.java:178)
... 3 more
{quote}
I believe this is because of a change to SSLFactory for CASSANDRA-13325 here:
[https://github.com/apache/cassandra/commit/919a8964a83511d96766c3e53ba603e77bca626c#diff-0d569398cfd58566fc56bfb80c971a72afe3f392addc2df731a0b44baf29019eR177-R178]
I think the solution is to call {{ctx.init()}} before trying to call
{{ctx.getDefaultSSLParameters()}}, essentialy swapping the two lines in the
link above.
was:
Trying to use sstableloader from the latest trunk produced the following
Exception:
{{{color:#172b4d}Exception in thread "main" java.lang.RuntimeException: Could
not create SSL Context.{color}}}
\{{ at
org.apache.cassandra.tools.BulkLoader.buildSSLOptions(BulkLoader.java:261)}}
\{{ at org.apache.cassandra.tools.BulkLoader.load(BulkLoader.java:64)}}
\{{ at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:49)}}
\{{ Caused by: java.io.IOException: Error creating/initializing the SSL
Context}}
\{{ at
org.apache.cassandra.security.SSLFactory.createSSLContext(SSLFactory.java:184)}}
\{{ at
org.apache.cassandra.tools.BulkLoader.buildSSLOptions(BulkLoader.java:257)}}
\{{ ... 2 more}}
\{{ Caused by: java.lang.IllegalStateException: SSLContext is not initialized}}
\{{ at
sun.security.ssl.SSLContextImpl.engineGetSocketFactory(SSLContextImpl.java:208)}}
\{{ at javax.net.ssl.SSLContextSpi.getDefaultSocket(SSLContextSpi.java:158)}}
\{{ at
javax.net.ssl.SSLContextSpi.engineGetDefaultSSLParameters(SSLContextSpi.java:184)}}
\{{ at javax.net.ssl.SSLContext.getDefaultSSLParameters(SSLContext.java:435)}}
\{{ at
org.apache.cassandra.security.SSLFactory.createSSLContext(SSLFactory.java:178)}}
\{{ ... 3 more}}
\{{ }}
I believe this is because of a change to SSLFactory for CASSANDRA-13325 here:
[https://github.com/apache/cassandra/commit/919a8964a83511d96766c3e53ba603e77bca626c#diff-0d569398cfd58566fc56bfb80c971a72afe3f392addc2df731a0b44baf29019eR177-R178]
I think the solution is to call {{ctx.init()}} before trying to call
{{ctx.getDefaultSSLParameters()., essentialy swapping the two lines in the link
above.}}
> SSLFactory should initialize SSLContext before setting protocols
> ----------------------------------------------------------------
>
> Key: CASSANDRA-16362
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16362
> Project: Cassandra
> Issue Type: Bug
> Reporter: Erik Merkle
> Priority: Normal
>
> Trying to use sstableloader from the latest trunk produced the following
> Exception:
> {quote}
> Exception in thread "main" java.lang.RuntimeException: Could not create SSL
> Context.
> at
> org.apache.cassandra.tools.BulkLoader.buildSSLOptions(BulkLoader.java:261)
> at org.apache.cassandra.tools.BulkLoader.load(BulkLoader.java:64)
> at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:49)
> Caused by: java.io.IOException: Error creating/initializing the SSL Context
> at
> org.apache.cassandra.security.SSLFactory.createSSLContext(SSLFactory.java:184)
> at
> org.apache.cassandra.tools.BulkLoader.buildSSLOptions(BulkLoader.java:257)
> ... 2 more
> Caused by: java.lang.IllegalStateException: SSLContext is not initialized
> at
> sun.security.ssl.SSLContextImpl.engineGetSocketFactory(SSLContextImpl.java:208)
> at javax.net.ssl.SSLContextSpi.getDefaultSocket(SSLContextSpi.java:158)
> at
> javax.net.ssl.SSLContextSpi.engineGetDefaultSSLParameters(SSLContextSpi.java:184)
> at javax.net.ssl.SSLContext.getDefaultSSLParameters(SSLContext.java:435)
> at
> org.apache.cassandra.security.SSLFactory.createSSLContext(SSLFactory.java:178)
> ... 3 more
> {quote}
> I believe this is because of a change to SSLFactory for CASSANDRA-13325 here:
> [https://github.com/apache/cassandra/commit/919a8964a83511d96766c3e53ba603e77bca626c#diff-0d569398cfd58566fc56bfb80c971a72afe3f392addc2df731a0b44baf29019eR177-R178]
>
> I think the solution is to call {{ctx.init()}} before trying to call
> {{ctx.getDefaultSSLParameters()}}, essentialy swapping the two lines in the
> link above.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]