0
我在webhphere管理客戶端創建過程中發生連接錯誤。 我看了很多論壇,但無法修復:( 「創建管理客戶端連接的異常:com.ibm.websphere.management.exception.ConnectorException:ADMC0016E:系統無法創建連接到主機的SOAP連接器」111.xxxx .. 「在端口8879」websphere管理客戶端連接錯誤
- 我DMGR端口是8879
- 主機名 「111.xxxx。」 位於ç
- 服務器配置文件:\ TEMP \ soap.client.props,DummyClientTrustFile。 jks,DummyClientKeyFile.jks
我的代碼如下:
`
import java.util.Date; import java.util.Properties; import java.util.Set; import javax.management.InstanceNotFoundException; import javax.management.MalformedObjectNameException; import javax.management.Notification; import javax.management.NotificationListener; import javax.management.ObjectName; import com.ibm.websphere.management.AdminClient; import com.ibm.websphere.management.AdminClientFactory; import com.ibm.websphere.management.exception.ConnectorException;
公共類AdminClientConnection { 私人的AdminClient的AdminClient;
public static void main(String[] args) { AdminClientConnection aClient = new AdminClientConnection(); // Create an AdminClient aClient.createAdminClient(); } private void createAdminClient() { // Set up a Properties object for the JMX connector attributes Properties clientProps = new Properties(); clientProps.setProperty( AdminClient.CONNECTOR_TYPE, AdminClient.CONNECTOR_TYPE_SOAP); clientProps.setProperty(AdminClient.CONNECTOR_HOST, "111.xxxx.."); clientProps.setProperty(AdminClient.CONNECTOR_PORT, "8879"); clientProps.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, "true"); clientProps.setProperty(AdminClient.USERNAME, "usr"); clientProps.setProperty(AdminClient.PASSWORD, "pass"); clientProps.setProperty(AdminClient.CONNECTOR_SOAP_CONFIG, "c:/temp/soap.client.props"); clientProps.setProperty("javax.net.ssl.trustStore", "c:/temp/DummyClientTrustFile.jks"); clientProps.setProperty("javax.net.ssl.keyStore", "c:/temp/DummyClientKeyFile.jks"); clientProps.setProperty("javax.net.ssl.trustStorePassword", "WebAS"); clientProps.setProperty("javax.net.ssl.keyStorePassword", "WebAS"); // Get an AdminClient based on the connector properties try { adminClient = AdminClientFactory.createAdminClient(clientProps); } catch (ConnectorException e) { System.out.println("Exception creating Admin Client Connection: " + e); System.exit(-1); } System.out.println("Connected to Application Server"); } }
`