websphere管理客户端连接错误

问题描述:

我在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"); 
        } 
    
    } 
    

    `

确保CONNECTOR_PORT是真实的,CONNECTOR_SECURITY_ENABLED不neccassary。确保soap.client.props和jks文件从连接器主机收集。