請問一個jndi連線的小問題

sakas發表於2007-01-05
開始初始化的時候
Properties p = new Properties();
p.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
p.setProperty("java.naming.provider.url", "localhost:1099");
這樣執行正常

如果將localhost改為我的ip也就是
Properties p = new Properties();
p.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
p.setProperty("java.naming.provider.url", "172.16.21.198:1099");

結果就報錯 時間超時
Failed to get SequenceGeneratorHome: caught javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
請問是什麼原因

相關文章