2017-02-23 93 views
0

我們正在將應用程序從JBoss AS 4.2遷移到JBoss eap 6.4。在部署應用程序時得到以下例外。JBoss eap 6.4的JNDI端口配置

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插座結合,組,但沒有奏效。

回答

0
  • 檢查boot.log以查看jboss.bind.address的值是什麼。
  • 應該有相似的一行: DEBUG [ServerInfo] jboss.bind.address:127.0.0.1
  • Telnet到JNDI端口,以確認在服務器上有一個服務監聽:1.telnet主機名/ IP JNDI_PORT 2.默認情況下JNDI將位於端口1099上
  • 檢查主機上的防火牆規則並確保端口10099已打開,以便旋轉工作。