Can't access confluence after SSL Setup
Asked by bastiW:

I'm trying to setup ssl with an self singed certificate on ubuntu 14.04. I followed the steps as described in the confluence manual:

1. $JAVA_HOME/bin/keytool -genkeypair -alias tomcat -keyalg RSA
2. sudo mv .keystore /.sslcert
3.

   ```
   Uncomment
           <Connector port="8443" maxHttpHeaderSize="8192"                   maxThreads="150" minSpareThreads="25" maxSpareThreads="75"                   enableLookups="false" disableUploadTimeout="true"                   acceptCount="100" scheme="https" secure="true"                   clientAuth="false" sslProtocol="TLS" SSLEnabled="true"                   URIEncoding="UTF-8" keystorePass="<SECRET>"                keystoreFile="</.sslcert>"                        />
   ```

   <br />

4. change the default domain within confluence settings
5. Restart the server

After that I can't access the server anymore it just quits:   
ERR_CONNECTION_REFUSED

Could you please help?


Answers:
author: bastiW
body: It seems that installation of the certificate broke the acces right to the atlassian folders. Thats quiet strange. [Some other guys had this problem too.](/questions/56733/confluence-suddenly-unusable-java-error)

```
sudo chown -R confluence:confluence /opt/atlassian/confluence/   sudo chown -R confluence:confluence /var/atlassian/application-data
```

```

```

EDIT: That does not seem to be the issue. The problem actually is that the startup of the server takes very long (up to 5 minutes). So after restarting the server I noticed the follwing:   
- CPU load high   
- Timeout first   
- After 2 Minutes: Error 500   
- After 5 Minutes: CPU load decreases -\> Atlassian loads fine and fast   

--\> So waiting fixes the problem or maybe better switch to a real hardware instead of a xen virtualised enviroment (2 GB Ram, 3 Cores)   

<br />

Thanks for your help!


author: NotTheRealStephenSifersNOPENOPENOPENOPE
body: Check out the following:

[](https://www.digicert.com/easy-csr/keytool.htm)<https://www.digicert.com/easy-csr/keytool.htm>

[](http://www.digicert.com/ssl-certificate-installation-tomcat.htm)<http://www.digicert.com/ssl-certificate-installation-tomcat.htm>

I used those without issue for self signed and 3rd part signed.

comments: author: bastiW
body: Now the server started but then I get an error:

```
HTTP Status 500 - java.lang.NullPointerExceptiontype Exception reportmessage java.lang.NullPointerExceptiondescription The server encountered an internal error that prevented it from fulfilling this request.exceptioncom.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException	com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)	com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)	com.atlassian.confluence.setup.ConfluenceEncodingFilter.getGlobalSettings(ConfluenceEncodingFilter.java:47)	com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncodingInternal(ConfluenceEncodingFilter.java:37)	com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncoding(ConfluenceEncodingFilter.java:29)	com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:38)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44)	com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:65)	com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:50)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)root causejava.lang.NullPointerException	com.atlassian.spring.container.ContainerManager.getComponent(ContainerManager.java:33)	com.atlassian.confluence.util.LazyComponentReference$Accessor.get(LazyComponentReference.java:46)	com.atlassian.util.concurrent.Lazy$Strong.create(Lazy.java:85)	com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:321)	com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)	com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)	com.atlassian.confluence.setup.ConfluenceEncodingFilter.getGlobalSettings(ConfluenceEncodingFilter.java:47)	com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncodingInternal(ConfluenceEncodingFilter.java:37)	com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncoding(ConfluenceEncodingFilter.java:29)	com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:38)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44)	com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:65)	com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:50)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)note The full stack trace of the root cause is available in the Apache Tomcat/7.0.47 logs.Apache Tomcat/7.0.47
```

The CPU Load is also very high during startup and then the error occurs.


author: bastiW
body: The error still occurs afte I've changed back to http.


author: NotTheRealStephenSifersNOPENOPENOPENOPE
body: Did you by chance follow this?

[](https://confluence.atlassian.com/display/DOC/Running+Confluence+Over+SSL+or+HTTPS)<https://confluence.atlassian.com/display/DOC/Running+Confluence+Over+SSL+or+HTTPS>


author: bastiW
body: For my first try I used the this manual. --\> Server did not start.

The error occured when I used the configuration form this site:

<http://www.digicert.com/ssl-certificate-installation-tomcat.htm>


author: NotTheRealStephenSifersNOPENOPENOPENOPE
body: Ensure you are using a newly created keystore and then generate your self signed cert.


author: bastiW
body: Now the server started but then I get an error:

```
HTTP Status 500 - java.lang.NullPointerExceptiontype Exception reportmessage java.lang.NullPointerExceptiondescription The server encountered an internal error that prevented it from fulfilling this request.exceptioncom.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException	com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)	com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)	com.atlassian.confluence.setup.ConfluenceEncodingFilter.getGlobalSettings(ConfluenceEncodingFilter.java:47)	com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncodingInternal(ConfluenceEncodingFilter.java:37)	com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncoding(ConfluenceEncodingFilter.java:29)	com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:38)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44)	com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:65)	com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:50)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)root causejava.lang.NullPointerException	com.atlassian.spring.container.ContainerManager.getComponent(ContainerManager.java:33)	com.atlassian.confluence.util.LazyComponentReference$Accessor.get(LazyComponentReference.java:46)	com.atlassian.util.concurrent.Lazy$Strong.create(Lazy.java:85)	com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:321)	com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)	com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)	com.atlassian.confluence.setup.ConfluenceEncodingFilter.getGlobalSettings(ConfluenceEncodingFilter.java:47)	com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncodingInternal(ConfluenceEncodingFilter.java:37)	com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncoding(ConfluenceEncodingFilter.java:29)	com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:38)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)	com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44)	com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:65)	com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:50)	com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)note The full stack trace of the root cause is available in the Apache Tomcat/7.0.47 logs.Apache Tomcat/7.0.47
```

The CPU Load is also very high during startup and then the error occurs.


Tags: confluence-administration

connection

self-signed

ssl

timeout