Error Cannot recover key

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

hng
Posts: 39
Joined: 01 Nov 2021, 18:17

Error Cannot recover key

Postby hng » 18 Mar 2022, 14:06

hi,

In production server, I upload certificate following step by step in http://docs2x.smartfoxserver.com/Gettin ... yptography

but when server start I got error:

org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:1049)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)

Caused by: java.lang.IllegalArgumentException: Cannot recover key
at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:99)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:71)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:231)

Caused by: java.security.UnrecoverableKeyException: Cannot recover key
at java.base/sun.security.provider.KeyProtector.recover(KeyProtector.java:304)
at java.base/sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:144)

What the error means, am I enter the wrong password for my keystore.jks ? and how to revert it back (without re-install) or upload new keystore and password ?

Please help




Best Regards
Sen
hng
Posts: 39
Joined: 01 Nov 2021, 18:17

Re: Error Cannot recover key

Postby hng » 18 Mar 2022, 14:48

I recreate the keytore and make sure the password are correct, this time the previous error not occur, but still i got new error:

The Apache Tomcat Native library which allows using OpenSSL was not found on the java.library.path: [C:\Users\javadev\SmartFoxServer_2X\jre\bin

and checking via: https://localhost:8443/ --> it still red

how to correct this, any help ?


Best regrets,
Sen
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Error Cannot recover key

Postby Lapo » 18 Mar 2022, 15:57

Hi,
why would you want to deploy an SSL certificate for "localhost" which is local only domain that cannot be reached by outside users?

An SSL certificate should be bound to a real domain name.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
hng
Posts: 39
Joined: 01 Nov 2021, 18:17

Re: Error Cannot recover key

Postby hng » 22 Mar 2022, 11:43

I made mistake inside my iframe still using http not https. Work as intended now.


Many Thanks
Sen

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 60 guests