Dead after update to 6, port problem
Asked by Marc Schaeffler:

Hi,

we operated confluence 5.6 on port 80 on a Windows server, all worked fine.

Now we updated to confluence 6.4 and after the update Confluence is no longer loading in a browser at all.

We followed the instructions and edited server.xml so that confluence listens to port 8090, then we could load the homepage (with ':8090'), Confluence says we need to update the base URL now. When I click on the provided link to do so, the page won't refresh and Confluence appears to be dead again. Even the start page fails to load. On the server I see that the process "Commons Deamon Service Runner/Atlassian Confluence.0 Confluence250615164334" is constantly using lots of CPU power, up to 80%.

After I reboot the server, the process is going back to 0%.

Whats wrong here, how can I fix this? I'd like to run confluence on Port 80 again, but 8090 is also OK, if that would be easier to fix.

Thanks for your help!

Marc


Answers:
author: Marc Schaeffler
body: You failed.


author: Nic Brough -Adaptavist-
body: Depends on how you want to do the port relocation.

The upgrade will have replaced the configuration required for port relocation, no matter what method you were using. It should have told you what files it replaced (and where it backed them up to), but that's just going to make it a little easier.

The question next is how you were doing the port change - the most common method is to put a proxy server (Apache, nginx, IIS etc) in front of it, and the next most common one is to modify the Tomcat settings to run the whole thing on port 80.

Do you know which you were doing?

comments: author: Marc Schaeffler
body: The upgrade mentioned only server.xml. As far as I can see, no IIS has been installed on the server, it is a clean machine running only Windows with MS SQL Express and Confluence. No idea what confluence adds on installing, I don't see evidence of Apache, Tomcat or nginx.

How do I modify Tomcat settings?


author: Nic Brough -Adaptavist-
body: The proxy doesn't necessarily have to be on the same server, but what you've said strongly suggests you were not proxying anyway. You can confirm this by using "ping" or "nslookup" on the url you were using for confluence access and checking that it gives you the IP address of the confluence server.

So, to make the Tomcat run on port 80, open up the server.xml file and look for a chunk that says "Server port=8090", change it to 80, and restart Confluence.


author: Marc Schaeffler
body: There is no proxy, I can confirm.

\>open up the server.xml file and look for a chunk that says "Server port=8090", change it to 80, and restart Confluence

That's what I did. Confluence doesn't work neither on 80 (when set to 80) not on 8090 (when set to 8090). In the ladder case, the page loads once, but after clicking on "update base URL" the browser fails loading any confluence page, even the homepage that has loaded before.


author: Nic Brough -Adaptavist-
body: What do the logs say?

It may be easier to debug the 8090 failure then change port later, but there might be a clue in the port 80 log as well.


author: Marc Schaeffler
body: It is currently set to 8090.

catalina log says: "21-Sep-2017 14:14:06.995 SEVERE \[http-nio-8090-exec-4\] org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun  
java.lang.OutOfMemoryError: Metaspace"

This explains why after the first click the host appears to be dead. But, VM has a startup memomry of 16GB, can extend dynamically without limits.

Is there a setting somewhere that can cause this?


author: Marc Schaeffler
body: I found [this](https://confluence.atlassian.com/confkb/how-to-fix-out-of-memory-errors-by-increasing-available-memory-154071.html?_ga=2.15561590.1510559382.1505983843-1796539738.1505983843)and was able to adjust system settings so that it takes longer until the OutOfMemoryError does appear. It takes now 5 minutes.

But, that doesn't solve the problem. Even if i increase memory endlessly, the symptom remains the same. (Setting is port 8090, start page is loading, after the first click on it Confluence stops serving any pages. Forever extreme high CPU load on server.)

It appears like Confluence falls into an endless loop of something after the first click.

Any ideas?


author: AnnWorley
body: My recommendation is to remove the following system variable, if it is present in your system properties:

```
-XX:MaxMetaspaceSize=256m 
```

Please see this knowledge base article for detailed instructions: [Confluence crashes due to OutOfMemoryError Metaspace](https://confluence.atlassian.com/confkb/confluence-crashes-due-to-outofmemoryerror-metaspace-751632580.html)

I noticed that this thread was impacted by an issue with the platform that Community runs on. We are currently working to make all the posts visible again.


author: AnnWorley
body: Quick update: All posts are reported to be displaying again as expected on the Community forum.