SslContext creation failed
See original GitHub issuePlease answer these questions before submitting your issue.
What version of gRPC are you using?
1.4.0
What did you expect to see?
Created sample application to run grpc server in SSL mode. Same set of code and certificates working on windows but failing in Linux
Jul 25, 2019 02:10:40.762 - trustCertCollectionFilePath : cert/ca.pem
serverCertChainFilePath : cert/server0.pem
serverPrivateKeyFilePath : cert/server0.key
javax.net.ssl.SSLException: failed to set certificate and key
at io.netty.handler.ssl.ReferenceCountedOpenSslServerContext.newSessionContext(ReferenceCountedOpenSslServerContext.java:134)
at io.netty.handler.ssl.OpenSslServerContext.<init>(OpenSslServerContext.java:352)
at io.netty.handler.ssl.OpenSslServerContext.<init>(OpenSslServerContext.java:335)
at io.netty.handler.ssl.SslContext.newServerContextInternal(SslContext.java:421)
at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:441)
at SSLJavaContext.getServerSslContext(SSLJavaContext.java:103)
at HelloWorldServerTls.start(HelloWorldServerTls.java:485)
at HelloWorldServerTls.main(HelloWorldServerTls.java:606)
Caused by: java.security.KeyStoreException: Cannot get key bytes, not PKCS#8 encoded
at sun.security.provider.KeyProtector.protect(KeyProtector.java:174)
at sun.security.provider.JavaKeyStore.engineSetKeyEntry(JavaKeyStore.java:267)
at sun.security.provider.JavaKeyStore$JKS.engineSetKeyEntry(JavaKeyStore.java:56)
at sun.security.provider.KeyStoreDelegator.engineSetKeyEntry(KeyStoreDelegator.java:117)
at sun.security.provider.JavaKeyStore$DualFormatJKS.engineSetKeyEntry(JavaKeyStore.java:70)
at java.security.KeyStore.setKeyEntry(KeyStore.java:1140)
at io.netty.handler.ssl.SslContext.buildKeyStore(SslContext.java:982)
at io.netty.handler.ssl.SslContext.buildKeyManagerFactory(SslContext.java:1141)
at io.netty.handler.ssl.SslContext.buildKeyManagerFactory(SslContext.java:1132)
at io.netty.handler.ssl.ReferenceCountedOpenSslServerContext.newSessionContext(ReferenceCountedOpenSslServerContext.java:124)
... 7 more
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Unable to create SSLContext from external certificate
I'm trying to create my own HTTPS server and I have two code snippets: The first: private SSLContext createSSLContext() throws ...
Read more >Unable to create SSL context : Cannot recover key
After updating certificates in Sentinel i am getting the error: ERROR L1599 TemplateServer.launchRmiRegistry - Unable to build template ...
Read more >SSL context creation failure - WordPress.org
Tried looking up SSL context creation failure errors with the plugin, but couldn't find anything. What might be the issue?
Read more >Error creating ssl context () solved - YouTube
Hi Guys...Thanks for Watching my video...this is a video for how to solve the ssl context error that occurred in the windows 10...
Read more >IT14411: SSL CREATION ERROR WHEN CHANGING ... - IBM
Error in Ring_name length or RACF_userid length ERROR ] CWPKI0804E: SSL certificate creation error. Unable to create SSL key file: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
probably intended for @rameshpasunoori
@rameshpasunoori I use the following command to generate my self-signed certificates:
https://github.com/yidongnan/grpc-spring-boot-starter/blob/master/tests/src/test/resources/certificates/generateCertificates.sh