• java.net.SocketException: Software caused connection abort: socket write error


    用Java客户端程序访问Java Web服务器时出错:

    java.net.SocketException: Software caused connection abort: socket write error
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(Unknown Source)
        at java.net.SocketOutputStream.write(Unknown Source)
        at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:159)
        at org.apache.http.impl.io.AbstractSessionOutputBuffer.write(AbstractSessionOutputBuffer.java:179)
        at org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:115)
        at org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:122)
        at org.apache.http.entity.StringEntity.writeTo(StringEntity.java:168)
        at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:89)
        at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
        at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:117)
        at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:265)
        at org.apache.http.impl.conn.ManagedClientConnectionImpl.sendRequestEntity(ManagedClientConnectionImpl.java:203)
        at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:236)
        at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:121)
        at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:682)
        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:486)
        at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
        at com.health_room_client.Communication.Commnunicator.send2Server(Commnunicator.java:44)
        at com.health_room_client.OperFrame.Function.sendRSAKey(Function.java:56)
        at com.health_room_client.OperFrame.MainFrame.main(MainFrame.java:192)

    原来是防火墙的原因,把防火墙关了就正常了。

  • 相关阅读:
    设计模式C++学习笔记之一(Strategy策略模式)
    web服务器上某一中文名文件无法访问
    C++之多态性与虚函数
    常用的16个c/c++面试题
    C/C++ 笔试、面试题目大汇总
    利用jsoncpp将json字符串转换为Vector
    STL中vector、list、deque和map的区别
    C++类的继承中构造函数和析构函数调用顺序例子
    LNMP下Nginx 中文文件名或目录404无法访问的解决方法
    Python Web开发框架Django
  • 原文地址:https://www.cnblogs.com/mstk/p/5610622.html
Copyright © 2020-2023  润新知