我正在EC2中安装TeamCity,从服务器开始,然后继续运行代理。我开始使用亚马逊Linux AMI,在微型实例上运行。然后我做了:
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
当我使用bin / teamcity-server.sh start启动它时,事情就发生了。我可以使用显示“TeamCity正在启动”页面的Web浏览器进行连接。 teamcity-server.log显示了一堆活动,解压缩插件等。
然而突然之间,服务器进程就消失了。该端口不再侦听,ps显示没有运行java进程,浏览器无法连接。
catalina或teamcity日志中没有错误消息。经过多次试验和错误后,我运行了bin / teamcity-server.sh运行(而不是启动)来获取控制台输出,并获得以下内容:
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
我保证我没有杀死这个过程!我可以很好地在Linux中找到自己的方式,但我不确定下一步该去哪里找出原因或什么杀死了这个过程。有人可以帮忙吗?
答案 0 :(得分:3)
在进一步扫描.sh文件后,看看TeamCity是如何开始的,我注意到它为java进程抓取了相当多的内存(512m或750m,具体取决于你使用的是哪一行)。
EC2微型实例总共只有613m of RAM。当我意识到这一点时,我用更大的实例再次尝试了整个过程,并且工作正常。
我仍然很好奇,如果有更好的方式我可以知道是什么导致catalina死亡,所以如果有人想回答这些信息......