开发者社区> 问答> 正文

用AdminClientFactory 创建多个adminclient报错?报错

        Properties props = new Properties();
        props.put("host", "host1");
        props.put("port", "8886");
        props.put("type", AdminClient.CONNECTOR_TYPE_SOAP);
        props.put(AdminClient.USERNAME, "wasadmin");
        props.put("user", "wasadmin");
        props.put("password", "wasadmin");
        props.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, "true");
        props.setProperty("javax.net.ssl.trustStore","./file/DummyClientTrustFile_host1.jks");
        props.setProperty("javax.net.ssl.trustStorePassword", "WebAS");
        props.setProperty("javax.net.ssl.keyStore","./file/DummyClientKeyFile_host1.jks");

       props.setProperty("javax.net.ssl.keyStorePassword", "WebAS");

      Adminclient ac = AdminClientFactory.createAdminClient(props);

        Properties pp = new Properties();
        pp.put("host", "host2");
        pp.put("port", "8879");
        pp.put("type", AdminClient.CONNECTOR_TYPE_SOAP);
        pp.put(AdminClient.USERNAME, "wasadmin");
        pp.put("user", "wasadmin");
        pp.put("password", "wasadmin");
        pp.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, "true");
        pp.setProperty("javax.net.ssl.trustStore","./file/DummyClientTrustFile_host2.jks");
        pp.setProperty("javax.net.ssl.trustStorePassword", "WebAS");
        pp.setProperty("javax.net.ssl.keyStore","./file/DummyClientKeyFile_host2.jks");

       pp.setProperty("javax.net.ssl.keyStorePassword", "WebAS");

      Adminclient acl = AdminClientFactory.createAdminClient(pp);

第一个adminclient(ac)可以正常创建,但创建第二个(acl)时报错:

WARNING: ADMC0046W

Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: signature check failed; targetException=java.lang.IllegalArgumentException: Error opening socket: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: signature check failed

展开
收起
爱吃鱼的程序员 2020-06-22 21:38:48 448 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    顶起来

    你好,请问有完整的jmxapi部署应用到was的例子么

    2020-06-22 21:39:07
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载