You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

远程使用JMX连接WebLogic时遭遇“Unsupported protocol: http”错误的排查求助

远程使用JMX连接WebLogic时遭遇“Unsupported protocol: http”错误的排查求助

各位好,我现在碰到一个棘手的问题:我想从本地Java应用通过JMX连接到远程机器上运行的WebLogic Admin Server,但一直报错,实在搞不定了,来求助大家!

我的场景是:WebLogic Admin Server部署在一台远程机器上,我在另一台机器上写Java代码尝试连接。下面是我的代码:

import java.util.Map;
import javax.management.MBeanServerConnection;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;

public class WebLogicJMXClient {
    public static void main(String[] args) {
        String hostname = "...."; //dummy data for privacy reasons
        String port = "......";
        String username = "....";
        String password = ".....";

        try {
            // Constructing JMX service URL
            String serviceUrl = "service:jmx:http://" + hostname + ":" + port + "/jndi/weblogic.management.mbeanservers.domainruntime";
            JMXServiceURL jmxServiceURL = new JMXServiceURL(serviceUrl);

            // Connecting to WebLogic
            JMXConnector jmxConnector = JMXConnectorFactory.connect(jmxServiceURL,
                    Map.of("jmx.remote.credentials", new String[]{username, password}));
            MBeanServerConnection connection = jmxConnector.getMBeanServerConnection();
            System.out.println("Connected to WebLogic MBean successfully");

            jmxConnector.close();
        } catch (Exception e) {
            System.err.println("Error connecting to WebLogic");
            e.printStackTrace();
        }
    }
}

运行后我得到的错误是:

javax.management.remote.JMXProviderException: Unsupported protocol: http

我已经添加了所有我认为需要的jar包:

  • weblogic.jar
  • wlthint3client.jar
  • wlclient.jar
  • wljmxclient.jar

我怀疑是不是防火墙的问题?但不确定,想请大家帮忙分析下问题出在哪,怎么排查解决?

备注:内容来源于stack exchange,提问作者Mark John

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.14 10:24:31