Replies: 1 comment 4 replies
-
@huyi2018 since you control the server, what do the server's logs say? Can you use something like Wireshark to capture the network packets and see what's going on? Since from NuGet's side the error says "Unable to read data from the transport connection: The socket has been shut down", I'm not sure what we can do on NuGet if something outside our control is closing the socket. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
NuGet Version: 6.2.1.2
OS: Darwin B-3E7GMD6M-2337.local 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64
PACKAGESOURCES CONFIG:
PUSH COMMAND: nuget push -Source "test" newtonsoft.json.13.0.2.nupkg -Verbosity detailed
HTTP SERVER using the interactive BASIC authorization
when I push package to myself customized server,authorization failed,server return 401 as follow:
HTTP/1.1 401 Unauthorized
Server: Apache-Coyote/1.1
WWW-Authenticate: Basic realm="Artlab Realm"
Connection: keep-alive
Content-Type: text/plain;charset=utf-8
Content-Length: 0
Date: Tue, 11 Apr 2023 12:55:59 GMT
after one no authorization, one anonymous authentication,then I receive such error:
Error while copying content to a stream.
Unable to read data from the transport connection: The socket has been shut down.
The socket has been shut down
System.Net.Http.HttpRequestException: Error while copying content to a stream. ---> System.IO.IOException: Unable to read data from the transport connection: The socket has been shut down. ---> System.Net.Sockets.SocketException: The socket has been shut down
--- End of inner exception stack trace ---
at System.Net.Sockets.Socket+AwaitableSocketAsyncEventArgs.ThrowException (System.Net.Sockets.SocketError error) [0x00007] in <5964c1f33a6b4e45985e4259425270a7>:0
at System.Net.Sockets.Socket+AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult (System.Int16 token) [0x0001f] in <5964c1f33a6b4e45985e4259425270a7>:0
at System.Net.Http.HttpConnection.WriteAsync (System.ReadOnlyMemory
1[T] source) [0x0015d] in <918e4b7c7e23462cb34be0116230ccaf>:0 at System.Net.Http.HttpConnection+ChunkedEncodingWriteStream.WriteChunkAsync (System.ReadOnlyMemory
1[T] buffer) [0x0016d] in <918e4b7c7e23462cb34be0116230ccaf>:0at System.IO.Stream.CopyToAsyncInternal (System.IO.Stream destination, System.Int32 bufferSize, System.Threading.CancellationToken cancellationToken) [0x0012e] in :0
at System.Net.Http.HttpContent.CopyToAsyncCore (System.Threading.Tasks.ValueTask copyTask) [0x00067] in <918e4b7c7e23462cb34be0116230ccaf>:0
--- End of inner exception stack trace ---
at System.Net.Http.HttpContent.CopyToAsyncCore (System.Threading.Tasks.ValueTask copyTask) [0x0008f] in <918e4b7c7e23462cb34be0116230ccaf>:0
at System.Net.Http.MultipartContent.SerializeToStreamAsync (System.IO.Stream stream, System.Net.TransportContext context) [0x002a5] in <918e4b7c7e23462cb34be0116230ccaf>:0
at System.Net.Http.HttpContent.CopyToAsyncCore (System.Threading.Tasks.ValueTask copyTask) [0x00067] in <918e4b7c7e23462cb34be0116230ccaf>:0
at System.Net.Http.HttpContent.CopyToAsyncCore (System.Threading.Tasks.ValueTask copyTask) [0x00067] in <918e4b7c7e23462cb34be0116230ccaf>:0
at System.Net.Http.HttpContent.CopyToAsyncCore (System.Threading.Tasks.ValueTask copyTask) [0x00067] in <918e4b7c7e23462cb34be0116230ccaf>:0
at System.Net.Http.HttpConnection.SendRequestContentAsync (System.Net.Http.HttpRequestMessage request, System.Net.Http.HttpConnection+HttpContentWriteStream stream, System.Threading.CancellationToken cancellationToken) [0x000a0] in <918e4b7c7e23462cb34be0116230ccaf>:0
at System.Net.Http.HttpConnection.SendAsyncCore (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x012c8] in <918e4b7c7e23462cb34be0116230ccaf>:0
at System.Net.Http.AuthenticationHelper.SendWithNtAuthAsync (System.Net.Http.HttpRequestMessage request, System.Uri authUri, System.Net.ICredentials credentials, System.Boolean isProxyAuth, System.Net.Http.HttpConnection connection, System.Net.Http.HttpConnectionPool connectionPool, System.Threading.CancellationToken cancellationToken) [0x0008e] in <918e4b7c7e23462cb34be0116230ccaf>:0
at System.Net.Http.HttpConnectionPool.SendWithNtConnectionAuthAsync (System.Net.Http.HttpConnection connection, System.Net.Http.HttpRequestMessage request, System.Boolean doRequestAuth, System.Threading.CancellationToken cancellationToken) [0x000b1] in <918e4b7c7e23462cb34be0116230ccaf>:0
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync (System.Net.Http.HttpRequestMessage request, System.Boolean doRequestAuth, System.Threading.CancellationToken cancellationToken) [0x0014b] in <918e4b7c7e23462cb34be0116230ccaf>:0
at System.Net.Http.AuthenticationHelper.SendWithAuthAsync (System.Net.Http.HttpRequestMessage request, System.Uri authUri, System.Net.ICredentials credentials, System.Boolean preAuthenticate, System.Boolean isProxyAuth, System.Boolean doRequestAuth, System.Net.Http.HttpConnectionPool pool, System.Threading.CancellationToken cancellationToken) [0x00112] in <918e4b7c7e23462cb34be0116230ccaf>:0
at System.Net.Http.RedirectHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x000ba] in <918e4b7c7e23462cb34be0116230ccaf>:0
at System.Net.Http.DecompressionHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x000ca] in <918e4b7c7e23462cb34be0116230ccaf>:0
at NuGet.Protocol.ServerWarningLogHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00088] in <1ef564ecb27d4976943eaecd88c2bcc8>:0
at NuGet.Protocol.StsAuthenticationHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x000d7] in <1ef564ecb27d4976943eaecd88c2bcc8>:0
at NuGet.Protocol.HttpSourceAuthenticationHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x000dc] in <1ef564ecb27d4976943eaecd88c2bcc8>:0
at System.Net.Http.HttpClient.FinishSendAsyncUnbuffered (System.Threading.Tasks.Task
1[TResult] sendTask, System.Net.Http.HttpRequestMessage request, System.Threading.CancellationTokenSource cts, System.Boolean disposeCts) [0x000b3] in <918e4b7c7e23462cb34be0116230ccaf>:0 at NuGet.Protocol.HttpRetryHandler+<>c__DisplayClass5_1.<SendAsync>b__0 (System.Threading.CancellationToken timeoutToken) [0x000b8] in <1ef564ecb27d4976943eaecd88c2bcc8>:0 at NuGet.Protocol.TimeoutUtility.StartWithTimeout[T] (System.Func
2[T,TResult] getTask, System.TimeSpan timeout, System.String timeoutMessage, System.Threading.CancellationToken token) [0x001cd] in <1ef564ecb27d4976943eaecd88c2bcc8>:0at NuGet.Protocol.HttpRetryHandler.SendAsync (NuGet.Protocol.HttpRetryHandlerRequest request, System.String source, NuGet.Common.ILogger log, System.Threading.CancellationToken cancellationToken) [0x008ff] in <1ef564ecb27d4976943eaecd88c2bcc8>:0
at NuGet.Protocol.HttpSource.GetThrottledResponse (System.Func
1[TResult] requestFactory, System.TimeSpan requestTimeout, System.TimeSpan downloadTimeout, System.Int32 maxTries, System.Boolean isRetry, System.Boolean isLastAttempt, System.Guid sessionId, NuGet.Common.ILogger log, System.Threading.CancellationToken cancellationToken) [0x00208] in <1ef564ecb27d4976943eaecd88c2bcc8>:0 at NuGet.Protocol.HttpSource.ProcessResponseAsync[T] (NuGet.Protocol.HttpSourceRequest request, System.Func
2[T,TResult] processAsync, NuGet.Protocol.Core.Types.SourceCacheContext cacheContext, NuGet.Common.ILogger log, System.Threading.CancellationToken token) [0x000cb] in <1ef564ecb27d4976943eaecd88c2bcc8>:0at NuGet.Protocol.Core.Types.PackageUpdateResource.PushPackageToServer (System.String source, System.String apiKey, System.String pathToPackage, System.Boolean noServiceEndpoint, System.Boolean skipDuplicate, System.TimeSpan requestTimeout, NuGet.Common.ILogger logger, System.Threading.CancellationToken token) [0x0045a] in <1ef564ecb27d4976943eaecd88c2bcc8>:0
at NuGet.Protocol.Core.Types.PackageUpdateResource.PushPackageCore (System.String source, System.String apiKey, System.String packageToPush, System.Boolean noServiceEndpoint, System.Boolean skipDuplicate, System.TimeSpan requestTimeout, NuGet.Common.ILogger log, System.Threading.CancellationToken token) [0x00175] in <1ef564ecb27d4976943eaecd88c2bcc8>:0
at NuGet.Protocol.Core.Types.PackageUpdateResource.PushPackagePath (System.String packagePath, System.String source, System.String symbolSource, System.String apiKey, System.Func
2[T,TResult] getSymbolApiKey, System.Boolean noServiceEndpoint, System.Boolean skipDuplicate, NuGet.Protocol.Core.Types.SymbolPackageUpdateResourceV3 symbolPackageUpdateResource, System.TimeSpan requestTimeout, NuGet.Common.ILogger log, System.Threading.CancellationToken token) [0x0015c] in <1ef564ecb27d4976943eaecd88c2bcc8>:0 at NuGet.Protocol.Core.Types.PackageUpdateResource.Push (System.Collections.Generic.IList
1[T] packagePaths, System.String symbolSource, System.Int32 timeoutInSecond, System.Boolean disableBuffering, System.Func2[T,TResult] getApiKey, System.Func
2[T,TResult] getSymbolApiKey, System.Boolean noServiceEndpoint, System.Boolean skipDuplicate, NuGet.Protocol.Core.Types.SymbolPackageUpdateResourceV3 symbolPackageUpdateResource, NuGet.Common.ILogger log) [0x00148] in <1ef564ecb27d4976943eaecd88c2bcc8>:0at NuGet.Commands.PushRunner.Run (NuGet.Configuration.ISettings settings, NuGet.Configuration.IPackageSourceProvider sourceProvider, System.Collections.Generic.IList`1[T] packagePaths, System.String source, System.String apiKey, System.String symbolSource, System.String symbolApiKey, System.Int32 timeoutSeconds, System.Boolean disableBuffering, System.Boolean noSymbols, System.Boolean noServiceEndpoint, System.Boolean skipDuplicate, NuGet.Common.ILogger logger) [0x002f9] in <1ef564ecb27d4976943eaecd88c2bcc8>:0
at NuGet.CommandLine.PushCommand.ExecuteCommandAsync () [0x0017c] in <1ef564ecb27d4976943eaecd88c2bcc8>:0
at NuGet.CommandLine.Command.Execute () [0x000ea] in <1ef564ecb27d4976943eaecd88c2bcc8>:0
at NuGet.CommandLine.Program.MainCore (System.String workingDirectory, System.String[] args) [0x001bc] in <1ef564ecb27d4976943eaecd88c2bcc8>:0
and I have one connect request like this:
CONNECT 127.0.0.1:7001 HTTP/1.1
Host: 127.0.0.1:7001
hope someone can explain what happened,thanks!
Beta Was this translation helpful? Give feedback.
All reactions