Skip to content

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

Closed

Description

@mellinoe

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)

Activity

  1. davidsh commented on Sep 11, 2017

    @davidsh
    Contributor

    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.

  2. mellinoe commented on Sep 12, 2017

    @mellinoe
    ContributorAuthor

    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)
    
    
  3. KristinXie1 commented on Sep 13, 2017

    @KristinXie1

    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
  4. mellinoe commented on Sep 13, 2017

    @mellinoe
    ContributorAuthor

    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)
    
  5. danmoseley commented on Sep 15, 2017

    @danmoseley
    Contributor

    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?

  6. KristinXie1 commented on Oct 30, 2017

    @KristinXie1

    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
    
  7. karelz commented on Dec 24, 2017

    @karelz
    Member

    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

  8. transferred this issue fromdotnet/corefxon Jan 31, 2020
  9. added this to the 2.1.0 milestone on Jan 31, 2020
  10. ghost locked as resolved and limited conversation to collaborators on Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions