2 xiaosonghn xiaosonghn 于 2016.01.16 15:07 提问

Android TCP通讯使用Mina时Connection refused

01-16 15:02:13.796: W/System.err(14805): org.apache.mina.core.RuntimeIoException: Failed to get the session.
01-16 15:02:13.800: W/System.err(14805): at org.apache.mina.core.future.DefaultConnectFuture.getSession(DefaultConnectFuture.java:58)
01-16 15:02:13.802: W/System.err(14805): at com.renyi365.tm.tcp.TCPClient.Start(TCPClient.java:101)
01-16 15:02:13.804: W/System.err(14805): at com.renyi365.tm.tcp.TCPServer.Start(TCPServer.java:240)
01-16 15:02:13.807: W/System.err(14805): at com.renyi365.tm.tcp.TCPServer.ReConnect(TCPServer.java:285)
01-16 15:02:13.810: W/System.err(14805): at com.renyi365.tm.tcp.TCPServer.OnTimeOut(TCPServer.java:383)
01-16 15:02:13.817: W/System.err(14805): at com.renyi365.tm.tcp.TCPServer.access$2(TCPServer.java:369)
01-16 15:02:13.818: W/System.err(14805): at com.renyi365.tm.tcp.TCPServer$1.run(TCPServer.java:360)
01-16 15:02:13.820: W/System.err(14805): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
01-16 15:02:13.822: W/System.err(14805): at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:279)
01-16 15:02:13.825: W/System.err(14805): at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:152)
01-16 15:02:13.827: W/System.err(14805): at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)
01-16 15:02:13.829: W/System.err(14805): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
01-16 15:02:13.831: W/System.err(14805): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
01-16 15:02:13.833: W/System.err(14805): at java.lang.Thread.run(Thread.java:841)
01-16 15:02:13.836: W/System.err(14805): Caused by: java.net.ConnectException: failed to connect to /120.24.21.23 (port 8900): isConnected failed: ECONNREFUSED (Connection refused)
01-16 15:02:13.839: W/System.err(14805): at libcore.io.IoBridge.isConnected(IoBridge.java:223)
01-16 15:02:13.841: W/System.err(14805): at java.nio.SocketChannelImpl.finishConnect(SocketChannelImpl.java:259)
01-16 15:02:13.843: W/System.err(14805): at org.apache.mina.transport.socket.nio.NioSocketConnector.finishConnect(NioSocketConnector.java:221)
01-16 15:02:13.846: W/System.err(14805): at org.apache.mina.transport.socket.nio.NioSocketConnector.finishConnect(NioSocketConnector.java:46)
01-16 15:02:13.848: W/System.err(14805): at org.apache.mina.core.polling.AbstractPollingIoConnector.processConnections(AbstractPollingIoConnector.java:442)
01-16 15:02:13.850: W/System.err(14805): at org.apache.mina.core.polling.AbstractPollingIoConnector.access$700(AbstractPollingIoConnector.java:64)
01-16 15:02:13.852: W/System.err(14805): at org.apache.mina.core.polling.AbstractPollingIoConnector$Connector.run(AbstractPollingIoConnector.java:510)
01-16 15:02:13.854: W/System.err(14805): at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
01-16 15:02:13.856: W/System.err(14805): ... 3 more
01-16 15:02:13.859: W/System.err(14805): Caused by: libcore.io.ErrnoException: isConnected failed: ECONNREFUSED (Connection refused)
01-16 15:02:13.862: W/System.err(14805): at libcore.io.IoBridge.isConnected(IoBridge.java:208)
01-16 15:02:13.864: W/System.err(14805): ... 10 more

1个回答

oyljerry
oyljerry   Ds   Rxr 2016.01.16 15:27

网络请求被拒绝,是不是防火墙等。或者服务器不允许你访问

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!