连接到hazelcast mancenter失败

时间:2018-01-03 12:04:58

标签: java hazelcast

我正在尝试用Java语法连接hazelcast man center但我得到了#34;无法发送响应"

INFO: [192.168.203.1]:5701 [dev] [3.7] Hazelcast will connect to Hazelcast 
Management Center on address: 
http://localhost:8080/mancenter
Jan 03, 2018 5:27:56 PM 
com.hazelcast.internal.partition.impl.PartitionStateManager
INFO: [192.168.203.1]:5701 [dev] [3.7] Initializing cluster partition table 
arrangement...
Jan 03, 2018 5:27:59 PM 
com.hazelcast.internal.management.ManagementCenterService
**WARNING: [192.168.203.1]:5701 [dev] [3.7] Failed to send response, 
responseCode:500 url:http://localhost:8080/mancenter/collector.do**

这就是我连接java程序的方式

public class HazelcastMember {

public static void main(String[] args) throws Exception {
    //System.setProperty("hazelcast.local.localAddress", "127.0.0.1");
    //ConsoleApp.main(args);

    Config cfg = new Config();
    cfg.getManagementCenterConfig().setEnabled(true).setUrl("http://localhost:8080/mancenter");
    HazelcastInstance instance = Hazelcast.newHazelcastInstance(cfg);
}

}

我使用Java 1.8,hazelcast-spark 0.2和spark 2.2.1

运行环境

1 个答案:

答案 0 :(得分:2)

您需要使用相同的次要版本的Hazelcast&管理中心。您共享的日志表示成员版本为3.7,因此您还需要使用ManCenter 3.7.x.