RMI远程连接问题(公网)
服务器是双网卡,ip分别是:192.168.0.200(对外网) 10.33.20.49(对内网) ,然后对外公网静态ip是61.29.147.250,这个ip是设置在路由器上面的.现在公司内网几台电脑都连在集线器上面对应的是服务器的192.168.0.200(对外网)这张网卡,我们这几台电脑都不能上网.用RMI连接服务器在Naming.lookup("//61.29.147.250:8846/xgisClient2")就出现以下错误了,请高手指教.
java.rmi.ConnectException: Connection refused to host: 61.29.147.250; nested exception is:
java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
at XPub.tools.operations.usermanage.RegistryUserOp.run(RegistryUserOp.java:81)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
... 8 more