Can't start server on linux

I trying to install Teamcity on amazon ec2, and i can't start the server.

Find logs in TeamCity/logs/teamcity-server.log, but nothing else. Where can I find more useful logs?
My logs:
[2022-12-14 09:12:45,815]   INFO -  jetbrains.buildServer.STARTUP - ===========================================================
[2022-12-14 09:12:45,815]   INFO -  jetbrains.buildServer.STARTUP - Starting TeamCity server
[2022-12-14 09:12:45,930]   INFO -  jetbrains.buildServer.STARTUP - Server shutdown event received
[2022-12-14 09:12:46,014]   INFO -  jetbrains.buildServer.STARTUP - TeamCity version: 2022.10.1 (build 116934), data format version 989
[2022-12-14 09:12:46,019]   INFO -  jetbrains.buildServer.STARTUP - OS: Linux, version 5.13.0-1029-aws, amd64, Current user: root, Time zone: UTC
[2022-12-14 09:12:46,019]   INFO -  jetbrains.buildServer.STARTUP - Java: 11.0.17, OpenJDK 64-Bit Server VM (11.0.17+8-post-Ubuntu-1ubuntu220.04, mixed mode, sharing), OpenJDK Runtime Environment (11.0.17+8-post-Ubuntu-1ubuntu220.04), Ubuntu; JVM parameters: --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -XX:+IgnoreUnrecognizedVMOptions -XX:ReservedCodeCacheSize=640M --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Djava.util.logging.config.file=/app/TeamCity/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Xmx1024m -Dteamcity.configuration.path=../conf/teamcity-startup.properties -Dlog4j2.configurationFile=file:/app/TeamCity/bin/../conf/teamcity-server-log4j.xml -Dteamcity_logs=/app/TeamCity/bin/../logs -Djava.awt.headless=true -Dignore.endorsed.dirs= -Dcatalina.base=/app/TeamCity -Dcatalina.home=/app/TeamCity -Djava.io.tmpdir=/app/TeamCity/temp
[2022-12-14 09:12:46,021]   INFO -  jetbrains.buildServer.STARTUP - Garbage collection: G1 Young Generation, G1 Old Generation
[2022-12-14 09:12:46,021]   INFO -  jetbrains.buildServer.STARTUP - Web server version: Apache Tomcat/8.5.82
[2022-12-14 09:12:46,024]   INFO -  jetbrains.buildServer.STARTUP - Server IP addresses: 10.210.95.19
[2022-12-14 09:12:46,026]   INFO -  jetbrains.buildServer.STARTUP - Web server ports: 80 (protocol: HTTP/1.1, scheme: http), 8105 (shutdown port)
[2022-12-14 09:12:46,026]   INFO -  jetbrains.buildServer.STARTUP - Context path: "/", servlet real path: "/app/TeamCity/webapps/ROOT"
[2022-12-14 09:12:46,032]   INFO -  jetbrains.buildServer.STARTUP - TeamCity distribution type: tar.gz
[2022-12-14 09:12:46,054]   INFO -  jetbrains.buildServer.STARTUP - TeamCity server node id: MAIN_SERVER
[2022-12-14 09:12:46,056]   INFO -  jetbrains.buildServer.STARTUP - Version file lock was successfully obtained: /app/TeamCity/webapps/ROOT/BUILD_116934
[2022-12-14 09:12:46,069]   INFO -  jetbrains.buildServer.STARTUP - Current stage: TeamCity server is shutting down
[2022-12-14 09:12:46,070]   INFO -  jetbrains.buildServer.STARTUP - Stopping the main application
[2022-12-14 09:12:46,070]   INFO -  jetbrains.buildServer.STARTUP - The main servlet is not initialized, nothing to shut down.
[2022-12-14 09:12:46,070]   INFO -  jetbrains.buildServer.STARTUP - Version file lock was released: /app/TeamCity/webapps/ROOT/BUILD_116934
[2022-12-14 09:12:46,071]   INFO -  jetbrains.buildServer.STARTUP - Server shutdown complete. Uptime was < 1s

This reapetes three times and nothing happens.
I follow this instruction for linux wile installing server: https://www.jetbrains.com/help/teamcity/quick-setup-guide.html#Install+and+run+on+Linux+and+macOS


What have I done wrong?

0
1 comment

Hi! It looks like a JVM heap memory issue. For a 64-bit JVM, at least 2 GB of heap memory (-Xmx2g) is recommended (the actual production setup may require more, depending on the use case).

An example of how you can configure TeamCity JVM heap on Linux:

echo "TEAMCITY_SERVER_MEM_OPTS=-Xmx2g" | sudo tee -a /etc/environment >/dev/null
source /etc/environment

Check out these documentation sections for more details:
https://www.jetbrains.com/help/teamcity/server-startup-properties.html#JVM+Options
https://www.jetbrains.com/help/teamcity/configure-server-installation.html#Configure+Memory+Settings+for+TeamCity+Server

More details about why the server stops may be found in the <teamcity_home_dir>/logs/catalina.out file.

0

Please sign in to leave a comment.