Unable to reinstall Confluence, different Java errors at different stages.
Asked by williamc:

Hi

I had Confluence/Jira/Bitbucket/Bamboo on a single (Windows) server all in trial mode. Everything was working great and I decided to buy all 4 tools.

Bitbucket and Confluence both complained about the database collation (I think it was)...

Bitbucket reinstalled fine without issue.. Confluence has been a PITA.

I first tried backing up and doing a restore, but it "just didn't work". As I only had a handful of pages, I thought it was easier to start from scratch. I have now uninstalled/reinstalled over 10 times now and I seemingly get different errors at random.

I have tried to clear all confluence files and folders that I can see, but, I was wondering if there are any other locations aside from c:\\program files\\atlassian\\application data\\confluence and c:\\program files\\atlassian\\confluence?

The main two errors I get are:

1. I run the installer, the last step is to start the Confluence service - it doesn't auto start and the webpage isn't there. If I look in the event viewer I see:

The Atlassian Confluence.0 Confluence090517094935 service terminated unexpectedly. It has done this 5 time(s).

If I manually start the service, it starts and I can browse to the setup page.

50% of the time, it loads with an error:

![con1.jpg](/t5/image/serverpage/image-id/21414i522A60396E31DE80/image-size/large?v=v2&px=999 "con1.jpg")

the rest of the time, I am able to get past this first stage, supply DB credentials (which pass test) and I can verify it creates the database. After a while, it goes to the next page which looks unthemed (I can't remember/not sure if it should be):

![con2.jpg](/t5/image/serverpage/image-id/21415i3D5F256702A85A58/image-size/large?v=v2&px=999 "con2.jpg")

It doesn't matter if I chose Example or Empty site, the next page takes a while, it then asks me to set up authentication and I chose JIRA each time. It then forwards me to this error:

![con3.jpg](/t5/image/serverpage/image-id/21416iD2134ABB7595A648/image-size/large?v=v2&px=999 "con3.jpg")

I have tried going through the logs, but, I'm not a Java dev and I see nothing obvious popping out at me.

The only relevant logs I believe:

[c:\\program files\\atlassian\\application data\\confluence\\logs\\atlassian-confluence.log](https://ezpcltd-my.sharepoint.com/:u:/p/william/EfdAqWHZvmdKmARL2S7HIqgB8GtH1f1T-LNa6o_FZZacuQ)

[C:\\Program Files\\Atlassian\\Confluence\\logs\\catalina.2018-05-06](https://ezpcltd-my.sharepoint.com/:u:/p/william/Eaodd-OreTVFrwlJZnT2IekBOPmbFARXK2mH9zT2-6-BuA?e=nOMet5)

[C:\\Program Files\\Atlassian\\Confluence\\logs\\confluence090517094935-stderr.2018-05-06](https://ezpcltd-my.sharepoint.com/:u:/p/william/EaAIESftmEpEiCHDUbVzDDQBfXFCTzPe1xFjVJNd8ZoGgA)

We have been months without Confluence! And, we are at the point where we need to start using it! Can anyone please offer some assistance?

Thanks


Answers:
author: AnnWorley
body: William and I were able to put our heads together over a screen share and install Confluence from the .zip archive. Willam had the environment set up properly; when we installed Confluence together the setup went as expected. One gotcha we ran into was that we had to install a full JDK for the JAVA_HOME variable before we could get the Windows Service to install.

comments: author: Sai Reddy
body: Hello Ann Worley,

I am getting the same problem. as you mentioned I have tried the ZIp installation even that solution is not working. cloud you please let me know if something I am missing here

Thanks,

Sai


author: Sai Reddy
body: Hello All,

the issue resolve after using the different port. unfortunately we(Atlassian support team +me) unable to find root cause why it was not working with same port

Thanks,

Sai


author: AnnWorley
body: Thanks for the logs, I looked at them and saw pretty much the scenario you describe, the installation is going fine and then fails during the setup wizard.

Since there have been so many reinstalls and possible relics left behind, my recommendation is to:

1. Uninstall Confluence, including [manually removing the service](https://stackoverflow.com/questions/76074/how-can-i-delete-a-service-in-windows) if necessary
2. Install Confluence from the .zip archive (requires [setting JAVA_HOME](https://confluence.atlassian.com/crowd/setting-java_home-61604243.html) but otherwise easy): [Installing Confluence on Windows from Zip File](https://confluence.atlassian.com/doc/installing-confluence-on-windows-from-zip-file-144212170.html)
3. When you get to the user management step, choose **Manage Users and Groups in Confluence**
4. Install the Windows Service after completing the setup wizard: [Start Confluence Automatically on Windows as a Service](https://confluence.atlassian.com/doc/start-confluence-automatically-on-windows-as-a-service-172071.html)
5. After Confluence is running as expected, connect to Jira for user management as described in [Connecting to Crowd or Jira for User Management](https://confluence.atlassian.com/doc/connecting-to-crowd-or-jira-for-user-management-229838465.html)

I look forward to hearing the result of these steps.

Thanks,

Ann

comments: author: williamc
body: Hi Ann,

Just another observation - I uninstalled and I noticed that the service was still there, I manually removed it and I wondered if that was the issue (e.g. I don't know Tomcat, but, is the //RS//Con..." bit a unique ID which is wrong), so, I then did a reinstall from the installer - however, it didn't fix - the installer looks like it created another service is a disabled state.

I was just hoping to use the installer in order to make upgrading easier...

I'm now uninstalling again and following your steps to the letter.


author: williamc
body: Hi [@AnnWorley](/t5/user/viewprofilepage/user-id/502040),

No good I'm afraid :(

All went well and to plan, but, it forwarded me to the un-themed page as in my second image, then, I got the same error as in the third picture.

Do you want me to upload logs again, or is there anything else you can recommend?

p.s. I found a bug on the link (or, I did it wrong) <https://confluence.atlassian.com/doc/installing-confluence-on-windows-from-zip-file-144212170.html> - The file in 5.1 was not \<installation-directory\>/startup.bat but \<installation-directory\>/bin/startup.bat


author: Sebastian Liebscher
body: If someone uses Confluence within a docker environment:

Check for exited docker container:

```
docker ps -a
```

I had to delete somehow "exited" docker instances which were messing up my fresh confluence installation.

```
docker rm <confluence>
docker rm <confluence-database>
```

Hope this helps!


author: Kim YJ
body: Hi

I'm noy sure you solve this issue. I also encounting same issue but different story. same database with same setting

i used docker for confluence without mounting volume in the begining. There was no error for installation. After 1st installation, I decide mount volume to backup my data. So I add volume mount set, the the error come out.

after that the error comes with volume mount setting, no error without volume setting


author: williamc
body: I will be forever scratching my head as to what the problem was... Thank you so much [@AnnWorley](/t5/user/viewprofilepage/user-id/502040) for your assistance.

All I can think of is, the previous times when I tried to install, I had set the transaction-isolation mode via a sql command instead of the my.ini - however, the previous two failures did have it set the correct way.

The Java issue also shouldn't have affected the installer as I think you said it was included... and it worked without it, it just wouldn't let the service install.

Also, I started it via start-confluence instead of startup, but, you said that shouldn't make a difference.

All I know is, I am very grateful and thankful it is now working... I've taken a snapshot of the server and backup because I don't want to have to do this again, and I'm dreading when it comes time to upgrade!

Anyway, many thanks again for your assistance.


Tags: confluence-server

server