Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package download in Calamari fails for NuGet v3 feeds #3135

Closed
michaelnoonan opened this issue Feb 6, 2017 · 2 comments
Closed

Package download in Calamari fails for NuGet v3 feeds #3135

michaelnoonan opened this issue Feb 6, 2017 · 2 comments
Assignees
Labels
feature/packaging kind/bug This issue represents a verified problem we are committed to solving

Comments

@michaelnoonan
Copy link
Contributor

michaelnoonan commented Feb 6, 2017

Error

This instance has already started one or more requests. Properties can only be modified before sending the first request.

Steps to reproduce

  1. Configure a v3 external NuGet feed in the Library - I used https://octopus.myget.org/F/octopus-dependencies/api/v3/index.json
  2. Configure a project package step to use that feed
  3. Set the step to download directly on the agent
  4. Deploy the project and it should fail with the following message: This instance has already started one or more requests. Properties can only be modified before sending the first request.
  5. Change the feed to a v2 feed URI and it should work again - I used https://octopus.myget.org/F/octopus-dependencies/api/v2

Full task log

Task ID:        ServerTasks-16
Task status:    Failed
Task queued:    Monday, February 06, 2017 12:01 AM
Task started:   Monday, February 06, 2017 12:01 AM
Task duration:  2 minutes
Server version: 3.8.6+Branch.master.Sha.e453dd3a9c3430ad4e1be36d5e55dbe28fafacf9

                    | == Failed: Deploy MikeFeedTest release 3.6.35 to The Environment ==
00:01:17   Verbose  |   Guided failure is not enabled for this task
00:02:59   Fatal    |   The deployment failed because one or more steps failed. Please see the deployment log for details.
                    | 
                    |   == Failed: Acquire packages ==
00:01:17   Info     |     Acquiring packages
00:01:17   Info     |     Making a list of packages to acquire
00:01:17   Verbose  |     No packages are required on the Octopus Server
00:01:17   Info     |     Delta compression is enabled for package transfers from the Octopus Server to deployment targets
00:01:17   Verbose  |     Download Calamari.3.6.35 on App server
00:02:59   Fatal    |     The step failed: Activity failed with error 'The remote script failed with exit code 100'.
00:02:59   Verbose  |     Acquire Packages completed
                    |   
                    |     Failed: App server
00:02:59   Fatal    |       The remote script failed with exit code 100
                    |     
                    |       Running: Download package Calamari.3.6.35 directly from NuGet feed 'Octopus Dependencies' at https://octopus.myget.org/F/octopus-dependencies/api/v3/index.json
00:01:18   Verbose  |         Octopus Deploy: Calamari version 3.6.37+Branch.master.Sha.e35aa8ce806a0e6faf210705a633508eedaea2ee
00:01:18   Verbose  |         Environment Information:
00:01:18   Verbose  |         OperatingSystem: Microsoft Windows NT 6.2.9200.0
00:01:18   Verbose  |         OsBitVersion: x64
00:01:18   Verbose  |         Is64BitProcess: True
00:01:18   Verbose  |         CurrentUser: NT AUTHORITY\SYSTEM
00:01:18   Verbose  |         MachineName: WIN-IIQAKUSKR14
00:01:18   Verbose  |         ProcessorCount: 2
00:01:18   Verbose  |         CurrentDirectory: C:\Octopus\TestInstance1\Work\20170206000117-21
00:01:18   Verbose  |         TempDirectory: C:\Windows\TEMP\
00:01:18   Verbose  |         HostProcessName: Calamari
00:01:18   Verbose  |         Executing 'C:\Octopus\TestInstance1\Work\20170206000117-21\Script.ps1'
00:01:19   Verbose  |         Name                           Value
00:01:19   Verbose  |         ----                           -----
00:01:19   Verbose  |         PSVersion                      4.0
00:01:19   Verbose  |         WSManStackVersion              3.0
00:01:19   Verbose  |         SerializationVersion           1.1.0.1
00:01:19   Verbose  |         CLRVersion                     4.0.30319.42000
00:01:19   Verbose  |         BuildVersion                   6.3.9600.17400
00:01:19   Verbose  |         PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
00:01:19   Verbose  |         PSRemotingProtocolVersion      2.2
00:01:19   Verbose  |         PowerShell Environment Information:
00:01:19   Verbose  |         OperatingSystem: Microsoft Windows NT 6.3.9600.0
00:01:19   Verbose  |         OsBitVersion: x64
00:01:19   Verbose  |         Is64BitProcess: True
00:01:19   Verbose  |         CurrentUser: NT AUTHORITY\SYSTEM
00:01:19   Verbose  |         MachineName: WIN-IIQAKUSKR14
00:01:19   Verbose  |         ProcessorCount: 2
00:01:19   Verbose  |         CurrentDirectory: C:\Octopus\TestInstance1\Work\20170206000117-21
00:01:19   Verbose  |         TempDirectory: C:\Windows\TEMP\
00:01:19   Verbose  |         HostProcessName: powershell
00:01:19   Verbose  |         TotalPhysicalMemory: 4193904 KB
00:01:19   Verbose  |         AvailablePhysicalMemory: 3474948 KB
00:01:19   Verbose  |         Octopus Deploy: Calamari version 3.6.37+Branch.master.Sha.e35aa8ce806a0e6faf210705a633508eedaea2ee
00:01:19   Verbose  |         Environment Information:
00:01:19   Verbose  |         OperatingSystem: Microsoft Windows NT 6.2.9200.0
00:01:19   Verbose  |         OsBitVersion: x64
00:01:19   Verbose  |         Is64BitProcess: True
00:01:19   Verbose  |         CurrentUser: NT AUTHORITY\SYSTEM
00:01:19   Verbose  |         MachineName: WIN-IIQAKUSKR14
00:01:19   Verbose  |         ProcessorCount: 2
00:01:19   Verbose  |         CurrentDirectory: C:\Octopus\TestInstance1\Work\20170206000117-21
00:01:19   Verbose  |         TempDirectory: C:\Windows\TEMP\
00:01:19   Verbose  |         HostProcessName: Calamari
00:01:19   Verbose  |         Checking package cache for package Calamari 3.6.35
00:01:19   Info     |         Downloading NuGet package Calamari 3.6.35 from feed: 'https://octopus.myget.org/F/octopus-dependencies/api/v3/index.json'
00:01:19   Verbose  |         Downloaded package will be stored in: 'C:\Octopus\TestInstance1\Files\feeds-octopus-dependencies'
00:01:19   Verbose  |         Downloading package (attempt 1 of 5)
00:01:19   Verbose  |         Attempt 1 of 5: This instance has already started one or more requests. Properties can only be modified before sending the first request.
00:01:19   Verbose  |         Going to wait 10s before attempting the download from the external feed again.
00:01:29   Verbose  |         Downloading package (attempt 2 of 5)
00:01:29   Verbose  |         Attempt 2 of 5: This instance has already started one or more requests. Properties can only be modified before sending the first request.
00:01:29   Verbose  |         Going to wait 20s before attempting the download from the external feed again.
00:01:49   Verbose  |         Downloading package (attempt 3 of 5)
00:01:49   Verbose  |         Attempt 3 of 5: This instance has already started one or more requests. Properties can only be modified before sending the first request.
00:01:49   Verbose  |         Going to wait 30s before attempting the download from the external feed again.
00:02:19   Verbose  |         Downloading package (attempt 4 of 5)
00:02:19   Verbose  |         Attempt 4 of 5: This instance has already started one or more requests. Properties can only be modified before sending the first request.
00:02:19   Verbose  |         Going to wait 40s before attempting the download from the external feed again.
00:02:59   Verbose  |         Downloading package (attempt 5 of 5)
00:02:59   Verbose  |         Attempt 5 of 5: This instance has already started one or more requests. Properties can only be modified before sending the first request.
00:02:59   Error    |         Failed to download package Calamari 3.6.35 from feed: 'https://octopus.myget.org/F/octopus-dependencies/api/v3/index.json'
00:02:59   Error    |         System.Exception: The package Calamari version 3.6.35 could not be downloaded from the external feed 'https://octopus.myget.org/F/octopus-dependencies/api/v3/index.json' after making 5 attempts over a total of 100s. Make sure the package is pushed to the external feed and try the deployment again. For a detailed troubleshooting guide go to http://g.octopushq.com/TroubleshootMissingPackages
00:02:59   Error    |         System.InvalidOperationException: This instance has already started one or more requests. Properties can only be modified before sending the first request.
00:02:59   Error    |         at System.Net.Http.HttpClientHandler.CheckDisposedOrStarted()
00:02:59   Error    |         at Calamari.Integration.Packages.NuGet.NuGetV3Downloader.CreateHttpClient(ICredentials credentials) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Integration\Packages\NuGet\NuGetV3Downloader.cs:line 41
00:02:59   Error    |         at Calamari.Integration.Packages.NuGet.NuGetV3Downloader.GetHttp(Uri uri, ICredentials credentials, Action`1 processContent) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Integration\Packages\NuGet\NuGetV3Downloader.cs:line 59
00:02:59   Error    |         at Calamari.Integration.Packages.NuGet.NuGetV3Downloader.GetPackageBaseUri(Uri feedUri, ICredentials feedCredentials) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Integration\Packages\NuGet\NuGetV3Downloader.cs:line 79
00:02:59   Error    |         at Calamari.Integration.Packages.NuGet.NuGetV3Downloader.DownloadPackage(String packageId, NuGetVersion version, Uri feedUri, ICredentials feedCredentials, String targetFilePath) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Integration\Packages\NuGet\NuGetV3Downloader.cs:line 25
00:02:59   Error    |         at Calamari.Integration.Packages.NuGet.NuGetPackageDownloader.DownloadPackage(String packageId, NuGetVersion version, Uri feedUri, ICredentials feedCredentials, String targetFilePath, Int32 maxDownloadAttempts, TimeSpan downloadAttemptBackoff, Action`5 action) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Integration\Packages\NuGet\NuGetPackageDownloader.cs:line 37 ---> System.InvalidOperationException: This instance has already started one or more requests. Properties can only be modified before sending the first request.
00:02:59   Error    |         at System.Net.Http.HttpClientHandler.CheckDisposedOrStarted()
00:02:59   Error    |         at Calamari.Integration.Packages.NuGet.NuGetV3Downloader.CreateHttpClient(ICredentials credentials) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Integration\Packages\NuGet\NuGetV3Downloader.cs:line 41
00:02:59   Error    |         at Calamari.Integration.Packages.NuGet.NuGetV3Downloader.GetHttp(Uri uri, ICredentials credentials, Action`1 processContent) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Integration\Packages\NuGet\NuGetV3Downloader.cs:line 59
00:02:59   Error    |         at Calamari.Integration.Packages.NuGet.NuGetV3Downloader.GetPackageBaseUri(Uri feedUri, ICredentials feedCredentials) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Integration\Packages\NuGet\NuGetV3Downloader.cs:line 79
00:02:59   Error    |         at Calamari.Integration.Packages.NuGet.NuGetV3Downloader.DownloadPackage(String packageId, NuGetVersion version, Uri feedUri, ICredentials feedCredentials, String targetFilePath) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Integration\Packages\NuGet\NuGetV3Downloader.cs:line 25
00:02:59   Error    |         at Calamari.Integration.Packages.NuGet.NuGetPackageDownloader.DownloadPackage(String packageId, NuGetVersion version, Uri feedUri, ICredentials feedCredentials, String targetFilePath, Int32 maxDownloadAttempts, TimeSpan downloadAttemptBackoff, Action`5 action) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Integration\Packages\NuGet\NuGetPackageDownloader.cs:line 37
00:02:59   Error    |         --- End of inner exception stack trace ---
00:02:59   Error    |         at Calamari.Integration.Packages.NuGet.NuGetPackageDownloader.DownloadPackage(String packageId, NuGetVersion version, Uri feedUri, ICredentials feedCredentials, String targetFilePath, Int32 maxDownloadAttempts, TimeSpan downloadAttemptBackoff, Action`5 action) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Integration\Packages\NuGet\NuGetPackageDownloader.cs:line 57
00:02:59   Error    |         at Calamari.Integration.Packages.Download.PackageDownloader.DownloadPackage(String packageId, NuGetVersion version, Uri feedUri, ICredentials feedCredentials, String cacheDirectory, Int32 maxDownloadAttempts, TimeSpan downloadAttemptBackoff, LocalNuGetPackage& downloaded, String& downloadedTo) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Integration\Packages\Download\PackageDownloader.cs:line 132
00:02:59   Error    |         at Calamari.Integration.Packages.Download.PackageDownloader.DownloadPackage(String packageId, NuGetVersion version, String feedId, Uri feedUri, ICredentials feedCredentials, Boolean forcePackageDownload, Int32 maxDownloadAttempts, TimeSpan downloadAttemptBackoff, String& downloadedTo, String& hash, Int64& size) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Integration\Packages\Download\PackageDownloader.cs:line 51
00:02:59   Error    |         at Calamari.Commands.DownloadPackageCommand.Execute(String[] commandLineArguments) in Z:\buildAgent\workDir\14ffc968155e4956\source\Calamari\Commands\DownloadPackageCommand.cs:line 69
                    |       
                    |   Canceled: Step 1: Package
00:02:59   Verbose  |     Step "Package" runs only when all previous steps succeeded; skipping

@michaelnoonan michaelnoonan added kind/bug This issue represents a verified problem we are committed to solving feature/packaging area/execution labels Feb 6, 2017
@droyad
Copy link
Contributor

droyad commented Feb 8, 2017

Duplicate of #2962

@lock
Copy link

lock bot commented Nov 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. If you think you've found a related issue, please contact our support team so we can triage your issue, and make sure it's handled appropriately.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature/packaging kind/bug This issue represents a verified problem we are committed to solving
Projects
None yet
Development

No branches or pull requests

2 participants