【问题标题】:Connection Error in Ignite web agentIgnite Web 代理中的连接错误
【发布时间】:2016-09-28 11:10:58
【问题描述】:

为了分析 Apache ignite 中的节点,我正在使用 [1] 的监控工具:https://console.gridgain.com/。我尝试运行 ignite-web-agent.sh 以在上面的链接中与 Web 服务器建立连接,但我收到以下错误消息。我也尝试用机器的IP地址替换localhost,但它仍然无法正常工作。在运行 ignite node 时,我是否必须启动 ignite REST 服务器进行连接?如果是,那么如何通过 java 代码启用此 REST 服务器模式?

     ignite-web-agent-1.7.2]$ . ignite-web-agent.sh
 Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
 [12:58:13,881][INFO ][main][AgentLauncher] Starting Apache Ignite Web Console Agent...

 Agent configuration:
 User's security tokens        : ****************Fq3q
 URI to Ignite node REST server: http://localhost:8080
 URI to Ignite Console server  : https://console.gridgain.com:3002
 Path to agent property file   : default.properties
 Path to JDBC drivers folder   : /home/rishikesh/ignite-web-agent-1.7.2/jdbc-drivers

 [12:58:14,318][INFO ][EventThread][AgentLauncher] Connecting to: https://console.gridgain.com:3002
 [12:58:34,314][ERROR][EventThread][AgentLauncher] Connection error.
 io.socket.client.SocketIOException: timeout
     at io.socket.client.Manager$1$4$1.run(Manager.java:312)
     at io.socket.thread.EventThread$2.run(EventThread.java:75)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
     at java.lang.Thread.run(Thread.java:745)
[12:58:37,304][INFO ][EventThread][AgentLauncher] Connecting to: https://console.gridgain.com:3002
[12:58:53,744][ERROR][EventThread][AgentLauncher] Connection error.
io.socket.engineio.client.EngineIOException: xhr poll error
     at io.socket.engineio.client.Transport.onError(Transport.java:64)
     at io.socket.engineio.client.transports.PollingXHR.access$100(PollingXHR.java:18)
     at io.socket.engineio.client.transports.PollingXHR$6$1.run(PollingXHR.java:126)
     at io.socket.thread.EventThread$2.run(EventThread.java:75)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
     at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.UnknownHostException: console.gridgain.com
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
     at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1890)
     at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1885)
     at java.security.AccessController.doPrivileged(Native Method)
     at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1884)
     at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1457)
     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
     at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
     at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
     at io.socket.engineio.client.transports.PollingXHR$Request$1.run(PollingXHR.java:214)
    ... 1 more

【问题讨论】:

    标签: gridgain ignite


    【解决方案1】:

    Web 代理无法解析 console.gridgain.com 尝试更改 /home/rishikesh/ignite-web-agent-1.7.2/default.properties 中的 'URI to Ignite Console server' 请替换:

    server-uri=https://console.gridgain.com:3002
    

    到:

    server-uri=https://104.197.2.239:3002
    

    要启用 REST 模块,请在二进制分发中将 ignite-rest-http 文件夹从 lib/optional/ 移动到 lib/ 或将以下依赖项添加到您的 maven 项目:

    <dependency>
        <groupId>org.apache.ignite</groupId>
        <artifactId>ignite-rest-http/artifactId>
        <version>${ignite.version}</version>
    </dependency>
    

    【讨论】:

    • 我尝试用上面提到的 IP 地址替换 server-uri,但仍然存在连接错误。我还将 ignite-rest-http 从 lib/optional 移动到 lib/ 文件夹,并将外部 jar 文件从 ignite-rest-http 添加到我的 Java 项目中以进行依赖。可能有什么问题?
    • 你能测试一下你没有在防火墙或代理后面吗? ping 104.197.2.239 显示了什么?
    • 我导出了 http 和 https 的代理设置,但仍然存在连接错误。可能有什么问题?
    • 如果你通过代理连接,你应该为java应用程序启用它。请使用以下选项运行代理以使用系统代理:JVM_OPTS="-Djava.net.useSystemProxies=true" ./ignite-web-agent.sh 请使用以下选项运行代理以使用自定义代理:JVM_OPTS="-Dhttps.proxyHost=&lt;proxy-ip&gt; -Dhttps.proxyPort=&lt;proxy-port&gt;" ./ignite-web-agent.sh
    猜你喜欢
    • 2015-08-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-01
    • 2013-04-17
    • 2020-07-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多