我用jacorb2.3做了个例子,服务器和客户端以及NS服务在同一台机器上的时候运行的很好,但是我把客户端移出来后死活都找不到服务器,奥不容易把连接路径改对了还连不上。
报错信息如下:
[jacorb.orb.iiop] INFO : Retrying to connect to 192.168.1.101:2223
[jacorb.orb.iiop] INFO : Retrying to connect to 192.168.1.101:2223
[jacorb.orb.iiop] INFO : Retrying to connect to 192.168.1.101:2223
[jacorb.orb.iiop] INFO : Retrying to connect to 192.168.1.101:2223
[jacorb.orb.iiop] INFO : Retrying to connect to 192.168.1.101:2223
org.omg.CORBA.TRANSIENT: Retries exceeded, couldn't reconnect to 192.168.1.101:2
223
at org.jacorb.orb.iiop.ClientIIOPConnection.connect(ClientIIOPConnection
.java:232)
at org.jacorb.orb.giop.GIOPConnection.sendMessage(GIOPConnection.java:93
4)
at org.jacorb.orb.giop.GIOPConnection.sendRequest(GIOPConnection.java:90
0)
at org.jacorb.orb.giop.ClientConnection.sendRequest(ClientConnection.jav
a:323)
at org.jacorb.orb.giop.ClientConnection.sendRequest(ClientConnection.jav
a:304)
at org.jacorb.orb.Delegate.invoke_internal(Delegate.java:1024)
at org.jacorb.orb.Delegate.invoke(Delegate.java:939)
at org.jacorb.orb.Delegate.is_a(Delegate.java:1420)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:49)
at org.omg.CosNaming.NamingContextExtHelper.narrow(NamingContextExtHelpe
r.java:47)
at demo.grid.Server.main(Server.java:36)
------解决方案--------------------
你看看机器的防火墙,2223端口是否打开了!