JBoss eap 6.4的JNDI端口配置

时间:2017-02-23 08:38:26

标签: jboss jndi communicationexception

我们正在将应用程序从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但是没有用。

1 个答案:

答案 0 :(得分:0)

  • 检查boot.log以查看jboss.bind.address的值是什么。
  • 应该有一条类似于: DEBUG [ServerInfo] jboss.bind.address:127.0.0.1
  • 在JNDI端口上Telnet到服务器以确认是否有服务侦听:1.telnet HOSTNAME / IP JNDI_PORT 2.默认情况下JNDI将在端口1099上
  • 检查主机上的防火墙规则,确保打开端口10099,以便操作旋风。