在不甘心问题没解决下,我这几天没事都就在仔细的看Log日志,Admin的日志,各个Osb Server的日志,JMS Server的日志信息。由于前天晚上在JMS Server的管理端做了Enable Tuning启用隧道的调整,但是对于隧道的启用又详细查看了相关的Oracle官方文档,都是将T3协议转为Http协议,更多的是为了跨越防火墙,同时启用隧道后本身会降低性能。但是实际上在启用隧道后,昨天一天JMS服务调用耗时长的情况没有再出现,即发现的问题居然解决了。
但是当时仍然不确定是否是Enable Tuning启用隧道和这个耗时有关系,因为我们实在是找到不内在的关联性,即使问题解决了我们也需要找到问题内在的根源和关键性,找到证据点。
今天又花了不少的时间来Review日志,但是在JMS Server的另外一个集群节点中发现了如下错误:
OSB-380002 Reason is
Failed to initialize JNDI context, tried 2 time or times totally,
the interval of each time is 0ms. t3://10.24.19.9:9300:
Destination 10.24.19.9, 9300 unreachable.;
nested exception is: java.net.ConnectException:
Connection refused; No available router to destination.;
nested exception is: java.rmi.ConnectException: No available router to destination.
这个信息确实太重要了,因为进一步证明了我们的看法,即对于JMS服务分发耗时注意还是在JNDI查找和initialize context的时候耗时。从日志可以进一步证明这个观点。那么就可以基于如下关键字搜索:
这个简单太重要了,很容易就搜索到StackOverFlow上的一篇文章:
https://stackoverflow.com/questions/24489922/weblogic-12c-destination-unreachable-exception
这篇文章第1个提到的是监听的服务是否没有启动,即:
No available router to destination -- Means you do not have a service running to listen on localhost:9991。Go to admin console, check the servers which should be listening on 9991 is up and running. I am sure it is not running.
再后面一篇文章提到了潜在的一些可能点如下,其中第2点即启用隧道:
1. Not listening - check with netstat
2. No tunneling - check Summary of Servers -> Configure server (admin) -> Protocols tab -> HTTP sub tab-> Enable Tunneling
3. JDeveloper does not trust the SSL certificate - check root CA e.g.
$ cd /oracle/Middleware-12.2.1.2/oracle_common
$ jdk/bin/keytool -import -v -file ca.crt -storepass changeit -keystore jdk/jre/lib/security/cacerts -alias MyCA
其中第2点明确提到需要启用隧道功能。至此问题彻底搞清,但是这个问题为何要启用隧道功能可以进一步和Oracle的顾问确认下。进一步的说明参考如下文章:
Sometimes a Weblogic Server will be unreachable, there could be several reasons, the server is hang, down, and thus not responding to a ping, or it could be related to a network issue.
A possible point of failure in the network layer are firewalls.
You should contact your network team if you have following messages:
java weblogic.Admin -adminurl t3://adminServer.mydomain.com:7777 -username admin -password lockdown PING
Failed to connect to t3://adminServer.mydomain.com:7777: Destination unreachable; nested exception is:java.net.SocketException: Connection reset; No available router to destination
A possible work around for the ping command is to use the HTTP protocol, instead of the t3 protocol.
To enable this you must configure WebLogic to do HTTP tunneling.
To enable, access the administration console, click servers-> server you want to reach-> protocols -> http -> enable Tunneling.no restart is necessary.
And then, following command will work:
java weblogic.Admin -adminurl http://adminServer.mydomain.com:7777 -username igmadmin -password l0ckdown PING