0

我们正在将应用程序从 JBoss AS 4.2 迁移到 JBoss eap 6.4。部署应用程序时出现以下异常。

javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:10099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:10099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:10099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
    at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
    at javax.naming.InitialContext.lookup(InitialContext.java:411)

与 localhost:10099 的连接失败。当我签入 AS 4.2 的 jboss-service.xml 文件时,该端口的配置就出现了。

 <mbean code="org.jboss.naming.NamingService"
      name="jboss:service=Naming"
      xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
      <!-- The call by value mode. true if all lookups are unmarshalled using
         the caller's TCL, false if in VM lookups return the value by reference.
      -->
      <attribute name="CallByValue">false</attribute>
      <!-- The listening port for the bootstrap JNP service. Set this to -1
         to run the NamingService without the JNP invoker listening port.
      -->
      <attribute name="Port">10099</attribute>

谁能告诉我我们在哪里可以在 EAP 6 中进行类似的配置。尝试在standalone.xml 中添加 socket-binding-group 但没有奏效。

4

1 回答 1

0
  • 检查 boot.log 以查看 jboss.bind.address 的值是什么。
  • 应该有一行类似:DEBUG [ServerInfo] jboss.bind.address: 127.0.0.1
  • Telnet 到 JNDI 端口上的服务器以确认有服务正在侦听:1.telnet HOSTNAME/IP JNDI_PORT 2. 默认情况下,JNDI 将在端口 1099 上
  • 检查主机上的防火墙规则并确保端口 10099 已打开,以便 twiddle 工作。
于 2017-02-28T12:33:24.930 回答