TeamCity installation runs but I get HTTP Status 404 from Apache Tomcat

I login to Linux 2.6.18. I untar the TeamCity-6.0.2.tar.gz file to a subdirectory. I have Java 1.6.0_22 installed. I navigate to TeamCity/bin and execute runAll.sh start. It reports starting. I go to a Windows XP with IE 8 and enter http://<server>:8111 and it reports "webpage cannot be displayed". I can ping the server. I can telnet to it on 8111 (and after space space it disconnects, so that appears okay). How can I get to the TeamCity GUI to configure it for building products?

> ./runAll.sh start

Using CATALINA_BASE:   /project/package/TeamCity
Using CATALINA_HOME:   /project/package/TeamCity
Using CATALINA_TMPDIR: /project/package/TeamCity/temp
Using JRE_HOME:        /usr/java/latest
Using CLASSPATH:       /project/package/TeamCity/bin/bootstrap.jar
Starting TeamCity build agent...
Done [1373], see log at ../logs/teamcity-agent.log {note that this isn't created}
> ./version.sh

Using CATALINA_BASE:   /project/package/TeamCity
Using CATALINA_HOME:   /project/package/TeamCity
Using CATALINA_TMPDIR: /project/package/TeamCity/temp
Using JRE_HOME:        /usr/java/latest
Using CLASSPATH:       /project/package/TeamCity/bin/bootstrap.jar
Server version: Apache Tomcat/6.0.29
Server built:   July 19 2010 1458
Server number:  6.0.0.29
OS Name:        Linux
OS Version:     2.6.18-194.11.3.el5
Architecture:   amd64
JVM Version:    1.6.0_22-b04
JVM Vendor:     Sun Microsystems Inc.
> java -version

java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)

> netstat|grep 8111 {abbreviated}

7:tcp        0      0 localhost:58062             localhost:8111              ESTABLISHED
8:tcp        0      0 localhost:8111              localhost:58062             ESTABLISHED

> ps -cFW|less -+S {abbreviated}

user  1373     1 TS   24 208083 25944  0 14:58 pts/0    00:00:00 /usr/java/latest/bin/java -ea -cp ../launcher/lib/launcher.jar jetbrains.buildServer.agent.Launcher -ea -Xmx384m -Dteamcity_logs=../logs/ -Dlog4j.configuration=file:../conf/teamcity-agent-log4j.xml jetbrains.buildServer.agent.AgentMain -file ../conf/buildAgent.properties
user  1391  1373 TS   21 183220 113456 1 14:58 pts/0    00:00:20 /usr/java/jdk1.6.0_22/jre/bin/java ... ... jetbrains.buildServer.agent.AgentMain -
> ls -aLF ../logs {abbreviated}

-rw-rw----  1 user  group  9729 Mar  3 15:44 catalina.2011-03-03.log
-rw-rw----  1 user  group  9729 Mar  3 15:44 catalina.out
> more catalina.out {note catalina.<date>.log is the same}

Mar 3, 2011 2:58:04 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performanc
e in production environments was not found on the java.library.path: /usr/java/j
dk1.6.0_22/jre/lib/amd64/server:/usr/java/jdk1.6.0_22/jre/lib/amd64:/usr/java/jd
k1.6.0_22/jre/../lib/amd64::/usr/java/latest/lib:/login/user/java/lib:/expor
t/home/projects/xerces-c1_3_0-SolCC/lib:/u02/weblogic_4.5.1/lib:/u02/weblogic_4.
5.1/lib/solaris:/export/oracle/product/8.1.6/lib:/export/oracle/product/8.1.6/jd
bc/lib:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Mar 3, 2011 2:58:04 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8111
Mar 3, 2011 2:58:04 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 820 ms
Mar 3, 2011 2:58:04 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 3, 2011 2:58:04 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
Mar 3, 2011 2:58:04 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml
Mar 3, 2011 2:58:07 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8111
Mar 3, 2011 2:58:07 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3407 ms

{I'll consider adding the Native Library once I get the basics running}

Then I try to browse to http://<server>:8111 from another machine and get "webpage cannot be displayed". Am I missing some configuration/setup/initialization steps? Am I supposed to get to the TeamCity GUI another way?

9 comments
Comment actions Permalink

Is more information needed to help diagnose this? Are there some configuration steps I need to check? I haven't changed the untared installation. Is there a validation script I can run to check the installation? Is there a command line tool I can run from the server to see if the web server is running?

0
Comment actions Permalink

I get the following from any browser when I connect using http://{server-name}:8111/

HTTP Status 404 - /


type Status report

message /

description The requested resource (/) is not available.


Apache Tomcat/6.0.29

Do I need to do something else after gzip xfz {teamcity}.tar.gz other than ./bin/runAll.sh start? The runAll script ends with "Done [11558], see log at ../logs/teamcity-agent.log" but the logs directory only contains:

drwxrwx---  2 user group 4096 Mar  9 09:24 ./
drwxrwx--- 12 user group 4096 Mar  9 09:24 ../
-rw-rw----  1 user group 3140 Mar  9 09:52 catalina.2011-03-09.log
-rw-rw----  1 user group 3140 Mar  9 09:52 catalina.out
-rw-rw----  1 user group    0 Mar  9 09:24 host-manager.2011-03-09.log
-rw-rw----  1 user group    0 Mar  9 09:24 localhost.2011-03-09.log
-rw-rw----  1 user group    0 Mar  9 09:24 manager.2011-03-09.log
-rw-rw----  1 user group    0 Mar  9 09:24 teamcity-javaLogging-2011-03-09.log
And the catalina.out file contains:

Mar 9, 2011 9:52:05 AM 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/java/jdk1.6.0_22/jre/lib/amd64/server:/usr/java/jdk1.6.0_22/jre/lib/amd64:/usr/java/jdk1.6.0_22/jre/../lib/amd64::/usr/java/latest/lib:/login/user/java/lib:/export/home/projects/xerces-c1_3_0-SolCC/lib:/u02/weblogic_4.5.1/lib:/u02/weblogic_4.5.1/lib/solaris:/export/oracle/product/8.1.6/lib:/export/oracle/product/8.1.6/jdbc/lib:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Mar 9, 2011 9:52:05 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8111
Mar 9, 2011 9:52:05 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 836 ms
Mar 9, 2011 9:52:05 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 9, 2011 9:52:05 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
Mar 9, 2011 9:52:05 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml
Mar 9, 2011 9:52:07 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8111
Mar 9, 2011 9:52:07 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1771 ms

If the Apache Native Library is required, where can I download and configure it for TeamCity since that wasn't in the basic instructions. I've deleted and reinstalled the entire TeamCity system and the result is the same.

Any advice at all would be appreciated.

0
Comment actions Permalink

There is no need of adding tomcat native library to make TeamCity running. We intensionally removed it from our distibution.
Please try to log in to TeamCity from the linux machine. Does it work?

There could be a firewall issue. Please check if you machine allows incomeing connections to 8111 port.

0
Comment actions Permalink

The machine has no X11 GUI interface, just a command line interface. I have tried from another machine directly on the subnet with X11 and a browser and I get the same 404 status noted above.

Sorry for the delay in responding; I was on vacation.

0
Comment actions Permalink

Could you please try telnet to connect to teamcity locally.

0
Comment actions Permalink

> ./bin/runAll.sh stop
Using CATALINA_BASE:   /project/package/TeamCity
Using CATALINA_HOME:   /project/package/TeamCity
Using CATALINA_TMPDIR: /project/package/TeamCity/temp
Using JRE_HOME:        /project/package/jre1.6.0_24
Using CLASSPATH:       /project/package/TeamCity/bin/bootstrap.jar
Stopping TeamCity build agent...
Received stop command from console.
Sending agent shutdown command to: http://localhost:9090
Shutdown command successfully sent. Agent will exit when idle.
> netstat|grep 8111
> ./bin/runAll.sh start
Using CATALINA_BASE:   /project/package/TeamCity
Using CATALINA_HOME:   /project/package/TeamCity
Using CATALINA_TMPDIR: /project/package/TeamCity/temp
Using JRE_HOME:        /project/package/jre1.6.0_24
Using CLASSPATH:       /project/package/TeamCity/bin/bootstrap.jar
Starting TeamCity build agent...
Done [4139], see log at ../logs/teamcity-agent.log
> ps -f|cat
user  4139     1  0 10:54 pts/0    00:00:00 /project/package/jre1.6.0_24/bin/java -ea -cp ../launcher/lib/launcher.jar jetbrains.buildServer.agent.Launcher -ea -Xmx384m -Dteamcity_logs=../logs/ -Dlog4j.configuration=file:../conf/teamcity-agent-log4j.xml jetbrains.buildServer.agent.AgentMain -file ../conf/buildAgent.properties
> ls logs
catalina.2011-03-09.log      localhost.2011-03-21.log
catalina.2011-03-21.log      manager.2011-03-09.log
catalina.out                 manager.2011-03-21.log
host-manager.2011-03-09.log  teamcity-javaLogging-2011-03-09.log
host-manager.2011-03-21.log  teamcity-javaLogging-2011-03-21.log
localhost.2011-03-09.log
> find . -name launcher    
./buildAgent/launcher
> ls conf
Catalina             log4j.dtd                       teamcity-server-log4j.xml
catalina.policy      logging.properties              tomcat-users.xml
catalina.properties  server.xml                      web.xml
context.xml          teamcity-maintenance-log4j.xml
> telnet localhost 8111
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
^]

Telnet seems to connect to TeamCity. But there are other questions. Why does runAll.sh say to look in ../logs/teamcity-agent.log but I don't find that log file? Why does the process refer to launcher/lib/launcher.jar and I only find one in buildagent? Why does the process refer to ../conf/teamcity-agent-log4j.xml and there is no such file? Why does the process refer to ../conf/buildAgent.properties but there is no such file? All I did was untar TeamCity and try to run it.

0
Comment actions Permalink

Those path are intentionally made relative to working directory. There should be no issue if you start all .sh files from the directory thay are located.

If the server is working you may check the posts once more to ensure 8111 post is openned for outside incomeing connections.

Agent and Server processes should have all rights to access all it's files.

0
Comment actions Permalink

My first installation was based upon TeamCity-6.0.2.tar.gz (314905842 bytes). My second installation was based upon TeamCity-6.0.3.tar.gz (314243793 bytes) and this ran correctly and the GUI appeared immediately with no reconfiguration, just untaring.

0
Comment actions Permalink

Thanks for feedback!

0

Please sign in to leave a comment.