When pushing an octopack to the nuget feed of octopus it quite often results in “Internal Server Error (500)”
There is an (seemingly identical) issue here from another user which got closed:
http://help.octopusdeploy.com/discussions/problems/49803-internal-nuget-server-push-fails-with-500-internal-server-error
When looking into the logs I get this the message: “The directory is not empty.”
Best regards
// Henrik
Full log from the occasion:
2017-04-18 12:24:43.4060 12 WARN Outstanding Retention tasks were not completed before the next task was due to be scheduled. If this error persists, check the Tasks tab for any running Retention tasks, and cancel them manually.
2017-04-18 12:24:46.3889 29 INFO Reader took 2264ms (132ms until the first record): SELECT ALIAS_VariableSet_0.* FROM (SELECT * FROM dbo.[VariableSet]) ALIAS_VariableSet_0 INNER JOIN (SELECT * FROM dbo.[Deployment] WHERE ([TaskId] IN (SELECT [Id] FROM [ServerTask] WHERE [State] IN (‘Success’, ‘Failed’)))) ALIAS_Deployment_1 ON ALIAS_VariableSet_0.OwnerId = ALIAS_Deployment_1.Id ORDER BY ALIAS_VariableSet_0.Id
2017-04-18 12:25:17.3521 32 INFO Reader took 350ms (59ms until the first record): SELECT * FROM dbo.[DeploymentProcess] WHERE ([IsFrozen] = 0) ORDER BY Id
2017-04-18 12:25:23.0539 32 INFO Insert took 1654ms: INSERT INTO dbo.[EventRelatedDocument] (EventId, RelatedDocumentId) values (@0__EventId, @0__RelatedDocumentId)
2017-04-18 12:25:23.0539 32 INFO Insert took 1659ms: INSERT INTO dbo.[Event] (RelatedDocumentIds, ProjectId, EnvironmentId, TenantId, Category, UserId, Username, Occurred, Message, Id, Json) values (@RelatedDocumentIds, @ProjectId, @EnvironmentId, @TenantId, @Category, @UserId, @Username, @Occurred, @Message, @Id, @Json)
2017-04-18 12:25:25.4817 32 ERROR Unhandled error on request: http://byggserver:8080/nuget/packages/ by TeamcityPublisherAccount : The directory is not empty.
System.IO.IOException: The directory is not empty.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound)
at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
at Octopus.Shared.Util.OctopusPhysicalFileSystem.DeleteDirectory(String path) in Y:\Work\refs\tags\3.4.12\source\Octopus.Shared\Util\OctopusPhysicalFileSystem.cs:line 85
at Octopus.Server.Web.Api.NuGet.PackagePushActionBase1.Execute() in Y:\Work\refs\tags\3.4.12\source\Octopus.Server\Web\Api\NuGet\PackagePushActionBase.cs:line 105 at Octopus.Server.Web.Infrastructure.Api.Responder
1.Respond(TDescriptor options, NancyContext context) in Y:\Work\refs\tags\3.4.12\source\Octopus.Server\Web\Infrastructure\Api\Responder.cs:line 162
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at Octopus.Server.Web.Api.OctopusRestApiModule.<>c__DisplayClass0_0.<.ctor>b__0(Object o) in Y:\Work\refs\tags\3.4.12\source\Octopus.Server\Web\Api\OctopusRestApiModule.cs:line 46
at Nancy.Routing.Route.<>c__DisplayClass4.b__3(Object parameters, CancellationToken context)