Cannot start tomcat
Asked by zolotukhin:

Hi. My config (by default):

```
&lt;Server port="8000" shutdown="SHUTDOWN" debug="0"&gt;&lt;Service name="Tomcat-Standalone"&gt;&lt;Connector port="8090" connectionTimeout="20000" redirectPort="8443"
```

The ports are free

```
conf # netstat -na|grep 8000conf # netstat -na|grep 8090
```

Trying to start

```
./start-confluence.shTo run Confluence in the foreground, start the server with start-confluence.sh -fgexecuting using dedicated user: confluenceIf you encounter issues starting up Confluence Standalone, please see the Installation guide at http://confluence.atlassian.com/display/DOC/Confluence+Installation+GuideServer startup logs are located in /opt/atlassian/confluence/logs/catalina.outUsing CATALINA_BASE: /opt/atlassian/confluenceUsing CATALINA_HOME: /opt/atlassian/confluenceUsing CATALINA_TMPDIR: /opt/atlassian/confluence/tempUsing JRE_HOME: /opt/atlassian/confluence/jre/Using CLASSPATH: /opt/atlassian/confluence/bin/bootstrap.jar:/opt/atlassian/confluence/bin/tomcat-juli.jarUsing CATALINA_PID: /opt/atlassian/confluence/work/catalina.pid
```

Check the ports:

```
netstat -na|grep 8000netstat -na|grep 8090tcp 0 0 0.0.0.0:8090 0.0.0.0:* LISTEN
```

Service is started but Tomcat is not!

Have some warnings in catalina.out, but no errors. Cannot find a reason


Answers:
author: Robert G. Nadon
body: When that happens to me on Linux I run:

# ps -ef \|grep java

conflue+ 20400 1 1 12:24 pts/0 00:00:16 /opt/atlassian/confluence/jre//bin/java -Djava.util.logging.config.file=/opt/atlassian/confluence/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 -Xms2048m -Xmx2048m -XX:+UseG1GC -Datlassian.plugins.enable.wait=300 -Djava.awt.headless=true -XX:G1ReservePercent=20 -Xloggc:/opt/atlassian/confluence/logs/gc-2017-08-15_12-24-49.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -XX:-PrintGCDetails -XX:+PrintGCDateStamps -XX:-PrintTenuringDistribution -Djava.endorsed.dirs=/opt/atlassian/confluence/endorsed -classpath /opt/atlassian/confluence/bin/bootstrap.jar:/opt/atlassian/confluence/bin/tomcat-juli.jar -Dcatalina.base=/opt/atlassian/confluence -Dcatalina.home=/opt/atlassian/confluence -Djava.io.tmpdir=/opt/atlassian/confluence/temp org.apache.catalina.startup.Bootstrap start

# kill -9 20400

So the process above gets aleinated and the only way to kill it is to kill the proc.


author: Nic Brough -Adaptavist-
body: That all looks fine to me. What does "cannot start Tomcat" mean? If it's not writing anything to catalina.out at all, then you will have errors in the output from start-confluence. What does catalina.out really say?

comments: author: zolotukhin
body: Thanks for reply.

8000 port is not listed.

```
netstat -na|grep?8000
```

Confluence Restart wrote:

```
Mar 02, 2017 1:43:22 PM org.apache.catalina.startup.Catalina stopServerSEVERE: Could not contact localhost:8000. Tomcat may not be running.
```

Catalina.out:

```
Mar 02, 2017 1:48:06 PM org.apache.tomcat.util.digester.SetPropertiesRule beginWARNING: [SetPropertiesRule]{Server} Setting property 'debug' to '0' did not find a matching property.Mar 02, 2017 1:48:06 PM org.apache.catalina.startup.SetAllPropertiesRule beginWARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'debug' to '0' did not find a matching property.Mar 02, 2017 1:48:06 PM org.apache.tomcat.util.digester.SetPropertiesRule beginWARNING: [SetPropertiesRule]{Server/Service/Engine} Setting property 'debug' to '0' did not find a matching property.Mar 02, 2017 1:48:06 PM org.apache.tomcat.util.digester.SetPropertiesRule beginWARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'debug' to '0' did not find a matching property.Mar 02, 2017 1:48:06 PM org.apache.tomcat.util.digester.SetPropertiesRule beginWARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.Mar 02, 2017 1:48:07 PM org.apache.coyote.AbstractProtocol initINFO: Initializing ProtocolHandler ["http-bio-8090"]Mar 02, 2017 1:48:07 PM org.apache.catalina.startup.Catalina loadINFO: Initialization processed in 822 msMar 02, 2017 1:48:07 PM org.apache.catalina.core.StandardService startInternalINFO: Starting service Tomcat-StandaloneMar 02, 2017 1:48:07 PM org.apache.catalina.core.StandardEngine startInternalINFO: Starting Servlet Engine: Apache Tomcat/7.0.47
```


author: Nic Brough -Adaptavist-
body: That looks like it's running. Does hitting <http://localhost:8090> return anything at all?

What does "ps -ef \| grep -i java" show ?


Tags: confluence-administration