【问题标题】:Winrm4j Authorization loop detected on Conduit on URL with realm "null"在具有领域“null”的 URL 上的管道上检测到 Winrm4j 授权循环
【发布时间】:2017-09-19 11:29:31
【问题描述】:

我正在使用以下代码连接到 Windows 2008 服务器。

WinRmTool.Builder builder = WinRmTool.Builder.builder("hostname", "domain\username", "password");
builder.setAuthenticationScheme(AuthSchemes.NTLM);
builder.useHttps(false);
WinRmTool tool =  builder.build();      
tool.executePs("COMMAND");

我遇到了异常

原因:java.io.IOException:在 Conduit 上检测到授权循环 "{http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd}WinRmPort.http-conduit" 在 URL“http://hostname:5985/wsman”上,领域为“null”

我无需在浏览器中进行任何身份验证即可访问WS“http://hostname:5985/wsman”,Windows服务器上的winrm服务设置如下。

   AllowUnencrypted = false
    Auth
        Basic = false
        Kerberos = true
        Negotiate = true
        Certificate = false
        CredSSP = false
        CbtHardeningLevel = Relaxed
    DefaultPorts
        HTTP = 5985
        HTTPS = 5986

我的客户端的设置也相同。对 winrm WS 的 HTTPS 访问不起作用,所以我使用的是 useHttps(false)。

客户端和服务器位于不同的域中。我能够使用提供的主机名、域\用户名和密码成功地 rdp 到服务器。

我尝试将身份验证方案更改为 kerberos/basic/digest。它们似乎都不起作用。我在两边都试过'allowUnencrypted=true',但还是不行。

我是否缺少任何 conf/prop 文件?

【问题讨论】:

    标签: java windows winrm


    【解决方案1】:

    在远程服务器上配置以下设置后,相同的代码工作

    winrm set winrm/config/service/Auth '@{Basic="true"}'
    winrm set winrm/config/service '@{AllowUnencrypted="true"}'
    

    【讨论】:

    • 也许我们可以详细了解它为何能解决问题。抱歉,我对此有疑问,但就我而言,这是微软
    猜你喜欢
    • 1970-01-01
    • 2017-12-31
    • 1970-01-01
    • 2020-12-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-08-14
    • 1970-01-01
    相关资源
    最近更新 更多