外网tomcat5.0服务链接不到映射外网IP的内网JBOSS应用服务器
问题描述:
网站的服务:web 服务(tomcat5.0)+应用服务器(映射外网
ip:212.191.224.119,内网ip:192.168.12.22,同时端口也是做了映射。)(jboss
3.2.7) 服务组成,分别发布在两台机器上。web 服务器是外网的ip ,应用服务器是内网的
ip , 通过在交换机上面映射一个内网的ip ,同时做了端口映射。此时网络是通的,同时用
telnet ip 端口也没问题,但是程序调用却报错,信息如下:
javax.naming.CommunicationException [Root exception is
java.rmi.ConnectException
: Connection refused to host: 212.191.224.119; nested exception is:
java.net.ConnectException: Connection timed out: connect]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:620)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:463)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at tlc.manufacturer.MfInfoView. <init >(MfInfoView.java:21)
at org.apache.jsp.dir.index_jsp._jspService(index_jsp.java:60)
at org.apache.jasper.runtime.HttpJspBase.service
(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper