error with JRMP connection establishment

给你一囗甜甜゛ 提交于 2019-12-04 01:43:35
  1. Insufficient memory.

Not at the client. Possibly at the server, if it causes a failure to allocate a thread for example.

  1. RMI calls getting failed due to increased number of requests to the server causing one of them to wait and causing time outs for this request to process.

No. The error occurs during the connection establishment phase, long before the server-side method implementation gets invoked.

  1. incompatible jre version or anything related to JRE version.

No.

  1. Any networking related issue.

Yes.

  1. Firewall related.

No. That would cause a connect timeout, or in certain obsolete cases a connection refusal, not a read timeout.

I get this error in the case, when a SSH-Client from outside the LAN, holding the SSH-Server, is trying to connect to the server and RMI is involved to let the client execute RMI-methods on the server. The reason is the unreachability (missing route) of the server. Seems that all the stated cases are related to that reason.

I have the same error at client side. Server is reachable and I can open the port via telnet. When I watched into it with Wireshark on client and server side I see the following:

  • TCP connection is established

    • SYN
    • SYN, ACK
    • ACK
  • Client sends: JRMI, Version 2, Stream Protocol

  • Server reply: JRMI, ProtocolAck - But this package never reached client side

In my case it it's the connection from MagicDraw client to license server. For other colleages at other locations it helps to use the proxy: http.proxyHost=xxxx -Dhttp.proxyPort=8080 and the client communicats via HTTP. So maybe this could help you to ommit this issue. https://docs.oracle.com/javase/7/docs/platform/rmi/spec/rmi-arch6.html

I can not be specific as I don't have access to the source code of Magic Draw.

Bhaskar

Set the CATALINA_OPTS as following in startup file in tomcat

CATALINA_OPTS=-Djava.awt.headless=true -Xmx128M -server -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost

Here port number is not the server running port. Give the different port number like 9091,1099, etc. and Host name like localhost or 198.168.128.72

Running the jconsole as

jconsole 198.168.128.72:9091

here port number is not a Server portnumber. It is a JMX port given in the CATALINA_OPTS.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!