2
回答
用AdminClientFactory 创建多个adminclient报错
滴滴云服务器,限时包月0.9元,为开发者而生>>>   
        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

举报
betrue
发帖于5年前 2回/465阅
顶部