WinRM Connection Issue

365 views Asked by At

I can't quite explain the problem, because I myself do not understand it. I'd appreciate getting help with defining/locating/dealing with the issue.

The Setup

I have a Win10 VM having tests run on it, and a Jenkins VM (Windows Server 2008) running those tests on it. I am using a testing app called JSystem. Sadly, it does not support Windows 10 officially, as it uses Telnet to communicate with target SUTs (which was removed from Windows 10), so I had to create a way to use WinRM to communicate with that type of VM.

The Problem

The gist of it, is that at some point in time, the test on Jenkins just 'freezes'. The connection is still on 'established' state, the VM (host and client) are still working. It does not happen every time, and it might happen a few minutes after the testing started, or a couple of hours. The test that causes is is almost never the same, but naturally it happens when there's some form of communication between the SUT and the testing VM. It can be file transfer, or a simple command like "dir". It can happen during the request for the command to happen, or when sending the result back.

More Information

I did gather some more information that might help.

  1. I did not see it happen when I try to run the test from my own development environment (that is, not using Jenkins as a medium) - However, it might've been because I was unlucky and did not try enough. My own environment is a Windows 10 as well, and not a VM.
  2. Looking at the event viewer on the SUT, there was a warning "Time-Service" event ID 50, an NTPClient time sync issue one minute after the freeze happened. However, the Jenkins VM had no events at all. That said, the event repeats itself a lot on the SUT and it does not always freeze the test, but it's possible it causes interference if it happens during a communication attempt between the VMs.
  3. I can still connect to the SUT with WinRM just fine with other sources, and it responds as well.
  4. Rather than frozen, it's more like SUT is waiting for a request from Jenkins, and Jenkins is waiting for a response from the SUT. The weird thing, however, is that normally these tests have a timeout of 30-60 seconds, it should not wait longer than that (unless configured otherwise in the test, of course) before failing the test step.
  5. I can't be sure if this has anything to do with it, but I do have time sync issues between VMs. I've asked in another question about how to solve it, so if that's the issue in your opinion, please let me know, especially if you have a solution.

What is a good way to approach this?

0

There are 0 answers