记一次axsi2调用 web services 提示 java.net.SocketException: Connection reset 的解决

本文记录了一次在Windows Server上使用Axiom调用Web Services时遇到的java.net.SocketException: Connection reset错误的解决过程。通过抓包分析,发现问题是由于网卡的TSO功能导致发送了超过MSS长度的包。关闭网卡的TSO功能后,问题得到解决。
摘要由CSDN通过智能技术生成

记一次axsi2调用 web services 提示 java.net.SocketException: Connection reset 的解决

最终问题的解决与源代码没有关系,在此就不贴代码了。

一、问题发生
在普通电脑上通过axsi2调用远端服务器的web services上传一直正常,但将程序部署到我们服务器上,调用上级单位web services一直提示Connection reset,具体报错如下:
[EHRLOG] 2022-10-23 16:54:06,113 - INFO - Unable to sendViaPost to url[http://xxx.xxx.xxx.xxx:xxxx/pha/services/phaService] - org.apache.axis2.transport.http.HTTPSenderorg.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:202) -140823 [http-nio-8077-exec-9]
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager H t t p C o n n e c t i o n A d a p t e r . r e a d L i n e ( M u l t i T h r e a d e d H t t p C o n n e c t i o n M a n a g e r . j a v a : 1413 ) a t o r g . a p a c h e . c o m m o n s . h t t p c l i e n t . H t t p M e t h o d B a s e . r e a d S t a t u s L i n e ( H t t p M e t h o d B a s e . j a v a : 1973 ) a t o r g . a p a c h e . c o m m o n s . h t t p c l i e n t . H t t p M e t h o d B a s e . r e a d R e s p o n s e ( H t t p M e t h o d B a s e . j a v a : 1735 ) a t o r g . a p a c h e . c o m m o n s . h t t p c l i e n t . H t t p M e t h o d B a s e . e x e c u t e ( H t t p M e t h o d B a s e . j a v a : 1098 ) a t o r g . a p a c h e . c o m m o n s . h t t p c l i e n t . H t t p M e t h o d D i r e c t o r . e x e c u t e W i t h R e t r y ( H t t p M e t h o d D i r e c t o r . j a v a : 398 ) a t o r g . a p a c h e . c o m m o n s . h t t p c l i e n t . H t t p M e t h o d D i r e c t o r . e x e c u t e M e t h o d ( H t t p M e t h o d D i r e c t o r . j a v a : 171 ) a t o r g . a p a c h e . c o m m o n s . h t t p c l i e n t . H t t p C l i e n t . e x e c u t e M e t h o d ( H t t p C l i e n t . j a v a : 397 ) a t o r g . a p a c h e . c o m m o n s . h t t p c l i e n t . H t t p C l i e n t . e x e c u t e M e t h o d ( H t t p C l i e n t . j a v a : 346 ) a t o r g . a p a c h e . a x i s 2. t r a n s p o r t . h t t p . A b s t r a c t H T T P S e n d e r . e x e c u t e M e t h o d ( A b s t r a c t H T T P S e n d e r . j a v a : 557 ) a t o r g . a p a c h e . a x i s 2. t r a n s p o r t . h t t p . H T T P S e n d e r . s e n d V i a P o s t ( H T T P S e n d e r . j a v a : 199 ) a t o r g . a p a c h e . a x i s 2. t r a n s p o r t . h t t p . H T T P S e n d e r . s e n d ( H T T P S e n d e r . j a v a : 76 ) a t o r g . a p a c h e . a x i s 2. t r a n s p o r t . h t t p . C o m m o n s H T T P T r a n s p o r t S e n d e r . w r i t e M e s s a g e W i t h C o m m o n s ( C o m m o n s H T T P T r a n s p o r t S e n d e r . j a v a : 400 ) a t o r g . a p a c h e . a x i s 2. t r a n s p o r t . h t t p . C o m m o n s H T T P T r a n s p o r t S e n d e r . i n v o k e ( C o m m o n s H T T P T r a n s p o r t S e n d e r . j a v a : 225 ) a t o r g . a p a c h e . a x i s 2. e n g i n e . A x i s E n g i n e . s e n d ( A x i s E n g i n e . j a v a : 438 ) a t o r g . a p a c h e . a x i s 2. d e s c r i p t i o n . O u t I n A x i s O p e r a t i o n C l i e n t . s e n d ( O u t I n A x i s O p e r a t i o n . j a v a : 402 ) a t o r g . a p a c h e . a x i s 2. d e s c r i p t i o n . O u t I n A x i s O p e r a t i o n C l i e n t . e x e c u t e I m p l ( O u t I n A x i s O p e r a t i o n . j a v a : 229 ) a t o r g . a p a c h e . a x i s 2. c l i e n t . O p e r a t i o n C l i e n t . e x e c u t e ( O p e r a t i o n C l i e n t . j a v a : 165 ) a t o r g . a p a c h e . a x i s 2. c l i e n t . S e r v i c e C l i e n t . s e n d R e c e i v e ( S e r v i c e C l i e n t . j a v a : 540 ) a t o r g . a p a c h e . a x i s 2. c l i e n t . S e r v i c e C l i e n t . s e n d R e c e i v e ( S e r v i c e C l i e n t . j a v a : 521 ) a t o r g . a p a c h e . a x i s 2. r p c . c l i e n t . R P C S e r v i c e C l i e n t . i n v o k e B l o c k i n g ( R P C S e r v i c e C l i e n t . j a v a : 102 ) a t o r g . s x . e h r . w e b s e r v i c e . c l i e n t . p h a . S e r v i c e F u n c H e l p e r . f u n c t i o n M a i n ( S e r v i c e F u n c H e l p e r . j a v a : 36 ) a t o r g . s x . e h r . w e b s e r v i c e . c l i e n t . p h a . a c t i o n . U p L o a d A c t i o n . u p L o a d R p t ( U p L o a d A c t i o n . j a v a : 185 ) a t o r g . s x . e h r . w e b s e r v i c e . c l i e n t . p h a . a c t i o n . U p L o a d A c t i o n . u p l o a d A r e a R p t B y A r e a ( U p L o a d A c t i o n . j a v a : 130 ) a t o r g . a p a c h e . j s p .

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
java调用net开发的webservice实例下载 问题终于解决了,之前加上?wsdl的时候报如下错: - I/O exception (java.net.ConnectException) caught when processing request: Connection timed out: connect - Retrying request - I/O exception (java.net.ConnectException) caught when processing request: Connection timed out: connect - Retrying request - I/O exception (java.net.ConnectException) caught when processing request: Connection timed out: connect - Retrying request - java.net.ConnectException: Connection timed out: connect org.codehaus.xfire.fault.XFireFault: Couldn't send message. at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89) at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:30) at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79) at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114) at org.codehaus.xfire.client.Client.invoke(Client.java:336) at org.codehaus.xfire.client.Client.invoke(Client.java:368) at cn.watersoft.reportinfo.test.test.main(test.java:22) Caused by: org.codehaus.xfire.XFireException: Couldn't send message. at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:145) at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48) at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26) ... 6 more Caused by: java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at java.net.Socket.(Socket.java:366) at java.net.Socket.(Socket.java:240) at org.apach
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值