biozinc
biozinc

Reputation: 4729

Configuring Teamcity's logging behaviour

I'm using Teamcity 5 for our CI environment. It's a great tool, but I've been struggling with one thing: the stdout_yyyyMMdd.log file in the \TeamCity\logs folder grows to ridiculous sizes. Is there a way to turn it off?

Places I've looked so far:

Edit:

At KIR's suggestion, I actually looked to see what's in stdout. It's the same exception message repeated over and over again:

[2010-12-01 08:57:21,268]   WARN -   jetbrains.buildServer.SERVER - java.io.FileNotFoundException: <...Path...>\.BuildServer\system\caches\search\_8p.prx (The system cannot find the file specified) 
[2010-12-01 08:57:21,315]  ERROR - erverSide.search.SearchService - SearchService.enqueueHistory 
java.io.FileNotFoundException: <...Path...>\.BuildServer\system\caches\search\_8p.prx (The system cannot find the file specified)
    at java.io.RandomAccessFile.open(Native Method)
    at java.io.RandomAccessFile.<init>(Unknown Source)
    at org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput$Descriptor.<init>(SimpleFSDirectory.java:78)
    at org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput.<init>(SimpleFSDirectory.java:108)
    at org.apache.lucene.store.SimpleFSDirectory.openInput(SimpleFSDirectory.java:65)
    at org.apache.lucene.index.SegmentReader$CoreReaders.<init>(SegmentReader.java:132)
    at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:638)
    at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:599)
    at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:104)
    at org.apache.lucene.index.ReadOnlyDirectoryReader.<init>(ReadOnlyDirectoryReader.java:27)
    at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:74)
    at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:704)
    at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
    at org.apache.lucene.index.IndexReader.open(IndexReader.java:476)
    at org.apache.lucene.index.IndexReader.open(IndexReader.java:314)
    at jetbrains.buildServer.serverSide.search.SearchService.getIndexSearcher(SearchService.java:451)
    at jetbrains.buildServer.serverSide.search.SearchService.enqueueHistory(SearchService.java:515)
    at jetbrains.buildServer.serverSide.search.BackgroundIndexer.run(BackgroundIndexer.java:32)
    at java.lang.Thread.run(Unknown Source)

Any idea what this file is?

Upvotes: 1

Views: 1385

Answers (3)

Mark Broadhurst
Mark Broadhurst

Reputation: 2695

The problem is caused by someone or something deleting the Lucene Index in Team city. Everytime you hit a page after this it will log in stdout that it couldnt find the file.

If you clear out the whole folder which should be %USERPROFILE%.BuildServer\system\caches\search\

See http://confluence.jetbrains.net/display/TCD5/TeamCity+Data+Directory for more information on where to find the folder.

And restart Teamcity it will recreate the index on start up and stop logging the error message.

Oh and search should start working again too.

Upvotes: 0

KIR
KIR

Reputation: 5692

Remove .BuildServer\system\caches\search directory and restart TeamCity. May be this would help.

Upvotes: 0

Dave Patterson
Dave Patterson

Reputation: 1407

If you're running TC on unix you could use logrotate: http://linuxcommand.org/man_pages/logrotate8.html (Obviously, this is a workaround but it should be effective.)

This guy has a windows equivalent that may do the trick too: http://www.datori.org/?p=7

Upvotes: 1

Related Questions