title: Winrm4j Authorization loop detected on Conduit on URL with realm "null"
body: <p>I am using below code to connect to a Windows 2008 server.</p>
  
  <pre><code>WinRmTool.Builder builder = WinRmTool.Builder.builder("hostname", "domain\username", "password");
  builder.setAuthenticationScheme(AuthSchemes.NTLM);
  builder.useHttps(false);
  WinRmTool tool =  builder.build();      
  tool.executePs("COMMAND");
  </code></pre>
  
  <p>I am getting below exception</p>
  
  <blockquote>
    <p>Caused by: java.io.IOException: Authorization loop detected on Conduit
    "{<a href="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" rel="nofollow noreferrer">http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd</a>}WinRmPort.http-conduit"
    on URL "<a href="http://hostname:5985/wsman" rel="nofollow noreferrer">http://hostname:5985/wsman</a>" with realm "null"</p>
  </blockquote>
  
  <p>I am able to access the WS "<a href="http://hostname:5985/wsman" rel="nofollow noreferrer">http://hostname:5985/wsman</a>" without any authentication in the browser and the winrm service settings on the Windows server are as below.</p>
  
  <pre><code>   AllowUnencrypted = false
      Auth
          Basic = false
          Kerberos = true
          Negotiate = true
          Certificate = false
          CredSSP = false
          CbtHardeningLevel = Relaxed
      DefaultPorts
          HTTP = 5985
          HTTPS = 5986
  </code></pre>
  
  <p>Settings are same on my client side also. HTTPS access to the winrm WS is not working, so I am using useHttps(false).</p>
  
  <p>Client and Server are on different domains. I am able to successfully rdp to the server using the supplied hostname, domain\username &amp; password.</p>
  
  <p>I tried changing authentication schemes to kerberos/basic/digest. None of them seem to work. I tried 'allowUnencrypted=true' on both sides, but still doesnt work.</p>
  
  <p>Am I missing any conf/prop files ?</p>