java写的通讯短链接客户端,老是会报端口被占用的错误,跪求高手帮忙分析下是什么问题? 10
[15-7-1114:28:55:937CST]000e66ddSystemOutO2015-07-1114:28:55,937ERROR[threadPoolTaskE...
[15-7-11 14:28:55:937 CST] 000e66dd SystemOut O 2015-07-11 14:28:55,937 ERROR [threadPoolTaskExecutor-39] - 200.0.0.207:8174 连接失败!
java.net.BindException: Address already in use: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:539)
at com.nantian.jpre.app.base.NIOClientAddTranCode.send(NIOClientAddTranCode.java:101)
at com.nantian.jpre.app.business.card.C2045Transaction.doTransaction(C2045Transaction.java:38)
at com.nantian.jpre.app.business.AbstractTransaction.service(AbstractTransaction.java:102)
at com.jpre.BusinessDealExecutorService.service(BusinessDealExecutorService.java:128)
at com.jpre.NIOAsynShortSocketServer$NIOSynShortSocketProcessor.run(NIOAsynShortSocketServer.java:516)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:678)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:703)
at java.lang.Thread.run(Thread.java:811)
这个是客户端问题还是服务器端的问题
这个错误是偶尔就会出现的,还是有很多成功的,并不是一直失败,40多次才会失败1次
用的是同步短链接 展开
java.net.BindException: Address already in use: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:539)
at com.nantian.jpre.app.base.NIOClientAddTranCode.send(NIOClientAddTranCode.java:101)
at com.nantian.jpre.app.business.card.C2045Transaction.doTransaction(C2045Transaction.java:38)
at com.nantian.jpre.app.business.AbstractTransaction.service(AbstractTransaction.java:102)
at com.jpre.BusinessDealExecutorService.service(BusinessDealExecutorService.java:128)
at com.jpre.NIOAsynShortSocketServer$NIOSynShortSocketProcessor.run(NIOAsynShortSocketServer.java:516)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:678)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:703)
at java.lang.Thread.run(Thread.java:811)
这个是客户端问题还是服务器端的问题
这个错误是偶尔就会出现的,还是有很多成功的,并不是一直失败,40多次才会失败1次
用的是同步短链接 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询