用AdminClientFactory 创建多个adminclient报错
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你好,请问有完整的jmxapi 部署应用到was的例子么
顶起来