cannot get confluence to run on AWS EC2 Ubuntu 14.04
Asked by kimsia sim:

After I attempted to install the confluence 5.8.6,

I followed mainly the steps in <https://confluence.atlassian.com/display/DOC/Installing+Confluence+on+Linux+from+Archive+File#InstallingConfluenceonLinuxfromArchiveFile-2.InstallJava> and <https://confluence.atlassian.com/display/DOC/Start+Confluence+Automatically+on+Linux>

I used \`confluence\` as user and run \`. confluence-start.sh\` inside \`/usr/local/confluence/current/bin/\`

Almost immediately, I get the following message and my user account got switched out of \`confluence\` and back into \`ubuntu\`

[confluence@ip-xxx.xxx.xxx.xxx](mailto:confluence@ip-xxx.xxx.xxx.xxx):/usr/local/confluence/current/bin$ . start-confluence.sh  

```
To run Confluence in the foreground, start the server with start-confluence.sh -fgexecuting as current userIf you encounter issues starting up Confluence, please see the Installation guide at http://confluence.atlassian.com/display/DOC/Confluence+Installation+GuideServer startup logs are located in /usr/local/confluence/current/logs/catalina.outUsing CATALINA_BASE: /usr/local/confluence/currentUsing CATALINA_HOME: /usr/local/confluence/currentUsing CATALINA_TMPDIR: /usr/local/confluence/current/tempUsing JRE_HOME: /usr/lib/jvm/java-7-openjdk-amd64Using CLASSPATH: /usr/local/confluence/current/bin/bootstrap.jar:/usr/local/confluence/current/bin/tomcat-juli.jarUsing CATALINA_PID: /usr/local/confluence/current/work/catalina.pidTomcat started.ubuntu@ip-xxx-xxx-xxx-xxx:~$ sudo su confluenceconfluence@xxx-xxx-xxx-xxx:/home/ubuntu$ cd /usr/local/confluenceconfluence@ip-xxx-xxx-xxx-xxx:/usr/local/confluence$ ls -la
```

I then tried ip address:8090. I get nothing.

Please advise.

\*\*UPDATE\*\*

I have switched to java 8. Same issue

```
confluence@ip-172-31-22-135:/usr/local/confluence/current/bin$ . start-confluence.shTo run Confluence in the foreground, start the server with start-confluence.sh -fgexecuting as current userIf you encounter issues starting up Confluence, please see the Installation guide at http://confluence.atlassian.com/display/DOC/Confluence+Installation+GuideServer startup logs are located in /usr/local/confluence/current/logs/catalina.outUsing CATALINA_BASE: /usr/local/confluence/currentUsing CATALINA_HOME: /usr/local/confluence/currentUsing CATALINA_TMPDIR: /usr/local/confluence/current/tempUsing JRE_HOME: /usr/lib/jvm/java-8-oracleUsing CLASSPATH: /usr/local/confluence/current/bin/bootstrap.jar:/usr/local/confluence/current/bin/tomcat-juli.jarUsing CATALINA_PID: /usr/local/confluence/current/work/catalina.pidExisting PID file found during start.Removing/clearing stale PID file.Tomcat started.
```


Answers:
author: rrudnicki
body: Hi Kimsia,

```
Tomcat started.
```

Your Tomcat looks running fine, so probably your error messages will be on \<confluence-data\>/logs/atlassian-confluence.log. So, please try the following:

1 - Stop Confluence

2 - Start Confluence

3 - Watch the logs:

```
tail -f &lt;confluence-data&gt;/logs/atlassian.log
```

Lastly, can you confirm what are you facing when you try to access Confluence? I mean, is an error message, a blank page?

Regards,

Renato Rudnicki

comments: author: kimsia sim
body: Right after I start confluence, the Ubuntu user will suddenly switch from confluence to ubuntu. Not sure if this is intentional. My confluence data is the folder /usr/local/confluence/data. There is nothing inside. Not even a logs folder.


author: Nic Brough -Adaptavist-
body: "the Ubuntu user will suddenly switch from confluence to ubuntu" - this is nonsense without the context. Do you mean you are using an account by logging in as another person first and using "exit" to go back to the original? That a process is running and spawns another one running under a different user? Or is the session being forcibly killed by another process you've set up to deliberately kill it?Anyway... If your "cofluence home"/logs is empty, then Confluence is not starting at all. Tomcat is unable to get the application loaded. Have a look at /usr/local/confluence/current/logs/catalina.out - this should have an error message in it to tell you why it can't begin to start Confluence.


author: rrudnicki
body: Can you confirm if you have setup confluence home variable properly? Please take a look on \<confluence-data\> confluence/WEB-INF/classes/confluence-init.properties


author: kimsia sim
body: Nic Brough: without me pressing "exit" it went back to the original (i think)the log file for catalina.out last 2 errors are:# An error report file with more information is saved as:# /usr/local/confluence/atlassian-confluence-5.8.6/bin/hs_err_pid11076.logJava HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 1073741824, 0) failed; error='Cannot allocate memory' (errno=12)## There is insufficient memory for the Java Runtime Environment to continue.# Native memory allocation (mmap) failed to map 1073741824 bytes for committing reserved memory.# An error report file with more information is saved as:# /usr/local/confluence/atlassian-confluence-5.8.6/bin/hs_err_pid14165.logOpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000b5a00000, 1073741824, 0) failed; error='Cannot allocate memory' (errno=12)## There is insufficient memory for the Java Runtime Environment to continue.# Native memory allocation (malloc) failed to allocate 1073741824 bytes for committing reserved memory.# An error report file with more information is saved as:# /usr/local/confluence/atlassian-confluence-5.8.6/bin/hs_err_pid17813.log


author: Nic Brough -Adaptavist-
body: Well, that's pretty clear. You are allocating too much memory to Confluence for your machine.You need to run this on a machine with more memory, or decrease the amount you're giving Confluence (if it's a default installation, then that's not going to work, it's on pretty minimal settings already, and you will definitely need to run this on a machine with more memory)


author: Nic Brough -Adaptavist-
body: What does the atlassian-confluence.log file say is going wrong?

comments: author: kimsia sim
body: where can i find this atlassian-confluence.log?


Tags: confluence-administration