【发布时间】:2010-02-20 08:28:21
【问题描述】:
我在 eapps.com 上有一个远程服务器,用作我的“生产”服务器。我在家里有自己的电脑,用作我的“开发”服务器。我正在尝试使用 JNDI over HTTP 进行一些批处理。以下在家里有效,但在 eapps 机器上无效。
我正在连接一些 EJB(无状态会话),并将我的 jndi.properties 设置为:
(这是给 eapps 机器的)
java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory
java.naming.provider.url=http://my.prodhost.com:8080/invoker/JNDIFactory
java.naming.factory.url.pkgs=org.jboss.naming.client:org.jnp.interfaces
# timeout is in milliseconds
jnp.timeout=15000
jnp.sotimeout=15000
jnp.maxRetries=3
(这是给我家的机器)
java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory
java.naming.provider.url=http://localhost:8080/invoker/JNDIFactory
java.naming.factory.url.pkgs=org.jnp.interfaces
java.naming.factory.url.pkgs=org.jboss.naming.client
# timeout is in milliseconds
jnp.timeout=15000
jnp.sotimeout=15000
jnp.maxRetries=3
正如我所说,它可以在家里工作,但是当我远程尝试时,我得到:
Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://my.prodhost.com:4446//?dataType=invocation&enableTcpNoDelay=true&marshaller=org.jboss.invocation.unified.marshall.InvocationMarshaller&socketTimeout=600000&unmarshaller=org.jboss.invocation.unified.marshall.InvocationUnMarshaller]
...
Caused by: java.net.ConnectException: Connection timed out: connect
我在这里做错了什么,还是可能是防火墙问题?据我所知,4446 端口没有被阻塞。
【问题讨论】:
-
区别不是意图。我会让它们一样,然后再试一次。只有 eapps 机器是 Unix。当我尝试“netstat -a | grep 4446”时,它什么也没返回。 eapps 文档建议我尝试“iptables -A INPUT -j ACCEPT -p tcp --dport [端口号]”,但这似乎不起作用。我不是 Unix 人。我知道使用它的最低限度。
-
即使第一个问题已经得到解答,我仍将补充我发现的后续问题,并希望得到他们的解决方案。应用 HTTP UnifiedInvoker 修复后,我发现我的远程 SLSB 无法加载。我在 JBoss 日志文件中发现了这个错误:[org.jboss.system.ServiceController] Problem created service jboss.remoting:service=Connector,transport=socket java.lang.NoClassDefFoundError: org/apache/coyote/Adapter