A DXD microservice secured with HTTPS fails to start. The cd_core logs contains the below: *************************** APPLICATION FAILED TO START *************************** Description: The Tomcat connector configured to listen on port 8182 failed to start. The port may already be in use or the connector may be misconfigured. Action: Verify the connector's configuration, identify and stop any process that's listening on port 8182, or configure this application to listen on another port. 2024-09-17 11:22:56,631 ERROR [main] ServiceContainer - Could not start ServiceContainer java.lang.reflect.InvocationTargetException: null at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.sdl.delivery.service.ServiceContainer.main(ServiceContainer.java:106) at com.sdl.delivery.service.WinServiceContainer.start(WinServiceContainer.java:24) at com.sdl.delivery.service.WinServiceContainer.main(WinServiceContainer.java:41) Caused by: org.springframework.boot.web.embedded.tomcat.ConnectorStartFailedException: Connector configured to listen on port 8182 failed to start at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.checkConnectorHasStarted(TomcatWebServer.java:228) at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.checkThatConnectorsHaveStarted(TomcatWebServer.java:220) at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:200) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:297) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391) at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) ... 7 common frames omitted 2024-09-17 13:52:34,760 ERROR [main] LifecycleBase - Failed to start component [Connector[org.apache.coyote.http11.Http11Nio2Protocol-8182]] org.apache.catalina.LifecycleException: Protocol handler start failed at org.apache.catalina.connector.Connector.startInternal(Connector.java:1074) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.addConnector(StandardService.java:239) at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:263) at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:195) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:297) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391) at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.sdl.delivery.service.ServiceContainer.main(ServiceContainer.java:106) at com.sdl.delivery.service.WinServiceContainer.start(WinServiceContainer.java:24) at com.sdl.delivery.service.WinServiceContainer.main(WinServiceContainer.java:41) 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.Nio2Endpoint.bind(Nio2Endpoint.java:141) at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1204) at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1290) at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:614) at org.apache.catalina.connector.Connector.startInternal(Connector.java:1071) ... 18 common frames omitted 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) at java.base/sun.security.util.KeyStoreDelegator.engineGetKey(KeyStoreDelegator.java:90) at java.base/java.security.KeyStore.getKey(KeyStore.java:1057) at org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.java:353) at org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:246) at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:97) ... 24 common frames omitted application.properties contains: server.ssl.enabled=true server.ssl.protocol=TLS server.ssl.key-alias=tridionstg server.ssl.key-store=E:\\discoveryLive\\cert\\keystore.jks server.ssl.key-password=abc123 Keystore password was verified with Keystore Explorer |
Resolved by updating the password for the key pair 'tridionstg' in the keystore. Right click the key pair and set the password to match the one used for the key store. You'll be prompted for the current password. |
The key pair 'tridionstg' in the keystore was secured with a different password to the one used for the keystore itself. If server.ssl.key-store-password isn't defined then server.ssl.key-password is used to access the key store, so passwords must match in this scenario. Alternatively they can be specified separately as below: server.ssl.key-password=password server.ssl.key-store-password=abc123 |