Symptoms
- TeamCity server is configured behind IIS as a reverse proxy.
- TeamCity build agent connects to the TeamCity server through the reverse proxy.
- The build agent can't publish artifacts and gets stuck in an infinite loop. The build log shows:
[11:15:05]Publishing artifacts[11:15:05][Publishing artifacts] Collecting files to publish: [toZip/** => artifact.zip][11:15:06][Publishing artifacts] Creating archive artifact.zip (9s)[11:15:06][Creating archive artifact.zip] Creating C:\BuildAgent\temp\buildTmp\ZipPreprocessor2847146024236637664\artifact.zip[11:15:15][Creating archive artifact.zip] Archive was created, file size 32142324 bytes[11:15:15][Publishing artifacts] Sending toZip/**[11:15:25][Publishing artifacts] Sending toZip/**[11:15:39][Publishing artifacts] Sending toZip/**[11:15:48][Publishing artifacts] Sending toZip/**[11:16:01][Publishing artifacts] Sending toZip/**[11:16:16][Publishing artifacts] Sending toZip/** - teamcity-agent.log is filled with 404 responses from IIS:
[2012-08-01 12:04:55,514] WARN - jetbrains.buildServer.AGENT - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/><title>404 - File or directory not found.</title><style type="text/css"><!--body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}fieldset{padding:0 15px 10px 15px;}
Cause
The most common cause for this is the maxAllowedContentLength setting in IIS either:
- is set to a too small value;
- is left unconfigured and so defaults to 30000000 bytes (<30 Mb).
So any artifact larger than maxAllowedContentLength is discarded by IIS.
Resolution
Increasing the maxAllowedContentLength setting in IIS should resolve the issue.
Comments
0 comments
Please sign in to leave a comment.