JSP Exception: connection reset by peer

ervlet.jsp.JspException: Can't write string 'Asset Library' : Connection reset by peer.
at org.apache.struts.taglib.tiles.InsertTag$DirectStringHandler.doEndTag()I(InsertTag.java:1026)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag()I(InsertTag.java:473)
at jsp_servlet._pages._common._layouts.__mainlayout._jspService(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(__mainlayout.java:325)
at weblogic.servlet.jsp.JspBase.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl;)V(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(ServletStubImpl.java:315)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(RequestDispatcherImpl.java:322)
at org.apache.struts.action.RequestProcessor.doForward(Ljava.lang.String;Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(RequestProcessor.java:1069)
at org.apache.struts.tiles.TilesRequestProcessor.doForward(Ljava.lang.String;Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(TilesRequestProcessor.java:274)
at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(Ljava.lang.String;ZLjavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)Z(TilesRequestProcessor.java:2
at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Lorg.apache.struts.config.ForwardConfig;)V(TilesRequ
at org.apache.struts.action.RequestProcessor.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(RequestProcessor.java:279)
at org.apache.struts.action.ActionServlet.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl;)V(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6718)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic.servlet.internal.ServletRequestImpl;Lweblogic.servlet.internal.ServletResponseImpl;)V(WebAppServletContext.java:3764)
at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic.kernel.ExecuteThread;)V(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(Lweblogic.kernel.ExecuteRequest;)V(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:178)
at java.lang.Thread.startThreadFromVM(Ljava.lang.Thread;)V(Unknown Source)
When I find the data it's giving result alon with the above exception.
Can any one help?

maybe put in abit of effort and tell the forum what you are trying and what is casuing this error, furthermore put in a little bit more effort and read the text behind the Formatting Tips url provided above the textarea you used to paste your stacktrace in.

Similar Messages

  • Io exception: Connection reset by peer: JVM_recv in socket input stream read

    We are developing a new J2EE app using JDev, OC4J, servlets, and EJBs. We have determined that our firewall is closing database connections that have been idle for 1 hour. This is a security requirement that cannot be changed. When we try to use these idle connections in both stateless and entity beans, we consistently receive this or a similar error message:
    "ServletSACategoryList: Error invoking EJB procedure. Exception: java.sql.SQLException: StatelessSysAdminBean::getCategoryList - Io exception: Connection reset by peer: JVM_recv in socket input stream read "
    Environment:
    Oracle 9iAS 9.0.2.0.0
    Database: Oracle 8.1.7
    JDBC 8.1.7
    JDK 1.3
    JDev 9.0.2.829
    We are using the ejb-location attribute within data-sources.xml for JNDI lookup of the DataSource. Here is what this file looks like:
    <data-sources>
    <data-source
    class="oracle.jdbc.pool.OracleDataSource"
    name="jdbc/OracleDS"
    location="jdbc/OracleCoreDS"
    xa-location="jdbc/xa/OracleXADS"
    ejb-location="jdbc/OraclePoolDS"
    url="jdbc:oracle:thin:@###.###.#.###:1521:dev1"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="????????"
    password="????????"
    max-connections="4"
    wait-timeout="20"
    min-connections="1"
    inactivity-timeout="60"
    connection-retry-interval="1"
    max-connect-attempts="3"
    />
    </data-sources>
    After calling getConnection() on the Connection object in my stateless bean, I have tried checking if the Connection object is null or isClosed(), I have caught any Exception, and looped to try again, but nothing has worked.
    Please respond to [email protected] or directly to this post if you can help in any way.
    Thank you,
    - Rob

    Hi Robert,
    If you don't mind, I can only offer a few suggestions for things
    to try -- I'm afraid I don't have a solution for you. Of-course,
    you may have already tried these things, so please excuse me if
    this is the case.
    Firstly, your "data-sources.xml" file looks "different". Have
    you read the "Data Sources" chapter of the "Oracle9iAS Containers
    for J2EE Services Guide, Release 2 (9.0.2)"? It is accessible
    from here:
    http://otn.oracle.com/docs/products/ias/doc_library/90200doc_otn/web.902/a95879/ds.htm#1004903
    Also, have you tried running OC4J in "debug" mode? This web
    page has more details:
    http://kb.atlassian.com/content/atlassian/howto/orionproperties.jsp
    I get the impression from the information you have supplied,
    that you may not be explicitly closing your database connections
    in your code. It looks to me like you are obtaining a database
    connection in your session bean, and then keeping it for the
    lifetime of that bean. Is that correct? I think it's better
    to obtain a connection when you need to interact with the database,
    and then close the connection immediately after completing the
    interaction with the database (but that's just my opinion).
    Lastly, if you haven't already discovered them, these web sites
    may also be of help:
    http://www.orionserver.com
    http://www.orionsupport.com
    http://www.elephantwalker.com
    Hope this helps you.
    Good Luck,
    Avi.

  • IOException: Connection reset by peer: JVM_recv in socket input stream read

    hi
    I encountered a problem : a program throw out an exception:java.io.IOException: Io exception:
    Connection reset by peer: JVM_recv in socket input stream read.
    I tried my best to resolve it ,but unfortunately,i didn't know what caused the exception.
    the following is my application environment:
    I have two PC(Win2000os),one is a server which installed oracle9.2.0.2 and jdeveloper9.0.3,the another is a
    client which only intalled jdeveloper9.0.3.Two days ago,i performed a web application on my client with
    jdeveloper,and it includes some JSP and a javabean files.JSP Page finished uploading client xml file to a
    folder on server and the javabean finished loading the xml file into a xmltype column.I can make sure the
    connection is established and the javabean is OK,beacause my some jsp page can successfully use
    <jsp:usebean> tag and use the javabean's some other public interfaces,except the interface that finishs
    loading the xml file into a xmltype(clob) column.
    Then i do many tests!I changed the javabean to a java class incluse a main method beacause it is easy to
    debug.Finally i found the following code caused the exception:
    public CLOB writetoClob( CLOB clob, InputStream is )throws SQLException, IOException {
    InputStreamReader reader = new InputStreamReader( is );
    Writer writer = clob.getCharacterOutputStream( );
    char[] buffer = new char[clob.getChunkSize(  )];
    int charsRead;
    for ( charsRead = reader.read( buffer ); charsRead > -1;charsRead = reader.read( buffer ) ) {
    writer.write( buffer, 0, charsRead );
    writer.close();
    return clob;
    when it runs to writer.close(),the exception is caused!
    Then i copy the java class to the server,it runs ok!
    That is to say ,the same code,the different result!
    But when i run my web application on server with jdeveloper Embedded OC4J Server and a jsp page loaded javabean
    and run to mentioned code ,the same exception occured!
    I checked the application log in event viewer,the descriptions was:
    The data buffer created for the "AppleTalk" service in the "C:\WINNT\system32\atkctrs.dll" library is not
    aligned on an 8-byte boundary. This may cause problems for applications that are trying to read the
    performance data buffer. Contact the manufacturer of this library or service to have this problem corrected or
    to get a newer version of this library.
    I search some some resolution about this exception with web and someone sayed :
    This basically means that a network error occurred while the client was receiving data from the server. But
    what is really happening is that the server actually accepts the connection, processes the request, and sends a
    reply to the client. However, when the server closes the socket, the client believes that the connection has
    been terminated abnormally because the socket implementation sends a TCP reset segment telling the client to
    throw away the data and report an error.
    Sometimes, this problem is caused by not properly closing the input/output streams and the socket connection.
    Make sure you close the input/output streams and socket connection properly. If everything is closed properly,
    however, and the problem persists, you can work around it by adding Thread.sleep(1000) before closing the
    streams and the socket. This technique, however, is not reliable and may not work on all systems.
    In general,the following information is conclution:
    Web application runs error both on client and on server.
    If it was changed to a client java class,it only run ok on server!
    i have done anything that i can do now,i feel depressed very much!
    how can i resolve the problem!
    Any a little help will be appreciated!
    regards!
    Thanks
    Jiawei ZHAO

    How can i solve the problem.
    Thanks in advance!
    Jiawei Zhao

  • Connection reset by peer : Socket write

    Hi, everybody
    I am working with weblogic5.1 with servicepack 8. Our server is running for
    24X7X365 but i got some weired error this morning saying that "IO Exception
    :Connection reset by peer : Socket write
    error". I believe this has to do with weblogic.
    Can somebody guide me on this issue.
    Any help would be appreciated.
    Thanks
    Gautam

    Pretty difficult to track such kind of things if it is not easily
    reproducible. Could you also try it out with SP9? Also, try posting it
    on the JDBC newsgroup. Maybe, Joe Weinstein might have more answers.
    Shiva.
    "G.........." wrote:
    LoggingService is one of class that calls db methods.well, we get
    connection from pool and return it pool .we are refreshing connection
    pool regularly, following is some of the entries in properties
    file initialCapacity=5,\
    maxCapacity=10,\
    capacityIncrement=1,\
    allowShrinking=true,\
    shrinkPeriodMins=15,\
    refreshMinutes=10,\ No this message is not easily
    reproductible.JDK version 1.2.2 and os is windows NT4.0 ThanksGautam
    "Shiva Paranandi" <[email protected]> wrote in message
    news:[email protected] does this
    "com.gdaxs.util.LoggingService.logSystemErrorMsg" do? How is
    your pool usage? Do you use the connection pools for a long
    time? Also, can you check if this happens after a pool
    refresh or not? Is this message easily reproducable? What is
    the jdk version you are using and what OS?
    Shiva.
    "G.........." wrote:
    Here is complete stack trace.
    Io exception: Connection reset by peer: JVM_recv in socket
    input stream read
    Stack trace:
    java.sql.SQLException: Io exception: Connection reset by
    peer: JVM_recv in socket input stream read
    at
    com.gdaxs.util.LoggingService.logSystemErrorMsg(LoggingService.java:309)
    at
    com.gdaxs.DBManager.DataRetrieverBean.getCloseOrders(DataRetrieverBean.java:2208)
    at
    com.gdaxs.DBManager.DataRetrieverBeanEOImpl.getCloseOrders(DataRetrieverBeanEOImpl.java:2656)
    at
    com.gdaxs.DBManager.DataRetrieverBeanEOImpl_ServiceStub.getCloseOrders(DataRetrieverBeanEOImpl_ServiceStub.java:343)
    at
    com.gdaxs.closedOrdersBean.init(closedOrdersBean.java:95)
    at
    jsp_servlet._closedorders._jspService(_closedorders.java:236)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:106)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:907)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:851)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:252)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:364)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252)
    at
    weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
    and after it series of exception like below
    Io exception: Connection reset by peer: socket write error
    Stack trace:
    java.sql.SQLException: Io exception: Connection reset by
    peer: socket write error
    at
    com.gdaxs.util.LoggingService.logSystemErrorMsg(LoggingService.java:309)
    at
    com.gdaxs.traderadministrator.LDAPInterfaceBean.getTradingAccounts(LDAPInterfaceBean.java:285)
    at
    com.gdaxs.traderadministrator.LDAPInterfaceBean.getTraderCredentials(LDAPInterfaceBean.java:137)
    at
    com.gdaxs.traderadministrator.LDAPInterfaceBeanEOImpl.getTraderCredentials(LDAPInterfaceBeanEOImpl.java:99)
    at
    com.gdaxs.traderadministrator.LDAPInterfaceBeanEOImpl_ServiceStub.getTraderCredentials(LDAPInterfaceBeanEOImpl_ServiceStub.java:109)
    at
    com.gdaxs.traderadministrator.TraderAdministrator.onMessage(TraderAdministrator.java:278)
    at
    progress.message.jclient.Session.ew_(progress/message/jclient/Session.java)
    at
    progress.message.jclient.QueueSession.run(progress/message/jclient/QueueSession.java)
    at
    progress.message.jclient.sl.run(progress/message/jclient/Session$SessionThread.java)
    Thanks
    Gautam"Shiva Paranandi" <[email protected]> wrote in
    message news:[email protected]...> Could you
    post the entire exception?
    Shiva.
    "G.........." wrote:
    Hi, everybody
    I am working with weblogic5.1 with servicepack 8. Our
    server is running for
    24X7X365 but i got some weired error this morningsaying that "IO Exception
    :Connection reset by peer : Socket write
    error". I believe this has to do with weblogic.
    Can somebody guide me on this issue.
    Any help would be appreciated.
    Thanks
    Gautam
    [att1.html]

  • Trying to insert a Large CLOB : connection reset by peer

    I am Trying to insert a Large CLOB .. i get this error message
    java.sql.SQLException: Io exception: connection reset by peer
    I am using a prepared statement to insert a Clob. It works fine with small data.
    Thanks for your help in advance.

    It might help if you gave more information - this probably depends on your database and driver, so giving info on them will help.

  • Javax.servlet.ServletException: Connection reset by peer....Help needed..

    Initially, when I clicked on my JSPs, everything was fine. I was able to retrieve data successfully from all the JSPs. However, after much clicking through the JSPs. I was not able to access the JSPs and the Internal Servlet Error was shown.
    Below is my Tomcat.log:
    Context log: path="/Aedge" Error in jsp service() : Connection reset by peer: socket write error
    javax.servlet.ServletException: Connection reset by peer: socket write error
         at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:375)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
         at org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:163)
         at org.apache.tomcat.servlets.DefaultServlet.doGet(DefaultServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
         at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
         at java.lang.Thread.run(Unknown Source)
    Context log: path="/Aedge" <b>Internal Servlet Error:</b><br>.....
    What is the problem here? How can I solve this as I had to restart my Tomcat once a while due to this problem.

    ok.. I have db classes where all my sql statements methods are being displayed.. In each db class, there will be a getInstance() method to create the connection. Below is one of my db class.. How to I modified the things you had mentioned in my codes..
    package aedgeSoft.access;
    import aedgeSoft.business.*;
    import java.sql.*;
    import java.util.*;
    import java.util.Date;
    import java.io.*;
    public class DBMemberType
         private Connection con;
         private static DBMemberType instance = null;
         public static DBMemberType getInstance()
              try
                   if(instance==null)
                        instance = new DBMemberType();
              catch(SQLException e)
                   System.out.println("Problems with loading database in DBMemberType");
              catch(ClassNotFoundException e)
                   System.out.println("Problems with loading db driver in DBMemberType");
              finally
                   return instance;
         private DBMemberType() throws SQLException, ClassNotFoundException
              try{
              Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
              con = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;user=username;password=password;DatabaseName=db");
              catch(InstantiationException e)
                   e.printStackTrace();
              catch(IllegalAccessException e)
                   e.printStackTrace();
         //add memberType
         public boolean addMemberType(MemberType mt)
    ..........

  • Connection reset by peer (jdk/jre 1.5.0_06, oracle 10.2.0.2)

    I keep getting the "Oracle says: Io exception: Connection reset by peer: socket write error" to my jdbc thin client connection.
    I have talked to our dba's and they don't see anything wrong on the oracle side. Network people say the network is good. Was this bug fixed in newer versions of ojdbc14.jar?

    With JDK 5.0 use ojdbc5.jar instead of ojdbc14.jar.

  • 'Connection reset by peer' and other punchlines - Help!

    I recently downloaded the latest version of the the JDBC driver and now the connection to the database drops within a few minutes with the exception "Connection reset by peer". The driver version is
    Version 8.0.5.2 JDBC(Thin) for NT. I am connecting to the 8.0.5 on a DEC Alpha machine.
    How does one keep the connection alive and prevent it from dropping so often. Why does the connection drop so quickly? Is there a setting on the database?
    Any help would be appreciated!
    With the older version of the driver the connection dropped intermittently after a few hours or even days with the exception:
    "No more data to read from socket". Subsequent attempts to reconnect within the code gave exceptions like:
    "Bigger type length than Maximum" and
    "Protocol violation"
    null

    This could be a number of things.  The DB could be killing sessions with something like a resource manager.  The network could be dropping. There could be an ora-600 that is aborting a connection.  Turn the debugging on by following this blog entry and let us know the results
    https://cdivilly.wordpress.com/2013/03/08/configuring-logging-in-oracle-application-express-listener-2-0-1/

  • "Connection reset by peer"   Help Me

    Hi
    I have j2re1.4.2_08 and Oracle 9.2
    When I tried to update database with huge data I got following exception:
    java.sql.SQLException: Io exception: Connection reset by peer: socket write error
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2061)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
    at edu.bnmit.BookDBUpdateThread.run(BookDBUpdateThread.java:80)
    at edu.bnmit.BookDBUpdateThread.update(BookDBUpdateThread.java:46)
    at java.lang.Thread.run(null:-1)
    method used to update database is:
    void update(Books b[]){
    Connection dbConnection;
    PreparedStatement stmt;
    try{
    dbConnection = DriverManager.getConnection(
    dbConnection.setAutoCommit(false);
    String sqlStmt = "UPDATE Books SET " +
    "bookName=?, bookAuthor=?" +
    "WHERE bookId=?";
    stmt = dbConnection.prepareStatement(sqlStmt);
    for(int i = 0; i < b.length; i++){
    stmt.setString(1,b.bookName);
    stmt.setString(2,b.bookAuthor);
    stmt.setInt(3,b.bookId);
    stmt.executeUpdate();
    dbConnection.commit();
    stmt.close();
    dbConnection.close();
    }catch(SQLException e){
    System.err.println("Error While Updating Table");
    String s = e.toString();
    StackTraceElement trace[] = e.getStackTrace();
    for(int j = 0; j < trace.length; j++){
    s += "\n\tat "
    + trace[j].getClassName() + trace[j].getMethodName()
    + "(" + trace[j].getFileName()
    + ": " + trace[j].getLineNumber() + ")";
    System.err.println(s);
    }Orcale server is distently placed. I get this exception when I send 10,000+ records to update.
    Can anyone help me.
    Thanks

    [Just a note: the stack does not match the code posted here. In the stack, executeUpdate() is called from BookDBUpdateThread.run() whereas your code shows that it's called from BookDBUpdateThread.update().  It helps to post the correct stack/code.)
    The problem might just be that you have an unreliable connection. The fact that you have a long running operation is just exposing connection drops that may otherwise go unnoticed.
    I suggest that you test this over a more reliable connection. If that is not possible, split the update into multiple shorter running updates. Of course, this would only work if the updates do not require a single transaction. If a single transaction is required, you can use your own XATransaction (the details on XATransactions are beyond the scope of this forum.)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Broken Pipe/Connection Reset By Peer IO Exceptions

    Can someone explain what causes a connection reset by peer exception vs.
              a Broken Pipe IO exception? I realize they are generally caused by
              someone hitting stop, closing their browser, hitting a different link,
              etc.. but I was trying to understand what might cause a connection
              reset by peer exception vs. a broken pipe exception. I've added code to
              my servlet to suppress the "Connection Reset By Peer" socket exceptions
              but I'm wondering if I should do the same with Broken Pipe. Also, are
              there are other types of similar exceptions that can occur when users
              get impatient.. Thanks
              Kirk
              

    I do not have an idea about your application server but i do know how i solved it in weblogic. Just see whether this is helpful to you.
    Points to be sure of........
    1) Make sure that when ever you request a connection from a pool, after you are done with it return it. If you are not returning it and trying to use that reference again, this problem will occur.
    2) Look at the capabilities of your app server. Set the connection pool such that
    a) All the connections are checked at regular interval with some default select statement from any table in the database.
    b) Connections are check when the connection is checked out and returned to the pool.
    I the connection object is not ready , close it and create a new one. The app server which manages the pool should implement these feature so that when you get the connection - its the tested and working object.
    If your app server does not support - then think of ways you testing it before you using it(Anyway this is not the good solution).

  • "Connection reset by peer" exceptions in JDBC

    I wonder if someone from Oracle JDBC development can answer the issues raised in
    this posting.
    component: Oracle JDBC Thin Driver
    component version: 8.1.6
    rdbms version: 8.1.5.
    Summary of problem:
    A long running application that opens JDBC connections and holds them for the lifetime of the application gets SQLExceptions with a "connection reset" message when attempting to reuse a connection that has been idle for a long period of time.
    ( The exact period is not determinable from Oracle documentation).
    We need to handle this exception and open a new connection when this happens.
    The problem is how do we determine when this exception has happened when we
    catch a SQLException. Our software is internationalized and we cant interrogate
    the message text to match for "connection reset by peer".
    The ideal way to do this is for Oracle to throw a subclass of SQLException or to
    use a error code that is unique for the "connection reset by peer" case.
    The following is a summary of the items in this message
    1. Oracle should document when the software throws away open connections.
    2. Provide documented support for handling the above SQLException in
    a language independent manner.
    3. The method isClosed() on class Connection should return true once the
    connection is rendered unusable for whatever reason ( as per the JDBC specification).
    4. The Oracle JDBC drivers should include a retry mechanism on socket errors.
    ( We dont know that whether the connection is reset by the server or if the
    client just gives up once it gets any socket error).
    business need:
    long running applications have no documented way of detecting when a connection has been discarded by the Oracle Server.
    null

    The FAQ does not answer our problem as
    it is not a server problem. The
    support person for the Server group
    asked me to look through the Alrt.log file
    for the database and there were no entries
    for that time.
    Our application has multiple threads, each having its own connection to the database, some inactive threads seem to lose their database connection. We use a driver from a third-party vendor going against SQLServer in the same network and that does not fail in this manner.
    The above seems to rule out
    1. server problems ( no, the problem is not
    happening on the first connection, but
    after the connection has been in use for
    a long time).
    2. network problems. ( the other driver is
    functioning reliably ).
    I believe that the driver may be giving up
    fairly early in the retry process.
    The only way that we know to deal with the
    problem is as follows:
    1. when a SQLException is caught, we dont
    know that the connection has been reset.
    ( we dont want to interrograte the
    message string as it will not work
    in other language environments).
    2. we just ping the connection to the server
    ( use a simple call to set the transaction
    isolation level). If this fails, we
    assume that the connection has been reset. ( Of course, we would prefer a simpler
    way like checking whether the connection
    has been closed).
    Conclusions:
    1. We feel that connections should not be
    lost in this manner.
    2. The connection loss should be detectable
    in a much more reliable manner than the
    hack we use.

  • How to avoid a SocketException: Connection reset by peer

    Hi,
    My problem sounds very simple at first, but I couldn't figure out how to get out of it. It's tricky.
    A have a JSP page which makes some processing and yields output to the user. Everything runs OK, until the user decide to stop the window (or to close the window) before the results render to the browser. When the next browser tries to load this page, the right page is loaded, but before it, the error garbage (error page, stack trace) from the previous user is showed in the browser...the exception is SocketException: Connection Reset by Peer.
    As I could see in the error log for the web server, the server flushes the page to the client browser, but the browser closed the HTTP connection, then this error is returned. That's OK, but this error output that was not sent appears to be "stored" somewhere in the server, and then is sent to the next client that requests the page. I tried to clear the buffer with out.clearBuffer() in the beginning of the page, but it didn't work.
    The solution would simply be to ignore this error output, i.e., to clean the output before the next user try to load the page. but I don't know how to do that.
    Sorry about the long posting, I hope I was clear in my explanation. I am using Websphere Studio Testing Web Server...and this situation happens on any browser (the problem seems to be in the server).
    Thanks in advance,
    Tiago.

    try using out.flush() in your code, use finalize ??
    out.flush();
    out.close();
    all the best !

  • (104) Connection reset by peer

    Dears,
    I have a web Application which works fine when accessed from other machines except one. Only in that machine I get an error
    **(104) Connection reset by peer**
    Please help me to solve this problem.

    monoranjang wrote:
    Even I thought that it is a bug in JSP. Good because it is.
    But if it a bug then the issue should occur in all the computers, why is it from a specific computer? I don't know. Some really bad coding?
    We could not reproduce this issue from any other computers except that one.Doesn't really matter does it?
    I mean you are the server and you are aborting the connection for some reason.

  • RE: SocketException: Connection reset by peer

     

    I am getting a same exception in WebLogic6.1 SP1.
    java.net.SocketException: Connection reset by peer: socket write error
         at java.net.SocketOutputStream.socketWrite(Native Method)
         at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
         at weblogic.servlet.internal.ChunkUtils.writeHeaderChunk(ChunkUtils.java:151)
         at weblogic.servlet.internal.ResponseHeaders.writeHeaders(ResponseHeaders.java:380)
         at weblogic.servlet.internal.ServletResponseImpl.writeHeaders(ServletResponseImpl.java:827)
         at weblogic.servlet.internal.ServletOutputStreamImpl.sendHeaders(ServletOutputStreamImpl.java:222)
         at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:241)
         at weblogic.servlet.internal.ChunkOutput.checkForFlush(ChunkOutput.java:306)
         at weblogic.servlet.internal.MultibyteOutput.write(ChunkOutput.java:413)
         at weblogic.servlet.internal.MultibyteOutput.print(ChunkOutput.java:389)
         at weblogic.servlet.internal.ChunkOutputWrapper.print(ChunkOutputWrapper.java:134)
         at weblogic.servlet.jsp.JspWriterImpl.print(JspWriterImpl.java:111)
    Anybody has any idea?

  • Connection reset by peer WLS 7.0.1

              Hi,
              I have an application running on the wls 7.0.1 server, it runs fine until we let
              the users access it. Problem is users click fast :) and somehow a connection reset
              by peer exception is thrown into the client... Should not this only get logged
              into the server log? If it should be thrown to the client, is this possible to
              switch off, or do I have to make a try catch for every out.print i make in the
              code????
              

    On Mon, 02 Dec 2002 05:34:44 +0000, Klaus Myrseth wrote:
              >
              > Hi,
              >
              > I have an application running on the wls 7.0.1 server, it runs fine until we let
              > the users access it. Problem is users click fast :) and somehow a connection reset
              > by peer exception is thrown into the client... Should not this only get logged
              > into the server log? If it should be thrown to the client, is this possible to
              > switch off, or do I have to make a try catch for every out.print i make in the
              > code????
              Looks like you are not running JSP pages? You said it is an application
              run by client from server? Then of course the error messages will be
              displayed at the client side.
              Thank you,
              Neo Gigs
              "Follow the white rabbit..."
              

Maybe you are looking for

  • Error 36 and External Drive File Copy Problem & USB Connections

    In attempting to copy a folder with some 200G+ of files from my iMAC, with OSX 10.6.7, to an external portable WD 1Tb HD, newly formatted to HFS+ (journaled), and connected to the iMAC via a USB cable to the USB port on the iMAC keyboard, I kept gett

  • Sales invoice error

    ZSD:997 Number Range object Not Maintained in Ztable message is comming while save the sales invoice. Please revert..

  • Mirroring Toggle missing

    I have been trying to mirror my Mac Book Pro to my Apple TV via I tunes. However no Mirroring toggle appears on the Airplay button. I have checked and the latest software is in place on both.

  • How to create 3.x data source in bi 7

    Hi Guys,              can anyone tell me<b> how to create 3.x data source(emulated) in bi 7.0 </b> pls reply  me this is urgent ravi

  • Slight bluish tinge on print margins

    I built 3 profiles with ColorMunki for three different papers (I print with an Epson 3880).  Using each of the profiles, a slight bluish tinge appears in what I'll call the "margin" of the prints.  My tests were done on 4x6 paper, but the image was o