如何设置Hazelcast管理中心的代理?

时间:2014-08-12 17:31:18

标签: hazelcast

当我将hazelcast节点配置为连接到hazelcast管理中心时,当初始化hazelcast时,我在hazelcast日志文件中看到以下堆栈跟踪:

   2014-08-12 13:19:17,326 [hz.hcMonitorInstanceConfig.MC.State.Sender] DEBUG     - [xt044pdal1.fmr.com]:6301 [testReg-sla-monitor] [3.2.4] Opening collector connection:http://mancenter.xtrac.fmr.com:8080/collector.do
2014-08-12 13:19:22,326 [hz.hcMonitorInstanceConfig.MC.State.Sender] WARN      - [xt044pdal1.fmr.com]:6301 [testReg-sla-monitor] [3.2.4] connect timed out
java.net.SocketTimeoutException: connect timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:579)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
        at sun.net.www.http.HttpClient.New(HttpClient.java:308)
        at sun.net.www.http.HttpClient.New(HttpClient.java:326)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850)
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1091)
        at com.hazelcast.management.ManagementCenterService$StateSendThread.sendState(ManagementCenterService.java:384)
        at com.hazelcast.management.ManagementCenterService$StateSendThread.run(ManagementCenterService.java:365)

这似乎是在端口8080上无法访问mancenter的麻烦,所以我想在两者之间使用http代理。但是,当我在tomcat上配置代理时

-DproxyHost=<proxyhost> -DproxyPort=<port>

我仍然收到错误。

我在没有代理的情况下尝试了一个卷曲,它失败了,但是代理成功了。

如何设置连接到mancenter的代理?

1 个答案:

答案 0 :(得分:0)

这是一个很好的问题。 proxyHost和proxyPort是在使用HttpURLConnection时用于设置代理的属性。所以我也不明白为什么它不起作用。