question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SslContext creation failed

See original GitHub issue

Please 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:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ramaraochavalicommented, Aug 5, 2019

probably intended for @rameshpasunoori

0reactions
ST-DDTcommented, Aug 5, 2019
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found