Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: New uploads link

...

To fix a problem, we may need a wide range of information about your system as well as various logs. The section below explains how to collect such information.

In this section:

Table of Contents
maxLevel3
minLevel2

Anchor
logging
logging

Logging Events

...

  • if you need server thread dump and the server is run from console, press Ctrl+Break in the console window (this will not work for agent, since it's console belongs to launcher process).
  • if JDK 1.6 is used, use jstack <pid_of_java_process> command (jstack is located in the "bin" directory of JDK installation).
  • you can also use TeamCity-bundled thread dump tool (can be found in agent's plugins). Run the command:

    Code Block
    
    <TeamCity agent>\plugins\stacktracesPlugin\bin\x86\JetBrains.TeamCity.Injector.exe <pid_of_java_process>
    

    On Windows 2003 Server and Vista you might need to run the tool under System account to take a thread dump of ta process run as service. You can use Microsoft PsExec tool for that.

Under Linux

  • run jstack <pid_of_java_process> or kill -3 <pid_of_java_process>. In the latter case output will appear in <TeamCity server home>/logs/catalina.out or <TeamCity agent home>/logs/output.log.

You can also use third-party GUI tool: AdaptJ StackTrace Utility.
It supports Windows, Linux or Mac OS X. Choose "Launch" on the page (if you have Java installed). When the application is started, select the process id via "Process > Select", then dump its thread dump with "Process > Thread Dump".

See also Server Performance section below.

Anchor
oom
oom

...

  • Determine what process encounters the error (the actual building process, the TeamCity server, or the TeamCity agent)
  • Try to increase the memory for the process via '-Xmx' JVM option, like -Xmx512m. If the error message is "java.lang.OutOfMemoryError: PermGen space", the following option should be used instead: -XX:MaxPermSize=150m.
    The option needs to be passed to the process with problems:
    • if it is the building process itself, use "JVM Command Line Parameters" settings in the build runner. e.g. Inspections builds may specifically need to increase the parameter;
    • if it is TeamCity server, or agent, refer to TeamCity Startup Properties on how to pass additional options to the processes;
  • If increasing memory size does not help, please get the memory dump and send it to us for further analysis:
    • to get a memory dump (hprof file) when an OoutOfMemory error occurs, add the following JVM option (works for JDK 1.5.0_07+): -XX:+HeapDumpOnOutOfMemoryError
    • when OOM error occurs next time, java_xxx.hprof file will be created in the process startup directory (<TeamCity home>/bin or <TeamCity Agent home>/bin);
    • archive the file and send it to us.

Anchor
vcs
vcs

Version Control Debug Logging

In general, to debug VCS-related problems we need information for jetbrains.buildServer.VCS Log4j category. So please enable it in the <TeamCity home>\conf\teamcity-server-log4j.xml (for server-side checkout) and <BuildAgent home>\conf\teamcity-agent-log4j.xml (for agent-side checkout) files:

Code Block
xml
xml

<category name="jetbrains.buildServer.VCS" additivity="false">
    <appender-ref ref="ROLL.VCS"/>
    <appender-ref ref="CONSOLE-ERROR"/>
    <priority value="DEBUG"/>
</category>

...

First, please enable generic VCS debug logging, as described above.

Adjust the logging configuration and restart the server or agent, correspondingly. The log will be saved to the logs/teamcity-svn.log file. Generic VCS log should be also taken from logs/teamcity-vcs.log

...

To turn on debug logging of the SVNkit library on the agent (only relevant for agent-side checkout mode) uncomment the following lines in the
<agent home>\conf\teamcity-agent-log4j.xml file:

Code Block
xml
xml

<category name="javasvn.output">
  <priority value="DEBUG"/>
  <appender-ref ref="SVN.LOG"/>
</category>

...

Uncomment Clearcase-related lines in the <TeamCity home>\conf\teamcity-server-log4j.xml file.
The log will be saved to logs\teamcity-clearcase.log directory.

Wiki Markup
{hidden-data}
Use {{\-Dcc.log.commands=true}} JVM parameter
ClearCase commands with their output will be stored into {{ClearCase.log}} file in the server working directory.
{hidden-data}
Anchor
patch
patch

...

To enable tracing for the plugin, run Eclipse IDE with the -debug <filename> program argument. The <filename> portion of the program argument is a properties file containing key-value pairs. Name of each property corresponds to the plugin module and value is either 'true' (to enable debug) or 'false'. Here is an example of enabling most common tracing options:

Code Block

jetbrains.teamcity.core/debug = true
jetbrains.teamcity.core/debug/communications = false
jetbrains.teamcity.core/debug/ui = true
jetbrains.teamcity.core/debug/vcs = true
jetbrains.teamcity.core/debug/vcs/detail = true
jetbrains.teamcity.core/debug/parser = true
jetbrains.teamcity.core/debug/platform = true
jetbrains.teamcity.core/debug/teamcity = true
jetbrains.teamcity.core/perfomance/vcs = true
jetbrains.teamcity.core/perfomance/teamcity = true

...

If the file is over 5 Mb, you can upload the archived files to ftpvia https://ftpuploads.intellijjetbrains.net/.uploads and let us know the exact file name. If you receive permission denied error on upload attempt, please rename the file.com.

You can also send small files via email: teamcity-feedback@jetbrains.com Please do not forget to mention your TeamCity version and environment