Confluence login page is blank
Asked by Michael Wolfe:

I stopped Confluence Server this morning to backup the SQL database, home, and installation directories in preparation for a update. I didn't actually go through with the update as we were going to do a POC later in the afternoon. Now the log/dashboard page is completely blank, no menu bar or anything. If you go to the direct link to a Confluence page, it works. The connection between the Jira Service Desk portal and KB's still works and it displays that content, but if I attempt to log in at all, the page never loads any content.

I've searched logs in the installation and home dirs, but I can't find any errors that would indicate a problem loading the site content. Has anyone else run into this issue before?


Answers:
author: Michael Wolfe
body: After a lot of digging I ended up inspecting the HTML of just the log in page and compared my test server against the production server. What I found is when I had copied some JavaScript I had somehow missed the closing statement. I was able to hack the live HTML to get logged in, and then eventually to the configuration screen and add the closing statement in. Once I did that, the pages load correctly. Phew, glad that headache is resolved.


author: Dave Theodore [Coyote Creek Consulting]
body: Have you cleared your browser cache? You might also try connecting with a different browser. I've seen this kind of strangeness in Firefox, and other browsers to a lesser extent.

comments: author: Michael Wolfe
body: This was the first thing I tried. I primarily use Chrome, so I tried a Chrome Incognito window, Safari, and then IE on one of my Windows servers. All produced the same problem.


author: Dave Theodore [Coyote Creek Consulting]
body: Try this. Shut down Confluence and delete the entire contents of the logs directories (or move them somewhere outside of their normal directories.) The locations will be something like as follows:

Application: /opt/atlassian/atlassian-confluence-667/logs

Home: /var/atlassian/home/confluence/logs

Then start Confluence and look through the catalina.out in the Application directory and the atlassian-confluence.log in the Home directory. There should be some clue as to what is going on there.

Also, look for modified files. It sounds like you can get to the Admin interface, so you can find this out in System Information. Go to [https://confluence.\<domain\>.com/admin/systeminfo.action]() (replacing your hostname) and look about 20% down the page in the "Modifications" section. If there are any files listed as modified or deleted there, you have some possible suspects. It might not be a bad idea to just download a fresh application, uncompress it and [configure](https://confluence.atlassian.com/doc/installing-confluence-on-linux-from-archive-file-255362363.html) it to talk to your existing home directory. This way you're sure the application files weren't changed.

If you are manually starting and stopping Confluence from within the \<application\>/bin directory, it's worth chowning the entire Application and Home directory structure to the user that Confluence is supposed to be running as, then become that user and start Confluence. If someone before you started it as root, you will have some files with root ownership and the application won't be able to write to them. I am assuming you're running on Linux, but the same principles apply to Windows.


author: Michael Wolfe
body: So here is what I did this morning:

I went ahead and updated to 6.11.1. I figured if there was some corrupt file it would get replaced during the upgrade. Unfortunately it didn't make a difference. Both the home and installation dirs are owned by the confluence user and confluence is always launched as a service, either at boot or 'service confluence start'.

I moved the current logs out of the way so that Confluence would create new logs, and the only thing that stood out to me this time was in the atlassian-confluence log:

```
2018-09-12 10:03:55,640 WARN [StartEventPublisher:thread-1] [impl.util.tomcat.DefaultTomcatConfigHelper] getHttpConnector Expected exactly one HTTP connector in Tomcat configuration, but found [Standalone:type=Connector,port=4443,address="127.0.0.1", Standalone:type=Connector,port=8090,address="127.0.0.1"]
2018-09-12 10:03:59,950 ERROR [https-jsse-nio-127.0.0.1-4443-exec-15] [mywork.host.rest.ExceptionLogger] toResponse Exception thrown from REST resource
 -- url: /rest/mywork/1/client | traceId: 073e0fd89558692b | userName: anonymous
java.lang.IllegalStateException: Failed to obtain client registration lock, cannot update potential client b2f79432-0a53-3490-89ce-52b6c6854968
?
```

Also, I currently cannot log into Admin interface as any log in page doesn't display. I do have Apache running a reverse proxy for the ports, but that hasn't changed and is working with both Jira and Bitbucket still. I've checked the Apache logs and I don't see any issues appearing when I attempt to access those pages.


author: Dave Theodore [Coyote Creek Consulting]
body: What is the 4443 connector used for? Can you post your server.xml uncommented contents? It should look something like this.

```
<Connector port="8090" connectionTimeout="20000" redirectPort="8443"
                maxThreads="48" minSpareThreads="10"
                enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
                protocol="org.apache.coyote.http11.Http11NioProtocol" 
                proxyHost="confluence.domain.com" proxyPort="443" scheme="https"/>

?
        <Engine name="Standalone" defaultHost="localhost" debug="0">

            <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4">
                <Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true">
                    <!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
                    <Manager pathname="" />
                    <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" />
                </Context>

                <Context path="${confluence.context.path}/synchrony-proxy" docBase="../synchrony-proxy" debug="0" reloadable="false" useHttpOnly="true">
                    <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" />
                </Context>
            </Host>
        </Engine>
```


author: Michael Wolfe
body: I have SSL enabled and it's using 4443 in tomcat, and then 443 in Apache. This has been working without an issue as well. Here is my server.xml.

```
<Server port="8000" shutdown="SHUTDOWN" debug="0">
 <Service name="Tomcat-Standalone">
 <Connector port="8090" address="confluence-test.domain.com" connectionTimeout="20000" redirectPort="4443"
 maxThreads="48" minSpareThreads="10"
 enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
 protocol="org.apache.coyote.http11.Http11NioProtocol" proxyName="confluence-test.domain.com" proxyPort="80" scheme="http" />

 <Engine name="Standalone" defaultHost="localhost" debug="0">

 <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4">
 <Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true">
 <!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
 <Manager pathname="" />
 <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" />
 </Context>

 <Context path="${confluence.context.path}/synchrony-proxy" docBase="../synchrony-proxy" debug="0" reloadable="false" useHttpOnly="true">
 <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" />
 </Context>
 </Host>

 </Engine>


 <Connector port="4443" address="confluence-test.domain.com" maxHttpHeaderSize="8192"
 maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
 enableLookups="false" disableUploadTimeout="true"
 acceptCount="100" scheme="https" secure="true"
 clientAuth="false" sslProtocols="TLSv1,TLSv1.1,TLSv1.2" sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" SSLEnabled="true"
 URIEncoding="UTF-8" keystorePass="somePassWord" keyAlias="confluence-test" keystoreFile="/usr/local/java/jre1.8.0_171/lib/security/cacerts" keystoreType="JKS" proxyPort="443"/>
 </Service>
</Server>
```


author: Michael Wolfe
body: Here is what I mean by a blank page when I attempt to log in. Absolutely nothing, no errors or anything.![Confulence Screenshot.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/32197i01E88A4BCAA3D9BF/image-size/large?v=v2&px=999 "Confulence Screenshot.jpg")


author: Michael Wolfe
body: For any questions about my reverse proxy in Apache, this should be configured the same way all of the documentation suggests. This is running on the same machine as Jira, and Bitbucket; I have also assigned confluence it's own IP address on the server.

```
<VirtualHost confluence-test.domain.com:80>
 ServerName confluence-test.domain.com
 Redirect / https://confluence-test.domain.com/

 ProxyRequests Off
 ProxyPreserveHost On

 RewriteEngine On
 RewriteCond %{REQUEST_URI} !^/synchrony
 RewriteRule ^/(.*) http://confluence-test:8090/$1 [P]

 <Proxy *>
 Require all granted
 </Proxy>

 ProxyPass /synchrony http://confluence-test:8091/synchrony

 <Location /synchrony>
 Require all granted
 RewriteEngine on
 RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
 RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
 RewriteRule .* ws://confluence-test:8091%{REQUEST_URI} [P]
 </Location>

 ProxyPass / https://confluence-test.domain.com:8090/
 ProxyPassReverse / https://confluence-test.domain.com:8090/

 <Location />
 Require all granted
 </Location>

</VirtualHost>

<VirtualHost confluence-test.domain.com:443>
 ServerName confluence-test.domain.com

 SSLEngine on
 SSLCertificateFile /etc/ca-certificates/confluencetestssl.cer
 SSLCertificateKeyFile /etc/ca-certificates/confluencetestssl.key
 SSLCertificateChainFile /etc/ca-certificates/thursbyroot.crt


 ProxyRequests Off
 ProxyPreserveHost On

 <Proxy *>
 Order deny,allow
 Allow from all
 </Proxy>

 SSLProxyEngine On
 ProxyPass / https://confluence-test.domain.com:4443/
 ProxyPassReverse / https://confluence-test.domain.com:4443/

</VirtualHost>
```


Tags: confluence-server

server