Build cancelled when publishing internal artifacts

Hi
I get the following log:

[14:47:54]Checking for changes
[14:47:59]Publishing internal artifacts (running for 1m:01s)
[14:48:10][Publishing internal artifacts] Sending using ArtifactsCachePublisher
[14:48:12][Publishing internal artifacts] Sending using WebPublisher
[14:48:12]Building incremental patch for VCS root: Payment Service; checkout rules: =>; revision: ef7abba2f37bff8292a00e4e8d109ba20c198967 --> 188806cdf28bf51a66edb63ea487fa85b4ef2b90
[14:48:12][Publishing internal artifacts] Sending using ArtifactsCachePublisher
[14:48:13][Publishing internal artifacts] Sending using WebPublisher
[14:48:18][Publishing internal artifacts] Sending using ArtifactsCachePublisher
[14:48:19][Publishing internal artifacts] Sending using WebPublisher
[14:48:24][Publishing internal artifacts] Sending using ArtifactsCachePublisher
[14:48:25][Publishing internal artifacts] Sending using WebPublisher
[14:48:30][Publishing internal artifacts] Sending using ArtifactsCachePublisher
[14:48:30][Publishing internal artifacts] Sending using WebPublisher
[14:48:36][Publishing internal artifacts] Sending using ArtifactsCachePublisher
[14:48:36][Publishing internal artifacts] Sending using WebPublisher
[14:48:42][Publishing internal artifacts] Sending using ArtifactsCachePublisher
[14:48:42][Publishing internal artifacts] Sending using WebPublisher
[14:48:48][Publishing internal artifacts] Sending using ArtifactsCachePublisher
[14:48:48][Publishing internal artifacts] Sending using WebPublisher
[14:48:54][Publishing internal artifacts] Sending using ArtifactsCachePublisher
[14:48:54][Publishing internal artifacts] Sending using WebPublisher
[14:49:00][Publishing internal artifacts] Sending using ArtifactsCachePublisher
[14:49:00][Publishing internal artifacts] Sending using WebPublisher
[14:49:01]Build canceled


I.e. the build is cancelled without any obvious error message and I have no Idea how to fix it.
Any suggestions? Thanks!
4 comments
Comment actions Permalink

The relevent logs:
teamcity-agent.log
-----------------------------------
[2014-05-12 11:06:55,172]   INFO - r.agent.impl.AgentLogProxyImpl - Failed to perform remote command Publishing to .teamcity/properties for build 178979, error: java.lang.ClassCastException: java.lang.NullPointerException cannot be cast to jetbrains.buildServer.agent.ArtifactPublishingFailedException
[2014-05-12 11:06:55,172]   INFO - r.agent.impl.AgentLogProxyImpl - Adding ping and re-register command on top of the remote command queue
[2014-05-12 11:07:01,647]   INFO - buildServer.AGENT.registration - Registering on server http://vm-buildserver, AgentDetails{Name='BUILDAGENT-REG', AgentId=9, BuildId=178979, AgentOwnAddress='null', AlternativeAddresses=[10.101.5.148], Port=9090, Version='29879', PluginsVersion='29879-md5-1ab7c729c759e6f915a5c1402d9a5c44', AvailableRunners=[Ant, dotnet-tools-dupfinder, dotnet-tools-inspectcode, Duplicator, ftp-deploy-runner, FxCop, gradle-runner, Inspection, Ipr, jetbrains.dotNetGenericRunner, jetbrains.mspec, jetbrains_powershell, JPS, Maven2, MSBuild, MSTest, NAnt, NUnit, rake-runner, simpleRunner, sln2003, smb-deploy-runner, ssh-deploy-runner, ssh-exec-runner, tomcat-deploy-runner, VS.Solution, VSTest], AvailableVcs=[perforce, mercurial, jetbrains.git, svn, cvs], AuthorizationToken='ae31b144853104d75d29bca7440c0d97', PingCode='OungnadMNdOcrKxJPWxOUD1mWIlczS01'}
[2014-05-12 11:07:01,896]   INFO - buildServer.AGENT.registration - Server confirmed we are still registered
[2014-05-12 11:07:01,896]   INFO - r.agent.impl.AgentLogProxyImpl - Ping OK and registered on the server again: 178979
[2014-05-12 11:07:01,896]   INFO - r.agent.impl.AgentLogProxyImpl - Pending remote commands count: 6
[2014-05-12 11:07:01,896]   INFO - ernalArtifactsProcessingLogger - Start: Publishing files using ArtifactsCachePublisher
[2014-05-12 11:07:02,115]   INFO - ernalArtifactsProcessingLogger - Start: Publishing files using WebPublisher
[2014-05-12 11:07:02,333]   INFO - r.agent.impl.AgentLogProxyImpl - Failed to perform remote command Publishing to .teamcity/properties for build 178979, error: java.lang.ClassCastException: java.lang.NullPointerException cannot be cast to jetbrains.buildServer.agent.ArtifactPublishingFailedException
[2014-05-12 11:07:02,333]   INFO - r.agent.impl.AgentLogProxyImpl - Adding ping and re-register command on top of the remote command queue

wrapper.log
-----------------------------------------
INFO   | jvm 1    | 2014/05/12 11:06:22 | [2014-05-12 11:06:22,099]   WARN - ildServer.util.EventDispatcher - Error in event handler  
INFO   | jvm 1    | 2014/05/12 11:06:22 | java.lang.IllegalStateException: Disk cache is not initialized. Call init() before using cache.
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at jetbrains.buildServer.artifacts.impl.DirectoryCacheProviderImpl.getLocalCache(DirectoryCacheProviderImpl.java:72)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at jetbrains.buildServer.agent.publisher.ArtifactsCachePublisher$1.buildStarted(ArtifactsCachePublisher.java:36)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at java.lang.reflect.Method.invoke(Unknown Source)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:117)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:67)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at com.sun.proxy.$Proxy9.buildStarted(Unknown Source)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at jetbrains.buildServer.agent.impl.buildStages.startStages.FireBuildStartedStage.doBuildState(FireBuildStartedStage.java:20)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at jetbrains.buildServer.agent.impl.buildStages.startStages.FireEventStageBase.doBuildStage(FireEventStageBase.java:26)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at jetbrains.buildServer.agent.impl.BuildRunAction.doStages(BuildRunAction.java:70)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at jetbrains.buildServer.agent.impl.BuildRunAction.runBuild(BuildRunAction.java:50)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:263)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:50)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:236)
INFO   | jvm 1    | 2014/05/12 11:06:22 |  at java.lang.Thread.run(Unknown Source)
INFO   | jvm 1    | 2014/05/12 11:06:23 | Registering on server http://vm-buildserver, AgentDetails{Name='BUILDAGENT-REG', AgentId=9, BuildId=178979, AgentOwnAddress='null', AlternativeAddresses=[10.101.5.148], Port=9090, Version='29879', PluginsVersion='29879-md5-1ab7c729c759e6f915a5c1402d9a5c44', AvailableRunners=[Ant, dotnet-tools-dupfinder, dotnet-tools-inspectcode, Duplicator, ftp-deploy-runner, FxCop, gradle-runner, Inspection, Ipr, jetbrains.dotNetGenericRunner, jetbrains.mspec, jetbrains_powershell, JPS, Maven2, MSBuild, MSTest, NAnt, NUnit, rake-runner, simpleRunner, sln2003, smb-deploy-runner, ssh-deploy-runner, ssh-exec-runner, tomcat-deploy-runner, VS.Solution, VSTest], AvailableVcs=[perforce, mercurial, jetbrains.git, svn, cvs], AuthorizationToken='ae31b144853104d75d29bca7440c0d97', PingCode='OungnadMNdOcrKxJPWxOUD1mWIlczS01'}
INFO   | jvm 1    | 2014/05/12 11:06:24 | Server confirmed we are still registered
INFO   | jvm 1    | 2014/05/12 11:06:29 | Registering on server http://vm-buildserver, AgentDetails{Name='BUILDAGENT-REG', AgentId=9, BuildId=178979, AgentOwnAddress='null', AlternativeAddresses=[10.101.5.148], Port=9090, Version='29879', PluginsVersion='29879-md5-1ab7c729c759e6f915a5c1402d9a5c44', AvailableRunners=[Ant, dotnet-tools-dupfinder, dotnet-tools-inspectcode, Duplicator, ftp-deploy-runner, FxCop, gradle-runner, Inspection, Ipr, jetbrains.dotNetGenericRunner, jetbrains.mspec, jetbrains_powershell, JPS, Maven2, MSBuild, MSTest, NAnt, NUnit, rake-runner, simpleRunner, sln2003, smb-deploy-runner, ssh-deploy-runner, ssh-exec-runner, tomcat-deploy-runner, VS.Solution, VSTest], AvailableVcs=[perforce, mercurial, jetbrains.git, svn, cvs], AuthorizationToken='ae31b144853104d75d29bca7440c0d97', PingCode='OungnadMNdOcrKxJPWxOUD1mWIlczS01'}
INFO   | jvm 1    | 2014/05/12 11:06:29 | Server confirmed we are still registered
INFO   | jvm 1    | 2014/05/12 11:06:35 | Registering on server http://vm-buildserver, AgentDetails{Name='BUILDAGENT-REG', AgentId=9, BuildId=178979, AgentOwnAddress='null', AlternativeAddresses=[10.101.5.148], Port=9090, Version='29879', PluginsVersion='29879-md5-1ab7c729c759e6f915a5c1402d9a5c44', AvailableRunners=[Ant, dotnet-tools-dupfinder, dotnet-tools-inspectcode, Duplicator, ftp-deploy-runner, FxCop, gradle-runner, Inspection, Ipr, jetbrains.dotNetGenericRunner, jetbrains.mspec, jetbrains_powershell, JPS, Maven2, MSBuild, MSTest, NAnt, NUnit, rake-runner, simpleRunner, sln2003, smb-deploy-runner, ssh-deploy-runner, ssh-exec-runner, tomcat-deploy-runner, VS.Solution, VSTest], AvailableVcs=[perforce, mercurial, jetbrains.git, svn, cvs], AuthorizationToken='ae31b144853104d75d29bca7440c0d97', PingCode='OungnadMNdOcrKxJPWxOUD1mWIlczS01'}
INFO   | jvm 1    | 2014/05/12 11:06:35 | Server confirmed we are still registered
INFO   | jvm 1    | 2014/05/12 11:06:41 | Registering on server http://vm-buildserver, AgentDetails{Name='BUILDAGENT-REG', AgentId=9, BuildId=178979, AgentOwnAddress='null', AlternativeAddresses=[10.101.5.148], Port=9090, Version='29879', PluginsVersion='29879-md5-1ab7c729c759e6f915a5c1402d9a5c44', AvailableRunners=[Ant, dotnet-tools-dupfinder, dotnet-tools-inspectcode, Duplicator, ftp-deploy-runner, FxCop, gradle-runner, Inspection, Ipr, jetbrains.dotNetGenericRunner, jetbrains.mspec, jetbrains_powershell, JPS, Maven2, MSBuild, MSTest, NAnt, NUnit, rake-runner, simpleRunner, sln2003, smb-deploy-runner, ssh-deploy-runner, ssh-exec-runner, tomcat-deploy-runner, VS.Solution, VSTest], AvailableVcs=[perforce, mercurial, jetbrains.git, svn, cvs], AuthorizationToken='ae31b144853104d75d29bca7440c0d97', PingCode='OungnadMNdOcrKxJPWxOUD1mWIlczS01'}
INFO   | jvm 1    | 2014/05/12 11:06:41 | Server confirmed we are still registered
INFO   | jvm 1    | 2014/05/12 11:06:48 | Registering on server http://vm-buildserver, AgentDetails{Name='BUILDAGENT-REG', AgentId=9, BuildId=178979, AgentOwnAddress='null', AlternativeAddresses=[10.101.5.148], Port=9090, Version='29879', PluginsVersion='29879-md5-1ab7c729c759e6f915a5c1402d9a5c44', AvailableRunners=[Ant, dotnet-tools-dupfinder, dotnet-tools-inspectcode, Duplicator, ftp-deploy-runner, FxCop, gradle-runner, Inspection, Ipr, jetbrains.dotNetGenericRunner, jetbrains.mspec, jetbrains_powershell, JPS, Maven2, MSBuild, MSTest, NAnt, NUnit, rake-runner, simpleRunner, sln2003, smb-deploy-runner, ssh-deploy-runner, ssh-exec-runner, tomcat-deploy-runner, VS.Solution, VSTest], AvailableVcs=[perforce, mercurial, jetbrains.git, svn, cvs], AuthorizationToken='ae31b144853104d75d29bca7440c0d97', PingCode='OungnadMNdOcrKxJPWxOUD1mWIlczS01'}
INFO   | jvm 1    | 2014/05/12 11:06:48 | Server confirmed we are still registered
INFO   | jvm 1    | 2014/05/12 11:06:54 | Registering on server http://vm-buildserver, AgentDetails{Name='BUILDAGENT-REG', AgentId=9, BuildId=178979, AgentOwnAddress='null', AlternativeAddresses=[10.101.5.148], Port=9090, Version='29879', PluginsVersion='29879-md5-1ab7c729c759e6f915a5c1402d9a5c44', AvailableRunners=[Ant, dotnet-tools-dupfinder, dotnet-tools-inspectcode, Duplicator, ftp-deploy-runner, FxCop, gradle-runner, Inspection, Ipr, jetbrains.dotNetGenericRunner, jetbrains.mspec, jetbrains_powershell, JPS, Maven2, MSBuild, MSTest, NAnt, NUnit, rake-runner, simpleRunner, sln2003, smb-deploy-runner, ssh-deploy-runner, ssh-exec-runner, tomcat-deploy-runner, VS.Solution, VSTest], AvailableVcs=[perforce, mercurial, jetbrains.git, svn, cvs], AuthorizationToken='ae31b144853104d75d29bca7440c0d97', PingCode='OungnadMNdOcrKxJPWxOUD1mWIlczS01'}
INFO   | jvm 1    | 2014/05/12 11:06:54 | Server confirmed we are still registered
INFO   | jvm 1    | 2014/05/12 11:07:01 | Registering on server http://vm-buildserver, AgentDetails{Name='BUILDAGENT-REG', AgentId=9, BuildId=178979, AgentOwnAddress='null', AlternativeAddresses=[10.101.5.148], Port=9090, Version='29879', PluginsVersion='29879-md5-1ab7c729c759e6f915a5c1402d9a5c44', AvailableRunners=[Ant, dotnet-tools-dupfinder, dotnet-tools-inspectcode, Duplicator, ftp-deploy-runner, FxCop, gradle-runner, Inspection, Ipr, jetbrains.dotNetGenericRunner, jetbrains.mspec, jetbrains_powershell, JPS, Maven2, MSBuild, MSTest, NAnt, NUnit, rake-runner, simpleRunner, sln2003, smb-deploy-runner, ssh-deploy-runner, ssh-exec-runner, tomcat-deploy-runner, VS.Solution, VSTest], AvailableVcs=[perforce, mercurial, jetbrains.git, svn, cvs], AuthorizationToken='ae31b144853104d75d29bca7440c0d97', PingCode='OungnadMNdOcrKxJPWxOUD1mWIlczS01'}
INFO   | jvm 1    | 2014/05/12 11:07:01 | Server confirmed we are still registered
----------------------------

I think what caused it was manual deletion of artifacts in the agent machine.

0
Comment actions Permalink

Well, I resolved it by manually deleting the caches folder.

0
Comment actions Permalink

Hello,

i have the same issue, but clearing <agent-directory>"/work" | "/temp" | "/system/.artifacts_cache/" doesnt work.
Same issue on all agents.
During build process and before the build is cancelled, i can find the requested .zip in "<agent-directory>/temp/buildTmp/ZipPreprocessor...".

Any suggestions? Thanks!

0
Comment actions Permalink

Hi Oliver,

What TeamCity version do you use? If not the latest one, then please upgrade to the latest TeamCity version (9.0.3 as of now) and check if the issue is still actual
If you use one of the latest versions, then please attach build log, all logs from the agent where this problem occurs and teamcity-server.log file.

0

Please sign in to leave a comment.