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

What is going on here? #10324

Open
dca00 opened this issue Jan 12, 2025 · 5 comments
Open

What is going on here? #10324

dca00 opened this issue Jan 12, 2025 · 5 comments
Labels

Comments

@dca00
Copy link

dca00 commented Jan 12, 2025

NuGet Product Used

Other/NA

Product Version

Which product? Be specific.

Worked before?

No response

Impact

I'm unable to use this version

Repro Steps & Context

  1. Deployed local Nuget solution from the sample project provided by Microsoft, to IIS running on our LAN.
  2. The home page of the new server displayed the command that supposedly should push packages to the server:

Use the command below to push packages to this feed using the NuGet command line tool (nuget.exe).
nuget.exe push {package file} {apikey} -Source http://192.168.10.21/nuget/nuget

  1. The above command resulted in 404.
  2. We removed the extra /nuget from the end of the command and tried again to push a package to that new server:
    C:\Users\userName10\Downloads\nuget.exe push TestPackage.1.1.1.1.nupkg $.......................................u -Source http://192.168.10.21/nuget
    The expectation is that the above command will push the package to the server.
    The actual result is error.

Verbose Logs

NuGet Version: 6.12.1.1
Pushing TestPackage.1.1.1.3.nupkg to 'http://192.168.10.21/nuget'...
  PUT http://192.168.10.21/nuget/
MSBuild auto-detection: using msbuild version '17.12.6.51805' from 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\bin'. Use option -MSBuildVersion to force nuget to use a specific version of MSBuild.
Using C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\NuGet\Plugins\CredentialProvider.Microsoft\CredentialProvider.Microsoft.exe as a credential provider plugin.
    [CredentialProvider.143812]Running in plug-in mode
    [CredentialProvider.143812]Command-line v1.0.8+64ba0444270c653858b4e9af8ae6056fdc0766a8: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\NuGet\Plugins\CredentialProvider.Microsoft\CredentialProvider.Microsoft.exe" -Plugin
    [CredentialProvider.143812]Handling 'Request' 'Initialize'. Time elapsed in ms: 8 - Payload: {"ClientVersion":"6.12.1","Culture":"en-US","RequestTimeout":"00:00:30"}
    [CredentialProvider.143812]Sending response: 'Request' 'Initialize'. Time elapsed in ms: 10
    [CredentialProvider.143812]Time elapsed in milliseconds after sending response 'Request' 'Initialize': 11
    [CredentialProvider.143812]Handling 'Request' 'GetOperationClaims'. Time elapsed in ms: 2 - Payload: {}
    [CredentialProvider.143812]Sending response: 'Request' 'GetOperationClaims'. Time elapsed in ms: 16
    [CredentialProvider.143812]Time elapsed in milliseconds after sending response 'Request' 'GetOperationClaims': 44
    [CredentialProvider.143812]Handling 'Request' 'SetLogLevel'. Time elapsed in ms: 7 - Payload: {"LogLevel":"Debug"}
    [CredentialProvider]Sending response: 'Request' 'SetLogLevel'. Time elapsed in ms: 9
    [CredentialProvider]Time elapsed in milliseconds after sending response 'Request' 'SetLogLevel': 15
    [CredentialProvider]Handling 'Request' 'GetAuthenticationCredentials'. Time elapsed in ms: 6 - Payload: {"Uri":"http://192.168.10.21/nuget","IsRetry":false,"IsNonInteractive":false,"CanShowDialog":true}
    [CredentialProvider]Creating a progress reporter with interval: 00:00:02
    [CredentialProvider]Handling auth request, Uri: http://192.168.10.21/nuget, IsRetry: False, IsNonInteractive: False, CanShowDialog: True
    [CredentialProvider]URI: http://192.168.10.21/nuget
    [CredentialProvider]VstsBuildTaskServiceEndpointCredentialProvider - This credential provider must be run under the Team Build tasks for NuGet with external endpoint credentials. Appropriate environment variable needs to be set.
    [CredentialProvider]Skipping NuGetCredentialProvider.CredentialProviders.VstsBuildTaskServiceEndpoint.VstsBuildTaskServiceEndpointCredentialProvider, cannot provide credentials for http://192.168.10.21/nuget
    [CredentialProvider]VstsBuildTaskCredentialProvider - This credential provider must be run under the Team Build tasks for NuGet. Appropriate environment variables must be set.
    [CredentialProvider]Skipping NuGetCredentialProvider.CredentialProviders.VstsBuildTask.VstsBuildTaskCredentialProvider, cannot provide credentials for http://192.168.10.21/nuget
    [CredentialProvider]GET http://192.168.10.21/nuget
    [CredentialProvider]Caught exception processing GetAuthenticationCredentials  (RequestId: 3c44f0dd-0169-48c4-8881-4a39a45210bc)
    [CredentialProvider]System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions 192.168.10.21:80
   at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
   at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Net.Http.HttpClient.<FinishSendAsyncUnbuffered>d__59.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGetCredentialProvider.CredentialProviders.Vsts.AuthUtil.<GetResponseHeadersAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGetCredentialProvider.CredentialProviders.Vsts.AuthUtil.<GetAzDevDeploymentType>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGetCredentialProvider.CredentialProviders.Vsts.VstsCredentialProvider.<CanProvideCredentialsAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at NuGetCredentialProvider.RequestHandlers.GetAuthenticationCredentialsRequestHandler.<HandleRequestAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at NuGetCredentialProvider.RequestHandlers.RequestHandlerBase`2.<HandleResponseAsync>d__12.MoveNext()
Terminating plugin 'CredentialProvider.Microsoft' due to an unrecoverable fault:  NuGet.Protocol.Plugins.ProtocolException: A plugin protocol exception occurred. ---> NuGet.Protocol.Plugins.ProtocolException: An error occurred while sending the request.
   at NuGet.Protocol.Plugins.OutboundRequestContext`1.HandleFault(Message fault)
   at NuGet.Protocol.Plugins.MessageDispatcher.OnMessageReceived(Object sender, MessageEventArgs e)
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at NuGet.Protocol.Plugins.Connection.OnMessageReceived(Object sender, MessageEventArgs e)
   at NuGet.Protocol.Plugins.StandardOutputReceiver.OnLineRead(Object sender, LineReadEventArgs e)
   --- End of inner exception stack trace ---
An error was encountered when fetching 'PUT http://192.168.10.21/nuget/'. The request will now be retried.
A task was canceled.
  PUT http://192.168.10.21/nuget/
    [CredentialProvider.143816]Running in plug-in mode
    [CredentialProvider.143816]Command-line v1.0.8+64ba0444270c653858b4e9af8ae6056fdc0766a8: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\NuGet\Plugins\CredentialProvider.Microsoft\CredentialProvider.Microsoft.exe" -Plugin
    [CredentialProvider.143816]Handling 'Request' 'Initialize'. Time elapsed in ms: 15 - Payload: {"ClientVersion":"6.12.1","Culture":"en-US","RequestTimeout":"00:00:30"}
    [CredentialProvider.143816]Sending response: 'Request' 'Initialize'. Time elapsed in ms: 18
    [CredentialProvider.143816]Time elapsed in milliseconds after sending response 'Request' 'Initialize': 21
    [CredentialProvider.143816]Handling 'Request' 'SetLogLevel'. Time elapsed in ms: 4 - Payload: {"LogLevel":"Debug"}
    [CredentialProvider]Sending response: 'Request' 'SetLogLevel'. Time elapsed in ms: 7
    [CredentialProvider]Time elapsed in milliseconds after sending response 'Request' 'SetLogLevel': 21
    [CredentialProvider]Handling 'Request' 'GetAuthenticationCredentials'. Time elapsed in ms: 10 - Payload: {"Uri":"http://192.168.10.21/nuget","IsRetry":false,"IsNonInteractive":false,"CanShowDialog":true}
    [CredentialProvider]Creating a progress reporter with interval: 00:00:02
    [CredentialProvider]Handling auth request, Uri: http://192.168.10.21/nuget, IsRetry: False, IsNonInteractive: False, CanShowDialog: True
    [CredentialProvider]URI: http://192.168.10.21/nuget
    [CredentialProvider]VstsBuildTaskServiceEndpointCredentialProvider - This credential provider must be run under the Team Build tasks for NuGet with external endpoint credentials. Appropriate environment variable needs to be set.
    [CredentialProvider]Skipping NuGetCredentialProvider.CredentialProviders.VstsBuildTaskServiceEndpoint.VstsBuildTaskServiceEndpointCredentialProvider, cannot provide credentials for http://192.168.10.21/nuget
    [CredentialProvider]VstsBuildTaskCredentialProvider - This credential provider must be run under the Team Build tasks for NuGet. Appropriate environment variables must be set.
    [CredentialProvider]Skipping NuGetCredentialProvider.CredentialProviders.VstsBuildTask.VstsBuildTaskCredentialProvider, cannot provide credentials for http://192.168.10.21/nuget
    [CredentialProvider]GET http://192.168.10.21/nuget
Terminating plugin 'CredentialProvider.Microsoft' due to an unrecoverable fault:  NuGet.Protocol.Plugins.ProtocolException: A plugin protocol exception occurred. ---> NuGet.Protocol.Plugins.ProtocolException: An error occurred while sending the request.
   at NuGet.Protocol.Plugins.OutboundRequestContext`1.HandleFault(Message fault)
   at NuGet.Protocol.Plugins.MessageDispatcher.OnMessageReceived(Object sender, MessageEventArgs e)
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at NuGet.Protocol.Plugins.Connection.OnMessageReceived(Object sender, MessageEventArgs e)
   at NuGet.Protocol.Plugins.StandardOutputReceiver.OnLineRead(Object sender, LineReadEventArgs e)
   --- End of inner exception stack trace ---
An error was encountered when fetching 'PUT http://192.168.10.21/nuget/'. The request will now be retried.
A task was canceled.
  PUT http://192.168.10.21/nuget/
    [CredentialProvider.143822]Running in plug-in mode
    [CredentialProvider.143822]Command-line v1.0.8+64ba0444270c653858b4e9af8ae6056fdc0766a8: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\NuGet\Plugins\CredentialProvider.Microsoft\CredentialProvider.Microsoft.exe" -Plugin
    [CredentialProvider.143822]Handling 'Request' 'Initialize'. Time elapsed in ms: 18 - Payload: {"ClientVersion":"6.12.1","Culture":"en-US","RequestTimeout":"00:00:30"}
    [CredentialProvider.143822]Sending response: 'Request' 'Initialize'. Time elapsed in ms: 22
    [CredentialProvider.143822]Time elapsed in milliseconds after sending response 'Request' 'Initialize': 25
    [CredentialProvider.143822]Handling 'Request' 'SetLogLevel'. Time elapsed in ms: 4 - Payload: {"LogLevel":"Debug"}
    [CredentialProvider]Sending response: 'Request' 'SetLogLevel'. Time elapsed in ms: 7
    [CredentialProvider]Time elapsed in milliseconds after sending response 'Request' 'SetLogLevel': 21
    [CredentialProvider]Handling 'Request' 'GetAuthenticationCredentials'. Time elapsed in ms: 11 - Payload: {"Uri":"http://192.168.10.21/nuget","IsRetry":false,"IsNonInteractive":false,"CanShowDialog":true}
    [CredentialProvider]Creating a progress reporter with interval: 00:00:02
    [CredentialProvider]Handling auth request, Uri: http://192.168.10.21/nuget, IsRetry: False, IsNonInteractive: False, CanShowDialog: True
    [CredentialProvider]URI: http://192.168.10.21/nuget
    [CredentialProvider]VstsBuildTaskServiceEndpointCredentialProvider - This credential provider must be run under the Team Build tasks for NuGet with external endpoint credentials. Appropriate environment variable needs to be set.
    [CredentialProvider]Skipping NuGetCredentialProvider.CredentialProviders.VstsBuildTaskServiceEndpoint.VstsBuildTaskServiceEndpointCredentialProvider, cannot provide credentials for http://192.168.10.21/nuget
    [CredentialProvider]VstsBuildTaskCredentialProvider - This credential provider must be run under the Team Build tasks for NuGet. Appropriate environment variables must be set.
    [CredentialProvider]Skipping NuGetCredentialProvider.CredentialProviders.VstsBuildTask.VstsBuildTaskCredentialProvider, cannot provide credentials for http://192.168.10.21/nuget
    [CredentialProvider]GET http://192.168.10.21/nuget
Terminating plugin 'CredentialProvider.Microsoft' due to an unrecoverable fault:  NuGet.Protocol.Plugins.ProtocolException: A plugin protocol exception occurred. ---> NuGet.Protocol.Plugins.ProtocolException: An error occurred while sending the request.
   at NuGet.Protocol.Plugins.OutboundRequestContext`1.HandleFault(Message fault)
   at NuGet.Protocol.Plugins.MessageDispatcher.OnMessageReceived(Object sender, MessageEventArgs e)
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at NuGet.Protocol.Plugins.Connection.OnMessageReceived(Object sender, MessageEventArgs e)
   at NuGet.Protocol.Plugins.StandardOutputReceiver.OnLineRead(Object sender, LineReadEventArgs e)
   --- End of inner exception stack trace ---
@jebriede
Copy link

Thanks for reporting the issue. We'll need some more information to repro the issue or troubleshoot. What is the sample project for the NuGet server you are running? Please point us at the steps you took to configure that server or add details in the repro steps. Thanks!

@dca00
Copy link
Author

dca00 commented Jan 18, 2025

Repro Steps & Context

Deployed local Nuget solution from the sample project provided by Microsoft, to IIS running on our LAN.
The home page of the new server displayed the command that supposedly should push packages to the server:

@jeffkl
Copy link

jeffkl commented Jan 21, 2025

@dca00 can you clarify what you deployed when you say "Deployed local Nuget solution from the sample project provided by Microsoft, to IIS running on our LAN.". There are a few different ways to host your own feed.

Are you using authentication? The output above indicates that for some reason an authentication provider is being used.

Also, the error I'm seeing is

System.Net.Http.HttpRequestException: An error occurred while sending the request.
System.Net.WebException: Unable to connect to the remote server
System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions 192.168.10.21:80

Those errors look like fundamental problems in connecting to an endpoint, are you able to connect to your feed with a browser?

@dca00
Copy link
Author

dca00 commented Jan 21, 2025

@dca00 can you clarify what you deployed when you say "Deployed local Nuget solution from the sample project provided by Microsoft, to IIS running on our LAN.". There are a few different ways to host your own feed.

Are you using authentication? The output above indicates that for some reason an authentication provider is being used.

Also, the error I'm seeing is

System.Net.Http.HttpRequestException: An error occurred while sending the request.
System.Net.WebException: Unable to connect to the remote server
System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions 192.168.10.21:80

Those errors look like fundamental problems in connecting to an endpoint, are you able to connect to your feed with a browser?

We followed each and every instruction in this article: https://learn.microsoft.com/en-us/nuget/hosting-packages/nuget-server
We did not do anything that is not in that article.
I do not know your definition of "able to connect to your feed with a browser?"
This is what I see when I open the deployed server:

Image

This is what I see when I click on the first link:

Image

@jeffkl jeffkl transferred this issue from NuGet/Home Jan 21, 2025
@jeffkl
Copy link

jeffkl commented Jan 21, 2025

I'm transferring to the NuGet Server team for assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants