1

I'm trying to setup to Securing the microservice with HTTPS based on SDL documentation http://docs.sdl.com/LiveContent/content/en-US/SDL%20Web-v1/GUID-42810D49-F818-4A0F-BBF5-F74EEA515438

I did all the steps got success and then tried to restart the discovery service it's getting failed and below errors on core log.

And also tried to set the file system permission to SDL\discovery folder to everyone full access still seems to be same issue exist

2017-01-25 18:14:57,175 ERROR JSSESocketFactory - Failed to load keystore type JKS with path D:\SDL\web\discovery due to D:\SDL\web\discovery (Access is denied) java.io.FileNotFoundException: D:\SDL\web\discovery (Access is denied) at java.io.FileInputStream.open0(Native Method) ~[na:1.8.0_102] at java.io.FileInputStream.open(Unknown Source) ~[na:1.8.0_102] at java.io.FileInputStream.(Unknown Source) ~[na:1.8.0_102] at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:433) [tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:339) [tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:597) [tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:537) [tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:358) [tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:760) [tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:472) [tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.connector.Connector.startInternal(Connector.java:986) [tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.StandardService.addConnector(StandardService.java:237) [tomcat-embed-core-8.0.23.jar:8.0.23] at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:186) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:149) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:288) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:320) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at com.sdl.delivery.service.WinServiceContainer.start(WinServiceContainer.java:29) [service-container-core-8.1.1-1007.jar:8.1.1-1007] at com.sdl.delivery.service.WinServiceContainer.main(WinServiceContainer.java:46) [service-container-core-8.1.1-1007.jar:8.1.1-1007] 2017-01-25 18:14:57,190 ERROR Http11NioProtocol - Failed to start end point associated with ProtocolHandler ["http-nio-8082"] java.io.FileNotFoundException: D:\SDL\web\discovery (Access is denied) at java.io.FileInputStream.open0(Native Method) ~[na:1.8.0_102] at java.io.FileInputStream.open(Unknown Source) ~[na:1.8.0_102] at java.io.FileInputStream.(Unknown Source) ~[na:1.8.0_102] at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:433) ~[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:339) ~[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:597) ~[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:537) ~[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:358) ~[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:760) ~[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:472) ~[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.connector.Connector.startInternal(Connector.java:986) [tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.StandardService.addConnector(StandardService.java:237) [tomcat-embed-core-8.0.23.jar:8.0.23] at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:186) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:149) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:288) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:320) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at com.sdl.delivery.service.WinServiceContainer.start(WinServiceContainer.java:29) [service-container-core-8.1.1-1007.jar:8.1.1-1007] at com.sdl.delivery.service.WinServiceContainer.main(WinServiceContainer.java:46) [service-container-core-8.1.1-1007.jar:8.1.1-1007] 2017-01-25 18:14:57,190 ERROR StandardService - Failed to start connector [Connector[HTTP/1.1-8082]] org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-8082]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) ~[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.StandardService.addConnector(StandardService.java:237) ~[tomcat-embed-core-8.0.23.jar:8.0.23] at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:186) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:149) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:288) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:320) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at com.sdl.delivery.service.WinServiceContainer.start(WinServiceContainer.java:29) [service-container-core-8.1.1-1007.jar:8.1.1-1007] at com.sdl.delivery.service.WinServiceContainer.main(WinServiceContainer.java:46) [service-container-core-8.1.1-1007.jar:8.1.1-1007] Caused by: org.apache.catalina.LifecycleException: service.getName(): "Tomcat"; Protocol handler start failed at org.apache.catalina.connector.Connector.startInternal(Connector.java:993) ~[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.0.23.jar:8.0.23] ... 11 common frames omitted Caused by: java.io.FileNotFoundException: D:\SDL\web\discovery (Access is denied) at java.io.FileInputStream.open0(Native Method) ~[na:1.8.0_102] at java.io.FileInputStream.open(Unknown Source) ~[na:1.8.0_102] at java.io.FileInputStream.(Unknown Source) ~[na:1.8.0_102] at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:433) ~[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:339) ~[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:597) ~[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:537) ~[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:358) ~[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:760) ~[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:472) ~[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.connector.Connector.startInternal(Connector.java:986) ~[tomcat-embed-core-8.0.23.jar:8.0.23] ... 12 common frames omitted 2017-01-25 18:14:57,315 ERROR SpringApplication - Application startup failed java.lang.IllegalStateException: Tomcat connector in failed state at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:157) ~[spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:288) ~[spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141) ~[spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483) ~[spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686) ~[spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:320) ~[spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at com.sdl.delivery.service.WinServiceContainer.start(WinServiceContainer.java:29) [service-container-core-8.1.1-1007.jar:8.1.1-1007] at com.sdl.delivery.service.WinServiceContainer.main(WinServiceContainer.java:46) [service-container-core-8.1.1-1007.jar:8.1.1-1007]

Any help would be much appreciated.

1

I believe, the documentation missed the first step: telling the Tomcat to use the keystore you want and create the keystore. that's what the error says :" ERROR JSSESocketFactory - Failed to load keystore type JKS with path D:\SDL\web\discovery due to D:\SDL\web\discovery (Access is denied) " You need to create the keystore "%JAVA_HOME%\bin\keytool" -genkey -alias tomcat -keyalg RSA

As explained on https://tomcat.apache.org/tomcat-8.0-doc/ssl-howto.html It's also what says "Select the keystore in which you want to import your certificate" but if your Keystore doesnt exist yet, then you need to create it before importing the certificate into the keystore you selected...

hope this helps

  • We generated custom keystore and used here – Velmurugan Jan 30 '17 at 6:25
-1

It looks like you've changed permissions to SDL\discovery folder, but the error is showing an issue with D:\SDL\web\discovery. So it looks like the Access Denied error is still present.

  • First of all I never gave any permission to any specific users permission to that folder while installing the microservices, after this error I gave permission to everyone to full access on this folder still seems to be issue exisit – Velmurugan Jan 25 '17 at 15:23
  • 1
    Clearly complaining about not being able to read it. Maybe the user that the service runs as has no access? Agree, it should work if Everyone has access... – Nuno Linhares Jan 26 '17 at 1:19
  • @Nuno: Normally by default install services run by Local System account, it has full rights on that folder. – Velmurugan Jan 26 '17 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.