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

System.Net.Tests.HttpListenerResponseCookiesTests/Cookies_GetSet_ReturnsExpected failed on OSX #23520

Closed
mellinoe opened this issue Sep 11, 2017 · 8 comments
Labels
area-System.Net os-mac-os-x macOS aka OSX test-run-core Test failures in .NET Core test runs
Milestone

Comments

@mellinoe
Copy link
Contributor

https://mc.dot.net/#/user/qmfrederik/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/e9bd0a167b8bb087d01f73993641808601c05829/workItem/System.Net.HttpListener.Tests/analysis/xunit/System.Net.Tests.HttpListenerResponseCookiesTests~2FCookies_GetSet_ReturnsExpected

Unhandled Exception of Type System.Net.Internals.SocketExceptionFactory+ExtendedSocketException

System.Net.Internals.SocketExceptionFactory+ExtendedSocketException : Connection refused 127.0.0.1:1191

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 4592
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 824
   at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 929
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 940
   at System.Net.Sockets.Socket.Connect(String host, Int32 port) in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 889
   at System.Net.Tests.HttpListenerFactory.GetConnectedSocket() in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.HttpListener/tests/HttpListenerFactory.cs:line 155
   at System.Net.Tests.HttpListenerResponseTestBase..ctor() in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.HttpListener/tests/HttpListenerResponseTests.cs:line 22
   at System.Net.Tests.HttpListenerResponseCookiesTests..ctor()
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)

@davidsh
Copy link
Contributor

davidsh commented Sep 11, 2017

System.Net.Internals.SocketExceptionFactory+ExtendedSocketException : Connection refused 127.0.0.1:1191

This looks like a networking problem on Mac OS where it is refusing to allow listening on a loopback port.

@mellinoe
Copy link
Contributor Author

Similar error on a different test case on OSX:

https://mc.dot.net/#/user/mellinoe/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/97aec401633ef56a56542597bc0b40460cc24464/workItem/System.Net.HttpListener.Tests/analysis/xunit/System.Net.Tests.HttpListenerRequestTests~2FCookies_GetProperty_ReturnsExpected(cookieString:%20%5C%22cookie:%20name=value,name=value%5C%22,%20expected:%20%5Bname=value%5D)

Unhandled Exception of Type System.Net.Internals.SocketExceptionFactory+ExtendedSocketException
Message :
System.Net.Internals.SocketExceptionFactory+ExtendedSocketException : Connection refused 127.0.0.1:1354
Stack Trace :
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 4592
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 824
   at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 929
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 940
   at System.Net.Sockets.Socket.Connect(String host, Int32 port) in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 889
   at System.Net.Tests.HttpListenerFactory.GetConnectedSocket() in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.HttpListener/tests/HttpListenerFactory.cs:line 155
   at System.Net.Tests.HttpListenerRequestTests..ctor() in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.HttpListener/tests/HttpListenerRequestTests.cs:line 23
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)

@KristinXie1
Copy link

The following test failed with same issue, detail: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20170913.01/workItem/System.Net.HttpListener.Tests/analysis/xunit/System.Net.Tests.HttpListenerResponseHeadersTests~2FStatusDescription_SetNull_ThrowsArgumentNullException

The test System.Net.Tests.HttpListenerResponseHeadersTests/StatusDescription_SetNull_ThrowsArgumentNullException has failed.

System.Net.Internals.SocketExceptionFactory+ExtendedSocketException : Connection refused 127.0.0.1:1200

    Stack Trace:

       at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) in /Users/buildagent/agent/_work/69/s/corefx/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 4589
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) in /Users/buildagent/agent/_work/69/s/corefx/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 825
   at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) in /Users/buildagent/agent/_work/69/s/corefx/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 930
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) in /Users/buildagent/agent/_work/69/s/corefx/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 940
   at System.Net.Sockets.Socket.Connect(String host, Int32 port) in /Users/buildagent/agent/_work/69/s/corefx/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 889
   at System.Net.Tests.HttpListenerFactory.GetConnectedSocket() in /Users/buildagent/agent/_work/69/s/corefx/src/System.Net.HttpListener/tests/HttpListenerFactory.cs:line 156
   at System.Net.Tests.HttpListenerResponseTestBase..ctor() in /Users/buildagent/agent/_work/69/s/corefx/src/System.Net.HttpListener/tests/HttpListenerResponseTests.cs:line 21

Build : Master - 20170913.01 (Core Tests)
Failing configurations:

  • OSX.1012.Amd64-x64
    • Release

@mellinoe
Copy link
Contributor Author

Hit another failure: https://mc.dot.net/#/user/mellinoe/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/c188b2e869c18c912d1b95662af20512b77cbb22/workItem/System.Net.HttpListener.Tests/analysis/xunit/System.Net.Tests.HttpListenerRequestTests~2FIsWebSocketRequest_GetProperty_ReturnsExpected(webSocketString:%20%5C%22Connection:%20Upgrade%5C%5Cr%5C%5CnUpgrade:%20websocket%5C%22,%20expected:%20True)

OSX.1012.Amd64.Open-Debug-x64
Unhandled Exception of Type System.Net.Internals.SocketExceptionFactory+ExtendedSocketException
Message :
System.Net.Internals.SocketExceptionFactory+ExtendedSocketException : Connection refused 127.0.0.1:1441
Stack Trace :
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 4592
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 824
   at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 929
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 940
   at System.Net.Sockets.Socket.Connect(String host, Int32 port) in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 889
   at System.Net.Tests.HttpListenerFactory.GetConnectedSocket() in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.HttpListener/tests/HttpListenerFactory.cs:line 155
   at System.Net.Tests.HttpListenerRequestTests..ctor() in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.HttpListener/tests/HttpListenerRequestTests.cs:line 23
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)

@danmoseley
Copy link
Member

Broke CI again. https://mc.dot.net/#/user/pentp/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/3692488cefc099535d257116308f973d7cc6e263/workItem/System.Net.HttpListener.Tests/analysis/xunit/System.Net.Tests.HttpListenerRequestTests~2FUserHostName_GetProperty_ReturnsExpected

@Priya91 any idea why this specific test is getting so unlucky? Although I also see StatusDescription_SetNull_ThrowsArgumentNullException above. What is flaky about localhost on OSX and what can we do to stop it breaking CI?

@KristinXie1
Copy link

The following test failed with same issue: https://mc.dot.net/#/product/netcore/master/source/official~2Fcorefx~2Fmaster~2F/type/test~2Ffunctional~2Fcli~2F/build/20171030.01/workItem/System.Net.HttpListener.Tests/analysis/xunit/System.Net.Tests.HttpListenerResponseHeadersTests~2FAppendHeader_NullOrEmptyName_ThrowsArgumentNullException(name:%20%5C%22%5C%22)

The test System.Net.Tests.HttpListenerResponseHeadersTests/AppendHeader_NullOrEmptyName_ThrowsArgumentNullException(name: \"\") has failed.

System.Net.Internals.SocketExceptionFactory+ExtendedSocketException : Connection refused 127.0.0.1:1210

    Stack Trace:

       at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) in /Users/buildagent/agent/_work/30/s/corefx/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 4589
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) in /Users/buildagent/agent/_work/30/s/corefx/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 825
   at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) in /Users/buildagent/agent/_work/30/s/corefx/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 930
--- End of stack trace from previous location where exception was thrown ---
   at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) in /Users/buildagent/agent/_work/30/s/corefx/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 940
   at System.Net.Sockets.Socket.Connect(String host, Int32 port) in /Users/buildagent/agent/_work/30/s/corefx/src/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 889
   at System.Net.Tests.HttpListenerFactory.GetConnectedSocket() in /Users/buildagent/agent/_work/30/s/corefx/src/System.Net.HttpListener/tests/HttpListenerFactory.cs:line 156
   at System.Net.Tests.HttpListenerResponseTestBase..ctor() in /Users/buildagent/agent/_work/30/s/corefx/src/System.Net.HttpListener/tests/HttpListenerResponseTests.cs:line 21
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions) in /Users/buildagent/agent/_work/153/s/src/mscorlib/src/System/RtType.cs:line 4840

@karelz
Copy link
Member

karelz commented Dec 24, 2017

Original test Cookies_GetSet_ReturnsExpected didn't fail in official Helix runs history since 2017/5.
General Mac problems with "Connection refused" are tracked by #22287.

Duplicate of #22287

@karelz karelz closed this as completed Dec 24, 2017
@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 2.1.0 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net os-mac-os-x macOS aka OSX test-run-core Test failures in .NET Core test runs
Projects
None yet
Development

No branches or pull requests

6 participants