TeamCity Server dies before it finishes starting up

I'm installing TeamCity in EC2, starting with the Server then moving on the agents.  I'm starting with the Amazon Linux AMI, running on a micro instance.  Then I did:

sudo yum update

wget http://download.jetbrains.com/teamcity/TeamCity-7.1.1.tar.gz
tar -xvzf TeamCity-7.1.1.tar.gz
cd TeamCity
bin/teamcity-server.sh start


When I start it using bin/teamcity-server.sh start, things happen.  I can connect using a web browser which shows the 'TeamCity is starting' page.  The teamcity-server.log shows a bunch of activity, unzipping plugins etc.

But then suddently, the server process just disappears.  The port's no longer listened to, ps shows no java process running, and the browser can't connect.

There's no error messages in the catalina or teamcity logs.  After much trial and error though, I ran bin/teamcity-server.sh run (instead of start) to get console output, and got the following:

Using CATALINA_BASE:   /home/ec2-user/TeamCity
Using CATALINA_HOME:   /home/ec2-user/TeamCity
Using CATALINA_TMPDIR: /home/ec2-user/TeamCity/temp
Using JRE_HOME:        /usr/lib/jvm/jre
Using CLASSPATH:       /home/ec2-user/TeamCity/bin/bootstrap.jar:/home/ec2-user/TeamCity/bin/tomcat-juli.jar
Nov 1, 2012 7:22:25 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Nov 1, 2012 7:22:26 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8111"]
Nov 1, 2012 7:22:26 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2742 ms
Nov 1, 2012 7:22:26 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Nov 1, 2012 7:22:26 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
Nov 1, 2012 7:22:26 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/ec2-user/TeamCity/webapps/ROOT
Log4J configuration file /home/ec2-user/TeamCity/bin/../conf/teamcity-server-log4j.xml will be monitored with interval 10 seconds.
Nov 1, 2012 7:22:30 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8111"]
Nov 1, 2012 7:22:30 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3786 ms
=======================================================================
TeamCity 7.1.1 (build 24074) initialized, OS: Linux, JRE: 1.6.0_24-b24
TeamCity is running in professional mode
bin/teamcity-server.sh: line 18:  4231 Killed                  ./catalina.sh $1



I promise that I did not kill the process!  Why is it going down like this?
1 comment
Comment actions Permalink

After digging around in teamcity-server.sh, I noticed the Xmx settings used for Java.  The micro instances at EC2 only have 613MB of RAM, and both of the memory settings in the default sh file are either close or exceed that level.

I started up on an instance with more memory, and all appears well.

0

Please sign in to leave a comment.