TeamCity: java.lang.IllegalStateException: Disk cache is not initialized. Call init() before using cache.

Автор: | 12/27/2014
 

teamcity_logoПри запуске билда – билд-агент сообщает об ошибке:

[13:00:29]Unexpected error: java.lang.IllegalStateException: Disk cache is not initialized. Call init() before using cache.
[13:00:29]java.lang.IllegalStateException: Disk cache is not initialized. Call init() before using cache. at jetbrains.buildServer.artifacts.impl.DirectoryCacheProviderImpl.getHttpCache(DirectoryCacheProviderImpl.java:57) at jetbrains.buildServer.artifacts.impl.DependencyResolverImpl.createRuntimeConfiguration(DependencyResolverImpl.java:92) at jetbrains.buildServer.artifacts.impl.DependencyResolverImpl.resolve(DependencyResolverImpl.java:47) at jetbrains.buildServer.agent.impl.buildStages.startStages.DownloadDependenciesStage.doStage(DownloadDependenciesStage.java:67) at …
jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:48) at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:221) at java.lang.Thread.run(Unknown Source)

Решение – очистить директорию %BuildAgentsystem.artifacts_cache:

$ du -sh /cygdrive/c/BuildAgent/system/.artifacts_cache/
20G     /cygdrive/c/BuildAgent/system/.artifacts_cache/
$ rm -rf /cygdrive/c/BuildAgent/system/.artifacts_cache/*

Перезапускаем агент – готово.