Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Improve logging for failed TCP connections due to hostname - #51

Merged
spouliot merged 2 commits into
xamarin:masterfrom
VincentDondain:master-improve-logging
Aug 14, 2019
Merged

Improve logging for failed TCP connections due to hostname#51
spouliot merged 2 commits into
xamarin:masterfrom
VincentDondain:master-improve-logging

Conversation

@VincentDondain

Copy link
Copy Markdown
Contributor

The new improved logging adds this bit of info to the run logs:

2019-08-14 15:21:04.592 dont link[7054:2130112] TCP connection failed when selecting 'hostname': System.Net.Sockets.SocketException (0x80004005): No route to host
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:21:04.592 dont link[7054:2130113] TCP connection failed when selecting 'hostname': System.Net.Sockets.SocketException (0x80004005): No route to host
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:21:04.592 dont link[7054:2130107] TCP connection failed when selecting 'hostname': System.Net.Sockets.SocketException (0x80004005): No route to host
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:21:04.593 dont link[7054:2130108] TCP connection failed when selecting 'hostname': System.Net.Sockets.SocketException (0x80004005): No route to host
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:21:04.593 dont link[7054:2130111] TCP connection failed when selecting 'hostname': System.Net.Sockets.SocketException (0x80004005): No route to host
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:21:04.593 dont link[7054:2130110] TCP connection failed when selecting 'hostname': System.Net.Sockets.SocketException (0x80004005): No route to host
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:21:04.594 dont link[7054:2130112] TCP connection failed when selecting 'hostname': System.Net.Sockets.SocketException (0x80004005): No route to host
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:21:04.594 dont link[7054:2130113] TCP connection failed when selecting 'hostname': System.Net.Sockets.SocketException (0x80004005): No route to host
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:22:21.673 dont link[7054:2130108] TCP connection failed when selecting 'hostname': System.Net.Sockets.SocketException (0x80004005): Connection timed out
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:22:21.675 dont link[7054:2130107] TCP connection failed when selecting 'hostname': System.Net.Sockets.SocketException (0x80004005): Connection timed out
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:22:21.677 dont link[7054:2130067] Couldn't establish a TCP connection with any of the hostnames: 10.160.159.16,10.92.168.38,fe80::1008:1dd8:9b64:e234,2001:4898:4030:14:1860:80bb:15bd:38cb,2001:4898:4030:14:2c39:9ce2:34b4:f349,fe80::aede:48ff:fe00:1122,fe80::8a7:4a1a:21d8:76e4,2001:4898:4070:101b:2d:a7ad:28dc:1c49,2001:4898:4070:101b:d0f5:653b:2a8c:95cc,fe80::fc1d:e4ff:fe84:a0f1

It's especially useful to debug issues, notably: https://github.com/xamarin/maccore/issues/1741

Comment thread NUnitLite/TouchRunner/TouchRunner.cs Outdated
} catch (Exception) {
} catch (Exception e) {
lock (lock_obj) {
Console.WriteLine ("TCP connection failed when selecting 'hostname': {0}", e);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe log name + port too?

@spouliot spouliot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed with @akoeplinger the port can be useful too

@VincentDondain

Copy link
Copy Markdown
Contributor Author

Fair comments, new logging looks like this:

2019-08-14 15:48:53.593 dont link[313:6475] TCP connection failed when selecting 'hostname': 2001:4898:4070:101b:2d:a7ad:28dc:1c49 and 'port': 63621. System.Net.Sockets.SocketException (0x80004005): No route to host
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:48:53.593 dont link[313:6464] TCP connection failed when selecting 'hostname': 2001:4898:4070:101b:d0f5:653b:2a8c:95cc and 'port': 63621. System.Net.Sockets.SocketException (0x80004005): No route to host
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:48:53.594 dont link[313:6476] TCP connection failed when selecting 'hostname': fe80::8a7:4a1a:21d8:76e4 and 'port': 63621. System.Net.Sockets.SocketException (0x80004005): No route to host
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:48:53.594 dont link[313:6465] TCP connection failed when selecting 'hostname': fe80::9c42:a6ff:fe3f:130 and 'port': 63621. System.Net.Sockets.SocketException (0x80004005): No route to host
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:48:53.594 dont link[313:6477] TCP connection failed when selecting 'hostname': fe80::aede:48ff:fe00:1122 and 'port': 63621. System.Net.Sockets.SocketException (0x80004005): No route to host
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:48:53.595 dont link[313:6478] TCP connection failed when selecting 'hostname': 2001:4898:4030:14:2c39:9ce2:34b4:f349 and 'port': 63621. System.Net.Sockets.SocketException (0x80004005): No route to host
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:48:53.595 dont link[313:6475] TCP connection failed when selecting 'hostname': 2001:4898:4030:14:1860:80bb:15bd:38cb and 'port': 63621. System.Net.Sockets.SocketException (0x80004005): No route to host
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:48:53.596 dont link[313:6464] TCP connection failed when selecting 'hostname': fe80::1008:1dd8:9b64:e234 and 'port': 63621. System.Net.Sockets.SocketException (0x80004005): No route to host
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:50:12.436 dont link[313:6465] TCP connection failed when selecting 'hostname': 10.160.159.16 and 'port': 63621. System.Net.Sockets.SocketException (0x80004005): Connection timed out
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:50:12.438 dont link[313:6476] TCP connection failed when selecting 'hostname': 10.92.168.38 and 'port': 63621. System.Net.Sockets.SocketException (0x80004005): Connection timed out
  at System.Net.Sockets.TcpClient..ctor (System.String hostname, System.Int32 port) [0x0006d] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/mono/mcs/class/referencesource/System/net/System/Net/Sockets/TCPClient.cs:122 
  at MonoTouch.NUnit.UI.BaseTouchRunner+<>c__DisplayClass55_2.<SelectHostName>b__0 (System.Object v) [0x00000] in /Users/vidondai/Documents/xi-xcode11/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:204 
2019-08-14 15:50:12.439 dont link[313:6353] Couldn't establish a TCP connection with any of the hostnames: 10.160.159.16,10.92.168.38,fe80::1008:1dd8:9b64:e234,2001:4898:4030:14:1860:80bb:15bd:38cb,2001:4898:4030:14:2c39:9ce2:34b4:f349,fe80::aede:48ff:fe00:1122,fe80::8a7:4a1a:21d8:76e4,2001:4898:4070:101b:2d:a7ad:28dc:1c49,2001:4898:4070:101b:d0f5:653b:2a8c:95cc,fe80::9c42:a6ff:fe3f:130

@spouliot
spouliot merged commit a2e1810 into xamarin:master Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants