Error during covering: "Can't connect to the host. No such host is known."

Hello,

I have a general problem with running dotCover on my machine. The easiest scenario I tried is:

New solution, new class library project, just one function which multiplies 2 integers. I create a test project with just 1 test method and try to "Cover with dotCover" (just like it's done in the video: http://www.jetbrains.com/dotcover/). As a result I get "Coverage analysis not started yet" message on the UnitTestSessions window and ... that's all. I've checked the log to find the following entries:


4:42:38 PM.393: Thread:1: Diff = 2206.1262
4:42:38 PM.393: Thread:1: Diff = 2206.1262
4:46:40 PM.936: Thread:1: [FST] Process pending watchers. Total = 7
4:46:40 PM.936: Thread:1: [FST] Process pending watchers finished Processed = 0
4:46:46 PM.928: Thread:1: [FST] Process pending watchers. Total = 7
4:46:46 PM.929: Thread:1: [FST] Process pending watchers finished Processed = 0
4:47:45 PM.494: Thread:1: [FST] Process pending watchers. Total = 7
4:47:45 PM.494: Thread:1: [FST] Process pending watchers finished Processed = 0
4:50:16 PM.826: Thread:1: [FST] Process pending watchers. Total = 7
4:50:16 PM.826: Thread:1: [FST] Process pending watchers finished Processed = 0
4:51:16 PM.288: Thread:1: [FST] Process pending watchers. Total = 7
4:51:16 PM.288: Thread:1: [FST] Process pending watchers finished Processed = 0
4:51:18 PM.380: Thread:12: Launching coverage. Configuration xml: <Configuration><HostParameters type="LocalHostParameters"><AddressFamily>InterNetwork</AddressFamily></HostParameters><Argument type="StandaloneArgument"><Arguments>ipc://9c42de82-a5fa-4ff6-92a2-2b832db0eaac/136b9796-3224-4992-9f64-1253c623b491;9c42de82-a5fa-4ff6-92a2-2b832db0eaac 04a8e997-cc3f-46eb-beb5-154ebd6c2230</Arguments><CreateNoWindow>True</CreateNoWindow><FileName>C:\Program Files (x86)\JetBrains\ReSharper\v5.1\Bin\JetBrains.ReSharper.TaskRunner.exe</FileName><ProfileChildProcesses>True</ProfileChildProcesses><WorkingDirectory>C:\Program Files (x86)\JetBrains\ReSharper\v5.1\Bin</WorkingDirectory></Argument><Info type="CoverageInfo"><InjectInfo><SearchPath IsNull="False"></SearchPath><AllowFilters><Item><ClassFilter>*</ClassFilter><FunctionFilter>*</FunctionFilter><ModuleFilter>*</ModuleFilter></Item></AllowFilters><DenyFilters /></InjectInfo></Info><CoreOptions><ControlKind>Api</ControlKind><CoreLogMask>Api</CoreLogMask><CoreTempPath IsNull="False"></CoreTempPath></CoreOptions><HostOptions><HostTempPath IsNull="False"></HostTempPath></HostOptions></Configuration>
4:51:18 PM.381: Thread:12: [PrevetConnecting] List of executables to prevent connecting in global mode:
4:51:18 PM.383: Thread:12: Coverage finished. Index file(s): ; Log file(s):
4:51:18 PM.384: Thread:12: EXCEPTION: Can't connect to the host.
No such host is known.
JetBrains.Profiler.Launcher.LauncherException: Can't connect to the host.
No such host is known. ---> System.Net.Sockets.SocketException: No such host is known
   at System.Net.Dns.GetAddrInfo(String name)
   at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
   at System.Net.Dns.GetHostAddresses(String hostNameOrAddress)
   at JetBrains.Profiler.Host.Socket.RemoteUtil.GetBridgeInfo(Nullable`1 addressFamily, String host, IRemoteAgent agent)
   at JetBrains.Profiler.Host.Socket.Local.Impl.LocalHost..ctor(LocalHostParameters hostParameters)
   at JetBrains.Profiler.Host.Socket.Local.Impl.LocalHostParametersFactory.CreateHost(IHostParameters hostParameters)
   at JetBrains.Profiler.Host.HostUtil.CreateHost(IHostParameters hostParameters)
   at JetBrains.Profiler.Launcher.LauncherController.Start(IProgressIndicator progress)
   --- End of inner exception stack trace ---
   at JetBrains.Profiler.Launcher.LauncherController.Start(IProgressIndicator progress)
   at JetBrains.Profiler.Launcher.Impl.Launcher.Launch(IProgressIndicator progress, Configuration configuration, ILauncherUI ui)
   at JetBrains.dotCover.LaunchingServices.Impl.LauncherFacade.Launch(Configuration configuration, LauncherConflictResolutionPolicy conflictResolutionPolicy, Boolean showControllerUI, Action`1 onCoverageSessionFinished)
   at JetBrains.dotCover.LaunchingServices.Impl.LauncherFacade.LaunchAndWait(Configuration configuration, Int32 timeout, LauncherConflictResolutionPolicy conflictResolutionPolicy)
   at JetBrains.dotCover.LaunchingServices.Impl.LauncherFacade.LaunchAndWait(Configuration configuration, LauncherConflictResolutionPolicy conflictResolutionPolicy)
   at JetBrains.dotCover.RsIntegration.DotCoverFacade.LaunchAndWait(String executable, String[] arguments, String workingDirectory)
4:53:12 PM.353: Thread:1: [FST] Process pending watchers. Total = 7
4:53:12 PM.353: Thread:1: [FST] Process pending watchers finished Processed = 0
4:53:13 PM.432: Thread:1: Diff = 1015.0581
4:53:13 PM.433: Thread:1: Diff = 1016.0581

My setup:
Windows 7 Enterprise Edition (64-bit)
VS2008 SP1 Professional 9.0.30729.4462 & VS2010 Ultimate 10.0.30319.1 (issue present on both VS versions)
dotTrace Performance 4.0.649.46
dotCover 1.0.97.18
ReSharper 5.1.1753.4

I've tried running VS as Administrator, no change. There is nothing interesting in the event log as well.
One more information which can be crucial - this computer is behind the company firewall (no direct access to internet).
Surprisingly, smartest creature in the world, Google, doesn't have any clue about my case, so that's why I'm bothering you :) Any help would be very appreciated.

3 comments

I had a similar problem when I had clicked the wrong buttons by mistake in my ESET firewall and disallowed dotCover to communicate with any other program anywhere -- the internet, my workgroup or my computer.  Picture it -- dotCover was shouting its poor head off but no one else could hear...   ;-)   Removing dotCover from the firewall's "solitary confinement" made everything work again.

HTH.

0

Hello Sebastian,
Are there any mappings defined in your C:\Windows\System32\drivers\etc\hosts file?
Also please check your firewall settings as Mark suggested.

Finally please make a simple program with the following code:

IPHostEntry localHostEntry = Dns.GetHostEntry("localhost");
IPAddress[] localAddresses = Dns.GetHostAddresses(localHostEntry.HostName);


And check that it works on your machine.

0

Mark:

That actually was what I've tried first - I browsed through firewall rules and even added some allowance rules for dotCover and TaskRunner (for both inbound and outbound communication). Sadly, it brought no improvement.

Ruslan:

Bullseye! My hosts file was empty (just some comments), but as I'm running a computer registered to different domain than the one it's working in, there were issues with response from DNS server. I've added suitable entries to hosts file and my problem disappeared immediately.

Please accept my humble thanks for accurate and fast reponse :)

0

Please sign in to leave a comment.