rmi 问题 Connection refused to host,急!

问题描述

大侠们,我遇到一个rmi客户端异常问题,帮忙看一下:ComputeEngine_Stub[UnicastRef[liveRef:[endpoint:[127.0.0.1:1987](remote),objID:[f7f6b2a:120f0ddc142:-8000,0]]]]java.rmi.ConnectException:Connectionrefusedtohost:127.0.0.1;nestedexceptionis:java.net.ConnectException:Connectionrefused:connectatsun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:574)atsun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)atsun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)atsun.rmi.server.UnicastRef.invoke(UnicastRef.java:94)atcom.ls.rmiservice.sample.ComputeEngine_Stub.executeTask(UnknownSource)atcom.ls.client.sample.ComputePi.main(ComputePi.java:28)Causedby:java.net.ConnectException:Connectionrefused:connectatjava.net.PlainSocketImpl.socketConnect(NativeMethod)atjava.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)atjava.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)atjava.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)atjava.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)atjava.net.Socket.connect(Socket.java:519)atjava.net.Socket.connect(Socket.java:469)atjava.net.Socket.<init>(Socket.java:366)atjava.net.Socket.<init>(Socket.java:179)atsun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)atsun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)atsun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:569)...5more服务器端已经启动了,并且绑定了服务。客户端程序请求服务时,registry.lookup("....");执行没有问题,并且拿回了对象,打印如:ComputeEngine_Stub[UnicastRef[liveRef:[endpoint:[127.0.0.1:1987](remote),objID:[f7f6b2a:120f0ddc142:-8000,0]]]]之后,调用返回对象的方法,就抛了上述异常。请问怎么解决呀?谢谢。

解决方案

解决方案二:
Done!

时间: 2024-10-21 12:31:37

rmi 问题 Connection refused to host,急!的相关文章

RMI异常,java.rmi.ConnectException: Connection refused to host

问题描述 String name = "Compute"; HelloWorldCompute engine = new HelloWorldEngine(); HelloWorldCompute stub = (HelloWorldCompute) UnicastRemoteObject.exportObject(engine, 8888); Registry registry = LocateRegistry.getRegistry(); registry.rebind(name,

“Connection refused” vs “No route to host”

曾经在http://blog.csdn.net/bisal/article/details/42496583这篇博文中提到一个端口连接的验证: "ora10g@localhost.localdomain$telnet 172.101.19.57 1521Trying 172.101.19.57...telnet: connect to address 172.101.19.57: No route to host如果端口未开,实际报错:ora10g@localhost.localdomain$t

java网络编程错误java.net.ConnectException: Connection refused: connect求教

问题描述 java网络编程错误java.net.ConnectException: Connection refused: connect求教 刚开始学习java网络编程,在书上看到一段代码,就动手试一下,结果出现下面错误: java.net.ConnectException: Connection refused: connect 源代码如下: import java.io.*; import java.net.*; class lx01 { public static void main(S

nginx-ngnix+fastcgi+python服务器每隔20几分钟就报connection refused

问题描述 ngnix+fastcgi+python服务器每隔20几分钟就报connection refused 正在搭建一个fake server,要求每秒钟支持7000个并发.server采用nginx/fastcgi/flup搭建,用spawn-fastcgi来管理fastcgi进程,后台的应用程序很简单,就是返回固定的一串字符串,用python写的.用jmeter打流量测试,发现开始20几分钟server运行很好,后面就会有断断续续的error产生,刚开始以为是应用程序反映不过来,后来就将

solrcloud报错connection refused ,求大神指导我!!

问题描述 solrcloud报错connection refused ,求大神指导我!! 这是什么原因呢,急求,我qq:461726521

JDBC连接SQL Server出现的connection refused问题的解决办法

使用JDBC在默认端口1433上连接SQL Server获得connection refused异常,大致异常信息为:The TCP/IP connection to the host  has failed. java.net.ConnectException: Connection refused. 1.使用telnet 127.0.0.1 1433测试,得到如下信息:正在连接到127.0.0.1...不能打开到主机的连接, 在端口 1433: 连接失败表示1433端口没有打开 2.检查SQ

Call to master/192.168.137.101:9001 failed on connection exception: java.net.ConnectException: Connection refused

java.net.ConnectException: Call to master/192.168.137.101:9001 failed on connection exception: java.net.ConnectException: Connection refused  at org.apache.hadoop.ipc.Client.wrapException(Client.java:1099)  at org.apache.hadoop.ipc.Client.call(Client

Socket的Connection refused异常解决办法

今天练习Socket编程,在new Socket时无意间遇到下述异常,倒腾了好一通,原来是没有开启对应的 服务器,记下来,以备参考,顺便为广大网友提个醒,别走了弯路-- Log代码 java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown S

ssh 修改端口后 connection refused

问题描述 ssh 修改端口后 connection refused 我在本机下新增了ssh的端口2306,保留了22,重启服务后,用另一台机器ssh过来,22的可以登录,2306的报 connection refused的错误,我两边的防火墙都用了iptables -F关闭了的,问下各位可能是什么原因导致的啊 解决方案 http://www.2cto.com/os/201107/97209.html