0

I'm trying to setup Teamcity on an EC2 Ubuntu instance.

I've:

  1. Downloaded the package through wget http://download.jetbrains.com/teamcity/TeamCity-9.0.4.tar.gz. Unpackaged it.

  2. Unpackaged it: tar -xvzf TeamCity-9.0.4.tar.gz.

  3. sh Teamcity/bin/teamcity-server.sh start.

I can't access the web-app, and when I check the logs, says:

INFO -  jetbrains.buildServer.STARTUP - Server shutdown has been requested 
WARN -  jetbrains.buildServer.STARTUP - Could not determine the local IP address: ip-172-30-1-83: ip-172-30-1-83: unknown error
INFO -  jetbrains.buildServer.STARTUP - Server IP address: -unknown-
INFO -  jetbrains.buildServer.STARTUP - Server shutdown complete

Complete log:

INFO -  jetbrains.buildServer.STARTUP - Starting TeamCity server
INFO -  jetbrains.buildServer.STARTUP - Server shutdown has been requested
INFO -  jetbrains.buildServer.STARTUP - TeamCity version: 9.0.4 (build 32407), data format version 709
INFO -  jetbrains.buildServer.STARTUP - OS: Linux, User: ubuntu, JRE: 1.8.0_45-b14 Java HotSpot(TM) 64-Bit Server VM
INFO -  jetbrains.buildServer.STARTUP - JVM parameters: -Djava.util.logging.config.file=/home/ubuntu/TeamCity/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xmx512m -XX:MaxPermSize=270m -Dlog4j.configuration=file:/home/ubuntu/TeamCity/bin/../conf/teamcity-server-log4j.xml -Dteamcity_logs=../logs/ -Djsse.enableSNIExtension=false -Djava.awt.headless=true -Djava.endorsed.dirs=/home/ubuntu/TeamCity/endorsed -Dcatalina.base=/home/ubuntu/TeamCity -Dcatalina.home=/home/ubuntu/TeamCity -Djava.io.tmpdir=/home/ubuntu/TeamCity/temp
INFO -  jetbrains.buildServer.STARTUP - Garbage collection: Copy, MarkSweepCompact
WARN -  jetbrains.buildServer.STARTUP - Could not determine the local IP address: ip-172-30-1-83: ip-172-30-1-83: unknown error
INFO -  jetbrains.buildServer.STARTUP - Web server version: Apache Tomcat/7.0.59
INFO -  jetbrains.buildServer.STARTUP - Server IP address: -unknown-
INFO -  jetbrains.buildServer.STARTUP - Servlet real path: /home/ubuntu/TeamCity/webapps/ROOT/
INFO -  jetbrains.buildServer.STARTUP - Current stage: TeamCity server is shutting down
INFO -  jetbrains.buildServer.STARTUP - Stopping the main application
INFO -  jetbrains.buildServer.STARTUP - The main servlet is not initialized, nothing to shut down.
INFO -  jetbrains.buildServer.STARTUP - Server shutdown complete

Any hints on how to solve it?

I have Teamcity's web-app working on my local machine (also Ubuntu, and the same Teamcity package).

Tomas Romero
  • 8,418
  • 11
  • 50
  • 72
  • This sounds like it *might* be an issue related to [not enabling `DNS Resolution` or `DNS Hostnames` or having an incomplete or inconsistent configuration related to hostnames in your VPC](http://stackoverflow.com/a/26517850/1695906), such that your machine can't resolve its own IP address from its hostname. – Michael - sqlbot Jun 02 '15 at 00:39
  • This seems to be the case. I have the symptom that is described on that answer (ip alert when running a command with sudo), and I have `DNS hostnames` disabled on my VPC. I'm not sure if I will be able to easily change this since its being used by other instances I don't manage, and I'm not sure about the impact. Please post this as an answer so I can mark it as the accepted one. – Tomas Romero Jun 02 '15 at 13:08
  • Confirming that @Michael-sqlbot's comment was the solution. – Tomas Romero Jun 03 '15 at 19:22

1 Answers1

1

Read the shell script TeamCity/bin/teamcity-server.sh, it is written with limitation, the script can't run out of the application folder.

  export CATALINA_OPTS
  CATALINA_HOME=./..
  CATALINA_BASE=./..

So you should cd to the bin folder and run :

cd Teamcity/bin
sh teamcity-server.sh start

Let me know if it fixs your issue or not.

BMW
  • 42,880
  • 12
  • 99
  • 116