Teamcity OctoPack is hanging by a java process


All the sudden our Teamcity build start hanging and blocking us to deploy our next deployment. It is doing this with OctoPack process and publishing the artifacts. at the very end of publishing artifacts is just hanging and doing nothing basically.

[16:43:21][Step 10/11] Publishing artifacts (running for 8m:12s)
[16:43:21][Publishing artifacts] Collecting files to publish: [E:\BuildAgent\work\f825fe027d09a4dd\Cms.Admin\obj\octopacked\Cms.Admin.3.0.4324.0.nupkg]
[16:43:24][Publishing artifacts] Publishing 1 file [Cms.Admin/obj/octopacked/Cms.Admin.3.0.4324.0.nupkg] using [WebPublisher]
[16:43:24][Publishing artifacts] Publishing 1 file [Cms.Admin/obj/octopacked/Cms.Admin.3.0.4324.0.nupkg] using [ArtifactsCachePublisher]

Can you please let me know what is the issuue and how can i fix this?


Hi Onur,

Thanks for reaching out! Couple of questions:

  1. Could you tell us which versions of Octopack and TeamCity you are using?

  2. Have you checked if the hanging builds always happen when running the build on the same build agent or not?

  3. Could you send us the full build log so we can see the whole context of the build? If you don’t want to publish it here, feel free to email it to Just remember to mention in the email body that it is related to this public thread.


1- OctoPack 3.0.42 and 3.6.4 (updated from nuget in the project) and TeamCity 9.1.7
2- The project I sent above (CMS) is only available in one agent so I could not test it. But there are 3 different Projects (CMS, ADMIN, USER ) that have same step (runner) (Visual Studio (sln)) and Run OctoPack is checked.

Right now CMS, ADMIN is failing as above but USER deploying fine. On the other hand the ADMIN project can be deployed on other agent. but I cannot test it for CMS.

I also tried, for CMS, to OctopusDeploy: Pack runner but when “Publish packages as build artifacts” is checked it is failing as well. It seems like the packing works just fine as i can see the file but very end of the artifact publish (WebPublisher, ArtifactsCachePublisher). it s just hanging not returning any error.

Uploaded the build log
build.log (42.2 KB)

Thank you very much

Hi @onurtopal,

In this case what Octopack does is:

  • Create the package.
  • Tell Teamcity about the package artifact.

Once TC knows about the file-to-become-an-artifact, the control is handed over to TC. It seems that that’s where the process is failing.

I’d try testing some things with Octopack out of the picture such as:

  • Try experimenting with just adding any file from your build as an artifact and see if TC still hangs
  • Try creating a nuget package using the Nuget Pack step that comes with TC (instead of using Octopack) and make TC publish that package as an Artifact.

Hope that helps with the troubleshooting. Let me know if anything of the above isn’t clear.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.