Infamous SocketException: Broken Pipe

Hello,
As with many of the other users on this forum I have been plagued by the Broken Pipe SocketException, very rarely, which seems to essentially block on the java.net.SocketOutputStream.socketWrite0(Native Method) for quite a long time (presumably the length of some timeout) during a flush. It is also typically accompanied by a "java.net.SocketException: Connection timed out" on the socket itself.
I've read the many responses by EJP that this means:
"This is caused by writing to a connection when the other end has already closed it.
So you have a poorly defined or implemented application protocol."
My main question is: Is it normal for these exceptions to occur, and we just need to write some layer that handles this?
And a follow up: If so, would that layer be something along the lines of:
- a separate thread on the server for each output stream, and if this thread blocks during flush (for whatever reason), either:
- use a watchdog thread to close the output if some internal timeout has exceeded, or:
- just let Java's connection timeout eventually occur and let the output thread die
Or am I way off base here?
One more thing: Any other advice / best architectural practices / help regarding this problem / reading suggestions would be extremely appreciated.
Thanks.

EJP wrote:
Or else you are just streaming large amounts of data and the peer giving up is part oft the application protocol(for example, the peer is a browser and the user navigates away), in which case th correct action is to catch the exception and give up on the client.I believe this might be the case. The clients can (and typically do) receive the information I am sending. It is absolutely possible that they can navigate away during the transfer. It is fine for the purposes of the application to give up on this client. To give up on the client and not have flush() block my main thread, I would need a separate thread per client, for handling the outputstream, correct? ie. one for receive, another for send, per client.
There is something seriously wrong with your statement that the peer gets a connection timeout when this side gets a broken pipe. Connection timeout happens when creating a connection: in fact it happens instead of creating a connection. So there is no connection yet, so no peer at all, so it is impossible for the other end to be writing to the connection at all, because there is no connection and no other end. Do you mean a read timeout?I get:
ThreadID-1310 java.net.SocketException: Connection timed out
ThreadID-1310 java.net.SocketException: Broken pipe
On the server-side thread that holds the socket for this client. The Connection timed out happens from the Socket InputStream during a readByte(), Broken pipe happens from the Socket OutputStream during a flush().
Init code:
socket_ = serverSocket_.accept();
in_ = new DataInputStream(new BufferedInputStream(socket_.getInputStream()));
out_ = new DataOutputStream(new BufferedOutputStream(socket_.getOutputStream()));
mainThread.add(this); // the output main thread with some synchronization
start(); // the read thread belowReceive in the thread that throws Connection Timed out:
run() {
  while(running) {
    try {
      byte index = in_.readByte();
    } catch (SocketException e) {
      System.err.println(getId() + ": " + e);
}Send code in main thread that throws broken pipe:
    try {
      callingThread_.out_.flush()
    } catch (SocketException e) {
      System.err.println(callingThread_.getId() + ": " + e);
  }Both exceptions happen back to back. The Main thread keeps a back-pointer to the calling thread As you can see, both in_ and out_ are from the same socket on the original object. The user has absolutely been connected for a while before this occurs.
Thanks again for the insight.

Similar Messages

  • Recovering the failed server to the Cluser !!!!!!!!!!!!!!!!!!! BROKEN PIPE

    Hi,
              I have a weblogic cluster with 2 managed servers on 2 different machines,
              Now i have an application.ear which is kept on the first server and while deploying i choose the option "copy to the other server" and i deploy this EAR to the cluster.
              Mine is a applet-servlet based application and the applet gets downloaded onto client browser.
              Now when both the servers are up load balancing and the failover is also happening.Now the problem is when rejoing the failed server back to the cluster.
              I have setup the classpath entries and arguments entries "Remote Start" tab in the server configuration,
              I bring back the server through weblogic console and it joins the cluster also without any problem.
              The problem is if some users have already opened the application then after rejoining also it works fine.
              But if a new user tries to access the applications what happens is
              we get
              java.net.SocketException: Broken pipe
              at java.net.SocketOutputStream.socketWrite0(Native Method)
              at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
              at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
              at weblogic.servlet.internal.ChunkUtils.writeChunkTransfer(ChunkUtils.java:267)
              at weblogic.servlet.internal.ChunkUtils.writeChunks(ChunkUtils.java:239)
              at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:311)
              at weblogic.servlet.internal.ChunkOutput.checkForFlush(ChunkOutput.java:387)
              at weblogic.servlet.internal.ChunkOutput.write(ChunkOutput.java:254)
              at weblogic.servlet.internal.ChunkOutputWrapper.write(ChunkOutputWrapper.java:125)
              at weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:184)
              at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1639)
              at java.io.ObjectOutputStream$BlockDataOutputStream.write(ObjectOutputStream.java:1603)
              at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1325)
              at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
              at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
              at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1224)
              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1050)
              at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1224)
              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1050)
              at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
              at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
              at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
              at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
              at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
              at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
              at WebRequestController.doPost(WebRequestController.java:184)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                   at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
              at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718)
              at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
              We use IPlanet proxy server to route to the cluster
              Somebody pls help..
              Regards
              Suresh

    Davin Czukoski wrote:
    We have been switching back and forth between the BEA MS SQL server driver
    and the Data Direct driver ever since the SP3 problem started.
    This seems to be a problem with the BEA MS SQL server driver. We switch to
    Data Direct and the problem went away.
    There were no memory messages in our logs for SQL server.Ok. And this only happens during a big sequence of inserts? Let me see your code,
    and please describe the table too. I'll try to duplicate it, but if the data direct driver
    or the free MS driver works for you, go with them.
    Joe
    >
    >
    "Joseph Weinstein" <[email protected]> wrote in message
    news:[email protected]..
    Davin Czukoski wrote:
    I am getting this error part way through an 1000 row update.
    Exception: I/O exception while talking to the server,
    java.io.IOException:
    Broken pipe
    Is it a driver or network issue?Probably neither. I'm guessing the DBMS ran out of memory for theinsert-logging
    or something like that, and killed the client connection. Check your DBMSlog.
    Joe Weinstein at BEA

  • Exception writing binary data to the output stream to client -Broken pipe

    Hi,
    I am trying to use the drag & drop feature using Contributor mode of Webcenter sites. Single Image Page Attribute is working properly where as Multiple Image Page Attribute throws the following error:
    [ERROR] [.kernel.Default (self-tuning)'] [logging.cs.satellite.request] Exception writing binary data to the output stream to client 10.191.117.106
    java.net.SocketException: Broken pipe
         at java.net.SocketOutputStream.socketWrite0(Native Method)
         at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
         at weblogic.servlet.internal.ChunkOutput.writeChunkTransfer(ChunkOutput.java:568)
         at weblogic.servlet.internal.ChunkOutput.writeChunks(ChunkOutput.java:539)
         at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:427)
         at weblogic.servlet.internal.ChunkOutput$2.checkForFlush(ChunkOutput.java:648)
         at weblogic.servlet.internal.ChunkOutput.write(ChunkOutput.java:333)
         at weblogic.servlet.internal.ChunkOutputWrapper.write(ChunkOutputWrapper.java:148)
         at weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:148)
         at COM.FutureTense.Servlet.ServletRequest$OutputOutputStream.write(ServletRequest.java:80)
         at COM.FutureTense.Servlet.ServletRequest.write(ServletRequest.java:1633)
         at com.openmarket.Satellite.RequestContext.write(RequestContext.java:1123)
         at com.openmarket.Satellite.BytePiece.stream(DataPiece.java:253)
         at com.openmarket.Satellite.CacheObjectImpl.stream(CacheObjectImpl.java:651)
         at com.openmarket.Satellite.Http11Responder.respondForWrapper(Http11Responder.java:142)
         at com.openmarket.Satellite.WrapperAwareResponder.respond(WrapperAwareResponder.java:36)
         at com.openmarket.Satellite.SatelliteServer.execute(SatelliteServer.java:85)
         at com.openmarket.Satellite.servlet.BaseServlet.doGet(BaseServlet.java:118)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at com.fatwire.wem.sso.cas.filter.CASFilter.doFilter(CASFilter.java:557)
         at com.fatwire.wem.sso.SSOFilter.doFilter(SSOFilter.java:51)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    Thanks
    KarthiK

    Thank u very much,
         FileOutputStream opGif = new FileOutputStream(destFile, false);
    I have changed above line with the following line:
         PrintWriter opGif = new PrintWriter ( new FileWriter(destFile, false));
    and now this code is working very fine.
    Thanks once again...

  • Broken pipe - Solaris 10, Sun T2000

    Hi,
    I have some problems..
    So, there's one system I'm working with. It's made of 2 parts (both written in Java):
    - "normal" application, that works as a business logic server,
    - web application (build on Turbine framework, running on a Resin Application Server) - it works as a presentation layer,
    These 2 parts are connected via TCP/IP socket connection - we use an ObjectOutputStream.
    It normally works just fine (it's running on several different systems), but recenlty it has been installed on a new server machine and it's started to throw strange exceptions. Below there are informations about server machine, exceptions and code making connections.
    We think, that It may be a problem with configuration of Solaris kernel or TCP/IP stack, but have no idea how to fix it.
    SERVER CONFIGURATION:
    Machine: Sun T2000
    System: Solaris 10
    JVM: 1.4 or 1.5 (both were tested)
    EXCEPTION:
    ERROR 2006-11-28 11:28:59,377 [pl.com.ttsoft.vixen.currentday.server.ClientServiceThread] - IOException while sending data to the client. Closing output stream.
    java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1682)
    at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1591)
    at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1401)
    at java.io.ObjectOutputStream.writeUnshared(ObjectOutputStream.java:371)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.sendMessageToClient(ClientServiceThread.java:679)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.sendModificationData(ClientServiceThread.java:432)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.serveDataModification(ClientServiceThread.java:308)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.run(ClientServiceThread.java:185)
    ERROR 2006-11-28 11:28:59,400 [pl.com.ttsoft.vixen.currentday.server.ClientServiceThread] - IOException while closing client connection.
    java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1682)
    at java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.java:1627)
    at java.io.ObjectOutputStream.flush(ObjectOutputStream.java:666)
    at java.io.ObjectOutputStream.close(ObjectOutputStream.java:687)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.closeClientConnection(ClientServiceThread.java:706)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.sendMessageToClient(ClientServiceThread.java:691)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.sendModificationData(ClientServiceThread.java:432)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.serveDataModification(ClientServiceThread.java:308)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.run(ClientServiceThread.java:185)
    STANDALONE APPLICATION CODE:
    /* i've simplified it */
    /* OPENING CONNECITON */
              Socket socket = = new Socket(hostName, hostPort);
              ObjectOutputStream outStream = new ObjectOutputStream( socket.getOutputStream() );
              ClientDescriptor clientDescriptor =
                new ClientDescriptor(socket, outStream, info.getLogin(), info.getSystem(),
                    info.getDay(), info.getCurrentDaySessionId());
    /* SENDING DATA */
         private boolean sendMessageToClient( MessageDTO messageDTO, ClientDescriptor clientDescriptor )
              throws CurrentDayException {
              logger.info( "sendMessageToClient " + messageDTO.getClientId() );
              ObjectOutputStream outputStream = clientDescriptor.getOutputStream();
              try {
                  outputStream.writeUnshared( messageDTO ); // THIS WRITE THROWS EXCEPTIONS
                  outputStream.flush();
              } catch ( IOException exc ) {
                logger.error( " IOException while sending data to the client. Closing output stream. ", exc );
                // close client connection
                closeClientConnection( clientDescriptor );
                return false;
            return true;       
        private void closeClientConnection( ClientDescriptor clientDescriptor ) {
            try {
                synchronized ( clientDescriptorMap ) {
                    clientDescriptor.setState( ClientDescriptor.TO_REMOVE );           
                    clientDescriptor.getOutputStream().close();
                    clientDescriptor.getSocket().close();
            } catch ( IOException exc ) {
                logger.error( " IOException while closing client connection. ", exc );
    /* WEB APPLICATION */
    /* RECIEVING DATA */
    /* it routes this data to 3-rd party applet */
            SocketChannel vixenSocket = (SocketChannel)key.channel();
            Socket clientSocket = (Socket)objClientServers.get(key);
            // read the information from the socket....
            ByteBuffer buffer = ByteBuffer.allocate(16 * 1024);
            while (vixenSocket.read(buffer) > 0) {
                buffer.flip();
                byte[] bytespassed = new byte[buffer.remaining()];
                logger.debug("buffer.remaining() (1)=" + buffer.remaining());
                buffer.get(bytespassed, 0, bytespassed.length);
                clientSocket.getOutputStream().write(bytespassed);
                buffer.compact();
            buffer.flip();
            while (buffer.hasRemaining()) { // make sure the buffer is fully readed.
                byte[] bytespassed = new byte[buffer.remaining()];
                logger.debug("buffer.remaining() (2)=" + buffer.remaining());
                buffer.get(bytespassed, 0, bytespassed.length);
                clientSocket.getOutputStream().write(bytespassed);
            buffer.clear();We think, that It may be a problem with configuration of Solaris kernel or TCP/IP stack, but have no idea how to fix it.
    Thanks for help,
    Ziemek Obel.

    We solve problem changing tcp/ip window parameters on T2000 server:
    ndd -set /dev/tcp tcp_xmit_hiwat 400000
    ndd -set /dev/tcp tcp_recv_hiwat 400000
    ndd -set /dev/tcp tcp_conn_req_max_q 81920
    ndd -set /dev/tcp tcp_conn_req_max_q0 81920
    ndd -set /dev/tcp tcp_time_wait_interval 60000
    Arkadiusz Malinowski

  • Broken pipe - Sun T2000, Solaris 10

    Hi,
    I have some problems..
    So, there's one system I'm working with. It's made of 2 parts (both written in Java):
    - "normal" application, that works as a business logic server,
    - web application (build on Turbine framework, running on a Resin Application Server) - it works as a presentation layer,
    These 2 parts are connected via TCP/IP socket connection - we use an ObjectOutputStream.
    It normally works just fine (it's running on several different systems), but recenlty it has been installed on a new server machine and it's started to throw strange exceptions. Below there are informations about server machine, exceptions and code making connections.
    We think, that It may be a problem with configuration of Solaris kernel or TCP/IP stack, but have no idea how to fix it.
    SERVER CONFIGURATION:
    Machine: Sun T2000
    System: Solaris 10
    JVM: 1.4 or 1.5 (both were tested)
    EXCEPTION:
    ERROR 2006-11-28 11:28:59,377 [pl.com.ttsoft.vixen.currentday.server.ClientServiceThread] - IOException while sending data to the client. Closing output stream.
    java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1682)
    at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1591)
    at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1401)
    at java.io.ObjectOutputStream.writeUnshared(ObjectOutputStream.java:371)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.sendMessageToClient(ClientServiceThread.java:679)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.sendModificationData(ClientServiceThread.java:432)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.serveDataModification(ClientServiceThread.java:308)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.run(ClientServiceThread.java:185)
    ERROR 2006-11-28 11:28:59,400 [pl.com.ttsoft.vixen.currentday.server.ClientServiceThread] - IOException while closing client connection.
    java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1682)
    at java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.java:1627)
    at java.io.ObjectOutputStream.flush(ObjectOutputStream.java:666)
    at java.io.ObjectOutputStream.close(ObjectOutputStream.java:687)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.closeClientConnection(ClientServiceThread.java:706)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.sendMessageToClient(ClientServiceThread.java:691)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.sendModificationData(ClientServiceThread.java:432)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.serveDataModification(ClientServiceThread.java:308)
    at pl.com.ttsoft.vixen.currentday.server.ClientServiceThread.run(ClientServiceThread.java:185)
    STANDALONE APPLICATION CODE:
    /* i've simplified it */
    /* OPENING CONNECITON */
              Socket socket = = new Socket(hostName, hostPort);
              ObjectOutputStream outStream = new ObjectOutputStream( socket.getOutputStream() );
              ClientDescriptor clientDescriptor =
                new ClientDescriptor(socket, outStream, info.getLogin(), info.getSystem(),
                    info.getDay(), info.getCurrentDaySessionId());
    /* SENDING DATA */
         private boolean sendMessageToClient( MessageDTO messageDTO, ClientDescriptor clientDescriptor )
              throws CurrentDayException {
              logger.info( "sendMessageToClient " + messageDTO.getClientId() );
              ObjectOutputStream outputStream = clientDescriptor.getOutputStream();
              try {
                  outputStream.writeUnshared( messageDTO ); // THIS WRITE THROWS EXCEPTIONS
                  outputStream.flush();
              } catch ( IOException exc ) {
                logger.error( " IOException while sending data to the client. Closing output stream. ", exc );
                // close client connection
                closeClientConnection( clientDescriptor );
                return false;
            return true;       
        private void closeClientConnection( ClientDescriptor clientDescriptor ) {
            try {
                synchronized ( clientDescriptorMap ) {
                    clientDescriptor.setState( ClientDescriptor.TO_REMOVE );           
                    clientDescriptor.getOutputStream().close();
                    clientDescriptor.getSocket().close();
            } catch ( IOException exc ) {
                logger.error( " IOException while closing client connection. ", exc );
    /* WEB APPLICATION */
    /* RECIEVING DATA */
    /* it routes this data to 3-rd party applet */
            SocketChannel vixenSocket = (SocketChannel)key.channel();
            Socket clientSocket = (Socket)objClientServers.get(key);
            // read the information from the socket....
            ByteBuffer buffer = ByteBuffer.allocate(16 * 1024);
            while (vixenSocket.read(buffer) > 0) {
                buffer.flip();
                byte[] bytespassed = new byte[buffer.remaining()];
                logger.debug("buffer.remaining() (1)=" + buffer.remaining());
                buffer.get(bytespassed, 0, bytespassed.length);
                clientSocket.getOutputStream().write(bytespassed);
                buffer.compact();
            buffer.flip();
            while (buffer.hasRemaining()) { // make sure the buffer is fully readed.
                byte[] bytespassed = new byte[buffer.remaining()];
                logger.debug("buffer.remaining() (2)=" + buffer.remaining());
                buffer.get(bytespassed, 0, bytespassed.length);
                clientSocket.getOutputStream().write(bytespassed);
            buffer.clear();We think, that It may be a problem with configuration of Solaris kernel or TCP/IP stack, but have no idea how to fix it.
    Thanks for help,
    Ziemek Obel.

    Hi,
    well I'm not sure if it isn't a hardware problem - you see, this system works just fine on a Solaris 10 working on the other servers, but tends to throw exceptions on Sun T2000 machine - so I guess It may be hardware issue and someone here could help me.
    Ziemek.

  • Jsf web application has to be restarted everytime a broken pipe exception

    Hi,
    My jsf web application using tomcat is experiencing a sql exception "java.sql.SQLException: System or internal error java.net.SocketException: Broken pipe" when it tries to connect to database.
    Everytime this exception happens I have to restart the application and the application runs fine then.
    Is there a way to handle this exception that we don't have to restart the application.
    -kap

    It depends....
    How do you have (where) the connection, how you obtain them, etc?

  • Broken pipe issue on Weblogic 8.1 and HP-UX

    Hey all,
    I get the following "broken pipe" error when stress-testing the Weblogic AS 8.1 installed on HP-UX 11.
    java.net.SocketException: Broken pipe
            at java.net.SocketOutputStream.socketWrite0(Native Method)
            at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
            at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
            at weblogic.servlet.internal.ChunkUtils.writeChunkNoTransfer(ChunkUtils.
    java:280)
            at weblogic.servlet.internal.ChunkUtils.writeChunks(ChunkUtils.java:241)
            at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:311)
            at weblogic.servlet.internal.ChunkOutput.checkForFlush(ChunkOutput.java:
    387)
            at weblogic.servlet.internal.ChunkOutput.write(ChunkOutput.java:254)
            at weblogic.servlet.internal.MultibyteOutput.write(ChunkOutput.java:482)
            at weblogic.servlet.internal.ChunkOutputWrapper.write
    (ChunkOutputWrapper
    .java:125)
            at weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutput
    StreamImpl.java:184)
            at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66
            at java.io.BufferedOutputStream.write(BufferedOutputStream.java:110)
            at java.io.FilterOutputStream.write(FilterOutputStream.java:80)However, a quick glance on the forums revealed that this also happens on Weblogic+linux or tomcat+linux.
    Looks like an operating-system issue. Anyone has a clue ?
    Thank you,
    Cristian

    The following is the scenario where the broken pipe exception occurs to me:
    - webapp on a Linux server with Apache + Tomcat.
    - database (SQL Server) on another computer.
    - the webapp creates one db connection at startup, stores it in the ServletContext and always uses that connection for any db access.
    - If the db server is restarted, or just the SQL Server service is restarted, the connection that was in the ServletContext becomes invalid, and any attempt to access the db through it throws the broken pipe exception.
    At this point the webapp has to recreate the connection and re-store it in the ServletContext in order to gain access to the db again.
    HTH

  • Tomcat exception of broken pipes

    I got the exeption continueously as below. how to get rid of it? thanks
    2005-3-29 14:46:05 org.apache.jk.server.JkCoyoteHandler action
    : Error in action code
    java.net.SocketException: Broken pipe
         at java.net.SocketOutputStream.socketWrite0(Native Method)
         at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
         at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:457)
         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:654)
         at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:435)
         at org.apache.coyote.Response.action(Response.java:226)
         at org.apache.coyote.Response.finish(Response.java:348)
         at org.apache.coyote.tomcat5.OutputBuffer.close(OutputBuffer.java:328)
         at org.apache.coyote.tomcat5.CoyoteResponse.finishResponse(CoyoteResponse.java:497)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:213)
         at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:309)
         at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387)
         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)
         at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615)
         at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
         at java.lang.Thread.run(Thread.java:536)
    http://blog.csdn.net/zwwwxy/

    What do you mean by continuously?
    Usually, this kind of exception is thrown once in a while as the pipe, one end of which is your server and the other end is the client, is broken. It might be caused by client closing the connection prematurely or it might be an artifact of transient network condition. Or something else. In many cases, you can do nothing about it. If there is no real problem you can associate to this SockeException, you may safely ignore them.

  • Java.rmi.MarshalException:....Broken pipe (plz help)

    Hi,
    I tried to run one simple RMI application..
    I got the RMI Server running...
    But While running the client I got the following Exception...
    java.rmi.MarshalException: error marshalling arguments; nested exception is:
    java.net.SocketException: Broken pipe
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:129)
    at engine.ServerMain_Stub.addTask(Unknown Source)
    at client.ClientMain.initCompute(ClientMain.java:38)
    at client.ClientMain.main(ClientMain.java:17)
    Caused by: java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)
    at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1639)
    at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1548)
    at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1146)
    at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1100)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1241)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052) at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1355)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:281)
    at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:265)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:124)
    ... 3 more
    I am not able to understand the problem...
    Plz help..
    Regerds
    Jijo Vincent

    Hi, I got same stack trace within RMIConnector.
    MBean Server (= RIM Server) has bean alive, but a MBean client may get following Exception.
    I'm guessing that a port on server side was closed, cause rmi object on server side was unbinded from the rmi registory by some trigger.
    But I don't know what was the trigger for this...
    Caused by: java.rmi.MarshalException: error marshalling arguments; nested exception is:
    java.net.SocketException: Broken pipe
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:138)
    at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
    at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown Source)
    at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:993)
    at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:288)
    ... 7 more
    Caused by: java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109)
    at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1847)
    at java.io.ObjectOutputStream$BlockDataOutputStream.writeByte(ObjectOutputStream.java:1885)
    at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1546)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:333)
    at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:274)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
    ... 11 more
    java.runtime.name = Java(TM) SE Runtime Environment
    java.runtime.version = 1.6.0_24-b07
    java.specification.name = Java Platform API Specification
    java.specification.vendor = Sun Microsystems Inc.
    java.specification.version = 1.6
    os.arch = amd64
    os.name = Linux
    os.version = 2.6.18-194.el5

  • Newbie Question : Broken Pipe

    Hi all,
    I got a prob under Apache tomcat 5.5.6 and JDK & JRE 1.5.0_01:
    From catalina.out, I got :
    ==========================================================
    INFO: SessionListener: attributeAdded('D57CF5B49544DEE007778BB3F78EB407', 'cart', 'WebBlaBla.Main.MainModuleServlet@1fa1bb6')
    processRequest submit = : login
    java.net.SocketException: Broken pipe
    processRequest submit = : login
    processRequest submit = : login
    processRequest submit = : refresh
    processRequest submit = : refresh
    processRequest submit = : refresh
    processRequest submit = : refresh
    java.net.SocketException: Broken pipe
    processRequest submit = : refresh
    CheckWebClient execute
    checkWebClientConnexion ------>>>> 1105547298096
    1990>20000
    java.net.SocketException: Broken pipe
    processRequest submit = : refresh
    processRequest submit = : refresh
    java.net.SocketException: Broken pipe
    processRequest submit = : refresh
    processRequest submit = : refresh
    processRequest submit = : refresh
    ===========================================================
    I have no idea of what happening ..... if some one has ....
    Cheers,
    Fell

    can you give me more details about this.
    like what u were doing when this happened etc.Hi,
    On the server (Debian R3 and Tomcat 5.5.6), there's a java application running. This application is supposed to connect to a C++ server application througt a socket connection (winsocket).
    It cannot established this connection.
    This connection is ok under Windows XP , Mandrake 10.1 and Apache Tomcat 5.5.4.
    Sometime under Mandrake, we had the same problem "broken pipe" but the connection could be reestablished.
    Thx

  • What exactly is a broken pipe error is

    Hi
    we get often the exception
    "java.io.IOException: Broken pipe" "java.net.SocketException: Broken pipe" and a few like these in our logfile. Not sure why it throws. Can anyone help me out in getting some idea about it.

    The "*java.net.IOException: Broken pipe*" error comes due to following reasons:
    1- If the client disconnects before it has completely received the response.
    2- If the user hits the Stop button, or clicks another link while the previously clicked operation is in process.
    Don't worry. This error is not dangerous.
    The "*java.net.SocketException: Broken pipe*" error occurs due to following reasons.
    1- If you invoke a connection when the other end has already terminated it.
    2- If you have a poorly implemented application protocol.
    3- If the database server closes the connection after a predefined interval if nothing has happened.
    This is in fact an error due to your poor implementation.
    Edited by: 866328 on Jun 16, 2011 5:19 PM

  • LDAP Broken Pipe exception when deploying processes via ant task

    Hi,
    Has anyone experienced this and can offer a fix? We are publishing/deploying our processes using the fuego:publish task in Fuego 5.7 (we are migrating our system from 5.1) and one of the publish tasks for a large project always fails with the following exception:
    Caused by: fuego.directory.CommunicationException: Cannot connect to the Directory Service at: [iplanet://zion:28899/o=nexagent.com].
    Detail:The Directory Service could not be reached. Either the Directory Service is down, the host where it resides is unavailable, a network problem exists, or there is no Directory Service at the specified location.
    at fuego.directory.provider.ldap.LDAPPersistenceManager.createEntry(LDAPPersistenceManager.java:465)
    at fuego.directory.provider.ldap.LDAPPersistenceManager.createEntry(LDAPPersistenceManager.java:489)
    at fuego.directory.provider.ldap.LDAPProjectAccessor.createCatalogJar(LDAPProjectAccessor.java:160)
    at fuego.directory.DirCatalogJar.create(DirCatalogJar.java:257)
    at fuego.directory.DirCatalogJar.create(DirCatalogJar.java:46)
    at fuego.mami.CatalogPublisher.store(CatalogPublisher.java:369)
    at fuego.mami.ProjectPublisher.storeCatalog(ProjectPublisher.java:1631)
    at fuego.mami.ProjectPublisher.storeProject(ProjectPublisher.java:1653)
    at fuego.mami.ProjectPublisher.publish(ProjectPublisher.java:854)
    at fuego.tools.ant.enterprise.impl.PublishProjectTaskImpl.execute(PublishProjectTaskImpl.java:377)
    ... 23 more
    Caused by: javax.naming.CommunicationException: Broken pipe [Root exception is java.net.SocketException: Broken pipe]; remaining name 'cn=catalogJar-3,cn=fuego-dirCatalogJars,cn=fuego-directoryRoot'
    at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(LdapCtx.java:803)
    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_createSubcontext(ComponentDirContext.java:319)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(PartialCompositeDirContext.java:248)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(PartialCompositeDirContext.java:236)
    at javax.naming.directory.InitialDirContext.createSubcontext(InitialDirContext.java:178)
    at fuego.jndi.FaultTolerantDirContext.createSubcontext(FaultTolerantDirContext.java:413)
    at fuego.directory.provider.ldap.LDAPPersistenceManager.createNestedEntry(LDAPPersistenceManager.java:1744)
    at fuego.directory.provider.ldap.LDAPPersistenceManager.createEntry(LDAPPersistenceManager.java:455)
    ... 32 more
    Caused by: java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)
    at com.sun.jndi.ldap.Connection.writeRequest(Connection.java:389)
    at com.sun.jndi.ldap.Connection.writeRequest(Connection.java:364)
    at com.sun.jndi.ldap.LdapClient.add(LdapClient.java:1007)
    at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(LdapCtx.java:766)
    ... 39 more
    Looking at the LDAP access log the error code is B1 which means that the client closed the connection without sending an unbind request or it could also mean that the client sent a malformed request to the server. The project being deployed is quite big and fails when storing the catalog, could the size have something to do with it (this worked in v5.1) is this a bug in 5.7?
    Any help would be greatly appreciated!
    regards,
    Mike

    Hi,
    Has anyone experienced this and can offer a fix? We are publishing/deploying our processes using the fuego:publish task in Fuego 5.7 (we are migrating our system from 5.1) and one of the publish tasks for a large project always fails with the following exception:
    Caused by: fuego.directory.CommunicationException: Cannot connect to the Directory Service at: [iplanet://zion:28899/o=nexagent.com].
    Detail:The Directory Service could not be reached. Either the Directory Service is down, the host where it resides is unavailable, a network problem exists, or there is no Directory Service at the specified location.
    at fuego.directory.provider.ldap.LDAPPersistenceManager.createEntry(LDAPPersistenceManager.java:465)
    at fuego.directory.provider.ldap.LDAPPersistenceManager.createEntry(LDAPPersistenceManager.java:489)
    at fuego.directory.provider.ldap.LDAPProjectAccessor.createCatalogJar(LDAPProjectAccessor.java:160)
    at fuego.directory.DirCatalogJar.create(DirCatalogJar.java:257)
    at fuego.directory.DirCatalogJar.create(DirCatalogJar.java:46)
    at fuego.mami.CatalogPublisher.store(CatalogPublisher.java:369)
    at fuego.mami.ProjectPublisher.storeCatalog(ProjectPublisher.java:1631)
    at fuego.mami.ProjectPublisher.storeProject(ProjectPublisher.java:1653)
    at fuego.mami.ProjectPublisher.publish(ProjectPublisher.java:854)
    at fuego.tools.ant.enterprise.impl.PublishProjectTaskImpl.execute(PublishProjectTaskImpl.java:377)
    ... 23 more
    Caused by: javax.naming.CommunicationException: Broken pipe [Root exception is java.net.SocketException: Broken pipe]; remaining name 'cn=catalogJar-3,cn=fuego-dirCatalogJars,cn=fuego-directoryRoot'
    at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(LdapCtx.java:803)
    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_createSubcontext(ComponentDirContext.java:319)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(PartialCompositeDirContext.java:248)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(PartialCompositeDirContext.java:236)
    at javax.naming.directory.InitialDirContext.createSubcontext(InitialDirContext.java:178)
    at fuego.jndi.FaultTolerantDirContext.createSubcontext(FaultTolerantDirContext.java:413)
    at fuego.directory.provider.ldap.LDAPPersistenceManager.createNestedEntry(LDAPPersistenceManager.java:1744)
    at fuego.directory.provider.ldap.LDAPPersistenceManager.createEntry(LDAPPersistenceManager.java:455)
    ... 32 more
    Caused by: java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)
    at com.sun.jndi.ldap.Connection.writeRequest(Connection.java:389)
    at com.sun.jndi.ldap.Connection.writeRequest(Connection.java:364)
    at com.sun.jndi.ldap.LdapClient.add(LdapClient.java:1007)
    at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(LdapCtx.java:766)
    ... 39 more
    Looking at the LDAP access log the error code is B1 which means that the client closed the connection without sending an unbind request or it could also mean that the client sent a malformed request to the server. The project being deployed is quite big and fails when storing the catalog, could the size have something to do with it (this worked in v5.1) is this a bug in 5.7?
    Any help would be greatly appreciated!
    regards,
    Mike

  • Weblogic 8.1 SP6 with 10g SocketException: Write failed: Broken pipe

    Hi
    We have recently upgraded DB from 9.2.0 to 10.2.0 (DB installed on XP), Our application is deployed on WebLogic 8.1 SP6 (installed on Linux Enterprise 5.2), every thing worked fine but after upgrade, application server log throw following exception if i change connection pool to use url for 10g instead of 9i,
    Actions
    Updated thin client driver by following instructions from
    http://e-docs.bea.com/wls/docs81/jdbc/thirdparty.html#1110914 but it didnt work
    Any other suggestions
    java.net.SocketException: Write failed: Broken pipe
    at jrockit.net.SocketNativeIO.writeBytesPinned(I[BII)V(Native Method)
            at jrockit.net.SocketNativeIO.socketWrite(Ljava.io.FileDescriptor;[BII)V(Unknown Source)
            at java.net.SocketOutputStream.socketWrite0(Ljava.io.FileDescriptor;[BII)V(SocketOutputStream.java:???)
            at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
            at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
            at weblogic.servlet.internal.ChunkUtils.writeHeaderChunk(ChunkUtils.java:218)
            at weblogic.servlet.internal.ChunkUtils.writeChunkTransfer(ChunkUtils.java:259)
            at weblogic.servlet.internal.ChunkUtils.writeChunks(ChunkUtils.java:243)
            at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:311)
            at weblogic.servlet.internal.ChunkOutput.checkForFlush(ChunkOutput.java:389)
            at weblogic.servlet.internal.ChunkOutput.print(ChunkOutput.java:271)
            at weblogic.servlet.internal.ChunkOutputWrapper.print(ChunkOutputWrapper.java:138)
            at weblogic.servlet.jsp.JspWriterImpl.print(JspWriterImpl.java:282)
            at jsp_servlet.__transferbetweenaccounts._writeText(__transferbetweenaccounts.java:172)
            at jsp_servlet.__transferbetweenaccounts._jspService(__transferbetweenaccounts.java:538)
            at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
            at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
            at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:646)
            at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:431)
            at com.bankframe.fe.statemachine.ext.connectors.servlet.JSPView.build(JSPView.java:114)
            at com.bankframe.fe.statemachine.ext.apps.View.build(View.java:64)
            at com.bankframe.fe.statemachine.base.RequestManager.manageRequest(RequestManager.java:364)
            at com.bankframe.fe.statemachine.ext.connectors.servlet.EntryServlet.delegateToRequestManager(EntryServlet.java:75)
            at com.bankframe.fe.statemachine.ext.connectors.servlet.EntryServlet.doPost(EntryServlet.java:105)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:7047)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I can't guess this issue has to do with Database and its driver.
    Possible reason could be that the browser is closed when the site is rendering the response from the server.
    The error indicates the communication is broken.
    This particular servlet/jsp is trying to write something on the response stream for which the call started from the below line:
    at jsp_servlet.__transferbetweenaccounts._writeText(__transferbetweenaccounts.java:172)

  • Ping timeouts at server and broken pipes at client

    I am experiencing unexpected broken pipe exceptions at the client side of a coherence server. These exceptions prevent our code to establish a connection to the cache server.
    Due to network restrictions, we are connecting client and server through Coherence*Extend.
    At the server side, the logs show the following message:
    DEBUG Coherence:3 - 2013-02-01 11:12:20.584/85.322 Oracle Coherence GE 3.7.1.5 <D6> (thread=Proxy:TcpProxyServicePof:TcpAcceptor, member=1): Closed: TcpConnection(Id=0x0000013C953D8F150AA202D9F632E5EAFD6BDDE1A713F026C65BC1E7CC1E5952, Open=false, Member(Id=0, Timestamp=2013-02-01 11:11:44.404, Address=127.0.0.1:0, MachineId=0, Location=site:,process:1612, Role=WeblogicServer), LocalAddress=10.162.2.217:28088, RemoteAddress=10.162.2.231:45202) due to:
    com.tangosol.net.messaging.ConnectionException: TcpConnection(Id=0x0000013C953D8F150AA202D9F632E5EAFD6BDDE1A713F026C65BC1E7CC1E5952, Open=true, Member(Id=0, Timestamp=2013-02-01 11:11:44.404, Address=127.0.0.1:0, MachineId=0, Location=site:,process:1612, Role=WeblogicServer), LocalAddress=10.162.2.217:28088, RemoteAddress=10.162.2.231:45202): did not receive a response to a ping within 500 millis
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.checkPingTimeout(Peer.CDB:12)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.Acceptor.checkPingTimeouts(Acceptor.CDB:7)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.onNotify(Peer.CDB:115)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:662)
    And at the client side:
    ERROR (01/02/2013) 11:12:20 [threadsafe]Thread-15/AbstractComponentHandler Unable to create new instance 45067 ms
    com.tangosol.net.messaging.ConnectionException: TcpConnection(Id=0x0000013C953D8F150AA202D9F632E5EAFD6BDDE1A713F026C65BC1E7CC1E5952, Open=true, Member(Id=0, Timestamp=2013-02-01 11:11:44.404, Address=127.0.0.1:0, MachineId=0, Location=site:,process:1612, Role=WeblogicServer), LocalAddress=10.162.2.231:45202, RemoteAddress=10.162.2.217:28088)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.initiator.TcpInitiator$TcpConnection.send(TcpInitiator.CDB:35)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.send(Peer.CDB:29)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.post(Peer.CDB:23)
    at com.tangosol.coherence.component.net.extend.Channel.post(Channel.CDB:25)
    at com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:18)
    at com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:1)
    at com.tangosol.coherence.component.net.extend.RemoteNamedCache$BinaryCache.putAll(RemoteNamedCache.CDB:10)
    at com.tangosol.util.ConverterCollections$ConverterMap.putAll(ConverterCollections.java:1708)
    at com.tangosol.coherence.component.net.extend.RemoteNamedCache.putAll(RemoteNamedCache.CDB:1)
    at com.tangosol.coherence.component.util.SafeNamedCache.putAll(SafeNamedCache.CDB:1)
    at com.tangosol.net.cache.CachingMap.putAll(CachingMap.java:1023)
    Caused by: java.net.SocketException: Write failed: Broken pipe
    at jrockit.net.SocketNativeIO.writeBytesPinned(Native Method)
    at jrockit.net.SocketNativeIO.socketWrite(SocketNativeIO.java:46)
    at java.net.SocketOutputStream.socketWrite0(SocketOutputStream.java)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:104)
    at java.io.DataOutputStream.write(DataOutputStream.java:90)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.initiator.TcpInitiator$TcpConnection.send(TcpInitiator.CDB:27)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.send(Peer.CDB:29)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.post(Peer.CDB:23)
    at com.tangosol.coherence.component.net.extend.Channel.post(Channel.CDB:25)
    at com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:18)
    at com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:1)
    at com.tangosol.coherence.component.net.extend.RemoteNamedCache$BinaryCache.putAll(RemoteNamedCache.CDB:10)
    at com.tangosol.util.ConverterCollections$ConverterMap.putAll(ConverterCollections.java:1703)
    at com.tangosol.coherence.component.net.extend.RemoteNamedCache.putAll(RemoteNamedCache.CDB:1)
    at com.tangosol.coherence.component.util.SafeNamedCache.putAll(SafeNamedCache.CDB:1)
    at com.tangosol.net.cache.CachingMap.putAll(CachingMap.java:1023)
    I can ping the client machine from the server without a problem.
    Has anybody seen this before?
    Edited by: 982740 on Feb 1, 2013 2:29 AM

    Hi user,
    It seems from the log that when the proxy node accepts your client connection the client fails to respond to a ping request down the same pipe. Does this happen consistently? If so, no putAll would ever succeed.
    I have to admit I've never seen this behaviour before. I can't see how this would be a firewall port issue, as the connection has been established... the only things I can think of would be a) your weblogic client node is running way to hot and doesn't respond to the grids ping request in time, b) Some very aggressive network infrastructure is killing the connection just after its created, or c) aliens are interfering with your system.
    sorry I can't be of more help,
    Andy

  • Jackd + guitar: "timeouts and broken pipes"

    Hi friends! I'm trying to pass my electric guitar via any rack/effects (like Guitarix or Creox) with no luck. I've got this sound card:
    01:06.0 Multimedia audio controller: Creative Labs [SB Live! Value] EMU10k1X
    01:06.1 Input device controller: Creative Labs [SB Live! Value] Input device controller
    I try with QJackCtl and invoking jackd from the terminal with any luck.
    jackd -d alsa -C -P
    jackd 0.121.3
    Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
    jackd comes with ABSOLUTELY NO WARRANTY
    This is free software, and you are welcome to redistribute it
    under certain conditions; see the file COPYING for details
    could not open driver .so '/usr/lib/jack/jack_net.so': libcelt0.so.2: cannot open shared object file: No such file or directory
    could not open driver .so '/usr/lib/jack/jack_firewire.so': libffado.so.2: cannot open shared object file: No such file or directory
    JACK compiled with System V SHM support.
    loading driver ..
    creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
    control device hw:0
    configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
    ALSA: final selected sample format for capture: 16bit little-endian
    ALSA: use 2 periods for capture
    ALSA: final selected sample format for playback: 16bit little-endian
    ALSA: use 2 periods for playback
    jackd watchdog: timeout - killing jackd
    [gabo@machina ~]$
    This is the output from QJackCtl:
    00:12:07.126 Client deactivated.
    00:12:07.130 JACK is being forced...
    cannot read server event (Success)
    cannot continue execution of the processing graph (Bad file descriptor)
    zombified - calling shutdown handler
    cannot send request type 7 to server
    cannot read result for request type 7 from server (Broken pipe)
    cannot send request type 7 to server
    cannot read result for request type 7 from server (Broken pipe)
    00:12:07.339 JACK was stopped with exit status=1.
    I can hear my guitar and record with Audacity, but when jackd enter into the escenario everything blows up. I read that nowadays almost any sound card will work with QJackCtl with the default options. I play with the parameters and sometimes jack refuse to start. With the default options on i can make it run, but i get no sound of the racks or guitar effects processors neither the guitar tuners that use jack takes the sound from the guitar. My line input is in capture via alsamixer, but still no luck. Any clue on this? I'm skipping steps?
    Thanks in advance.
    iamgabo

    Hi!
    groups && cat /proc/asound/cards && cat ~/.asoundrc && cat '/etc/security/limits.d/audio.conf' && jackd -v
    adm disk lp wheel http network video audio optical storage power users polkitd vboxusers wireshark kismet
    0 [Live ]: EMU10K1X - Dell Sound Blaster Live!
    Dell Sound Blaster Live! at 0xcc00 irq 17
    #pcm.upmix71 {
    #type upmix
    #slave.pcm "surround71"
    #delay 15
    #channels 8
    pcm.!default {
    type hw
    card 0
    ctl.!default {
    type hw
    card 0
    # convert alsa API over jack API
    # use it with
    # % aplay foo.wav
    # use this as default
    pcm.!default {
    type plug
    slave { pcm "jack" }
    ctl.mixer0 {
    type hw
    card 1
    # pcm type jack
    pcm.jack {
    type jack
    playback_ports {
    0 system:playback_1
    1 system:playback_2
    capture_ports {
    0 system:capture_1
    1 system:capture_2
    cat: /etc/security/limits.d/audio.conf: No such file or directory
    I have a file called 99-audio.conf
    cat /etc/security/limits.d/99-audio.conf
    @audio - rtprio 99
    @audio - memlock unlimited
    Also i've seen some guys changing this file too:
    cat /etc/security/limits.conf
    # /etc/security/limits.conf
    #Each line describes a limit for a user in the form:
    #<domain> <type> <item> <value>
    #Where:
    #<domain> can be:
    # - an user name
    # - a group name, with @group syntax
    # - the wildcard *, for default entry
    # - the wildcard %, can be also used with %group syntax,
    # for maxlogin limit
    #<type> can have the two values:
    # - "soft" for enforcing the soft limits
    # - "hard" for enforcing hard limits
    #<item> can be one of the following:
    # - core - limits the core file size (KB)
    # - data - max data size (KB)
    # - fsize - maximum filesize (KB)
    # - memlock - max locked-in-memory address space (KB)
    # - nofile - max number of open files
    # - rss - max resident set size (KB)
    # - stack - max stack size (KB)
    # - cpu - max CPU time (MIN)
    # - nproc - max number of processes
    # - as - address space limit (KB)
    # - maxlogins - max number of logins for this user
    # - maxsyslogins - max number of logins on the system
    # - priority - the priority to run user process with
    # - locks - max number of file locks the user can hold
    # - sigpending - max number of pending signals
    # - msgqueue - max memory used by POSIX message queues (bytes)
    # - nice - max nice priority allowed to raise to values: [-20, 19]
    # - rtprio - max realtime priority
    #<domain> <type> <item> <value>
    #* soft core 0
    #* hard rss 10000
    #@student hard nproc 20
    #@faculty soft nproc 20
    #@faculty hard nproc 50
    #ftp hard nproc 0
    #@student - maxlogins 4
    * - rtprio 0
    * - nice 0
    @audio - rtprio 65
    @audio - nice -10
    @audio - memlock unlimited
    jackd 0.121.3
    There are the snaps for QJackCtl
    Also, checkout this stuff that i've recorded with audacity, only from the line and nothing else
    http://ompldr.org/vZ3A2eg
    Thanks!
    Last edited by iamgabo (2012-12-15 02:21:08)

Maybe you are looking for