What does the Netiquette imply?
Question about broken pipe
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > Java Programming > Question about broken pipe 8 May 2008 04:52:03

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

Question about broken pipe

Michael Szalay 8 May 2008 04:52:03
 
Hi all

I've got a question about an exception message I often see in the log of my Jetty installation (see stack trace below). Its in a servlet reading a blob out of a database and writing the byte-stream back into the servlet output stream. It works fine, I've never heard any complaints from users. Does
anyone know if this message can be ignored?

Thanks for an answer

Regards

Michael




EOFException(java.n­et.SocketException: Broken pipe)
at org.mortbay.http.Bu­fferedOutputStream.f­lush(BufferedOutputS­tream.java:196)
at org.mortbay.http.Ch­unkingOutputStream.f­lush(ChunkingOutputS­tream.java:69)
at org.mortbay.http.Bu­fferedOutputStream.w­rite(BufferedOutputS­tream.java:143)
at org.mortbay.http.Ht­tpOutputStream.write­(HttpOutputStream.ja­va:438)
at org.mortbay.http.Ht­tpOutputStream.write­(HttpOutputStream.ja­va:430)
at org.mortbay.jetty.s­ervlet.ServletOut.wr­ite(ServletOut.java:­35)
at ImageServlet.proces­sRequest(Unknown Source)
at ImageServlet.doGet(­Unknown Source)
at javax.servlet.http.­HttpServlet.service(­HttpServlet.java:740­)
at javax.servlet.http.­HttpServlet.service(­HttpServlet.java:853­)
at org.mortbay.jetty.s­ervlet.ServletHolder­.handle(ServletHolde­r.java:360)
at org.mortbay.jetty.s­ervlet.WebApplicatio­nHandler.dispatch(We­bApplicationHandler.­java:294)
at org.mortbay.jetty.s­ervlet.ServletHandle­r.handle(ServletHand­ler.java:558)
at org.mortbay.http.Ht­tpContext.handle(Htt­pContext.java:1723)
at org.mortbay.jetty.s­ervlet.WebApplicatio­nContext.handle(WebA­pplicationContext.ja­va:507)
at org.mortbay.http.Ht­tpContext.handle(Htt­pContext.java:1673)
at org.mortbay.http.Ht­tpServer.service(Htt­pServer.java:863)
at org.mortbay.http.Ht­tpConnection.service­(HttpConnection.java­:775)
at org.mortbay.http.Ht­tpConnection.handleN­ext(HttpConnection.j­ava:939)
at org.mortbay.http.Ht­tpConnection.handle(­HttpConnection.java:­792)
at org.mortbay.http.So­cketListener.handleC­onnection(SocketList­ener.java:201)
at org.mortbay.util.Th­readedServer.handle(­ThreadedServer.java:­289)
at org.mortbay.util.Th­readPool$PoolThread.­run(ThreadPool.java:­455)
getTargetException(­):
java.net.SocketExce­ption: Broken pipe
at java.net.SocketOutp­utStream.socketWrite­0(Native Method)
at java.net.SocketOutp­utStream.socketWrite­(SocketOutputStream.­java:92)
at java.net.SocketOutp­utStream.write(Socke­tOutputStream.java:1­36)
at org.mortbay.http.Nu­llableOutputStream.w­rite(NullableOutputS­tream.java:119)
at org.mortbay.util.By­teBufferOutputStream­.writeTo(ByteBufferO­utputStream.java:160­)
at org.mortbay.http.Bu­fferedOutputStream.f­lush(BufferedOutputS­tream.java:192)
at org.mortbay.http.Ch­unkingOutputStream.f­lush(ChunkingOutputS­tream.java:69)
at org.mortbay.http.Bu­fferedOutputStream.w­rite(BufferedOutputS­tream.java:143)
at org.mortbay.http.Ht­tpOutputStream.write­(HttpOutputStream.ja­va:438)
at org.mortbay.http.Ht­tpOutputStream.write­(HttpOutputStream.ja­va:430)
at org.mortbay.jetty.s­ervlet.ServletOut.wr­ite(ServletOut.java:­35)
at ImageServlet.proces­sRequest(Unknown Source)
at ImageServlet.doGet(­Unknown Source)
at javax.servlet.http.­HttpServlet.service(­HttpServlet.java:740­)
at javax.servlet.http.­HttpServlet.service(­HttpServlet.java:853­)
at org.mortbay.jetty.s­ervlet.ServletHolder­.handle(ServletHolde­r.java:360)
at org.mortbay.jetty.s­ervlet.WebApplicatio­nHandler.dispatch(We­bApplicationHandler.­java:294)
at org.mortbay.jetty.s­ervlet.ServletHandle­r.handle(ServletHand­ler.java:558)
at org.mortbay.http.Ht­tpContext.handle(Htt­pContext.java:1723)
at org.mortbay.jetty.s­ervlet.WebApplicatio­nContext.handle(WebA­pplicationContext.ja­va:507)
at org.mortbay.http.Ht­tpContext.handle(Htt­pContext.java:1673)
at org.mortbay.http.Ht­tpServer.service(Htt­pServer.java:863)
at org.mortbay.http.Ht­tpConnection.service­(HttpConnection.java­:775)
at org.mortbay.http.Ht­tpConnection.handleN­ext(HttpConnection.j­ava:939)
at org.mortbay.http.Ht­tpConnection.handle(­HttpConnection.java:­792)
at org.mortbay.http.So­cketListener.handleC­onnection(SocketList­ener.java:201)
at org.mortbay.util.Th­readedServer.handle(­ThreadedServer.java:­289)
at org.mortbay.util.Th­readPool$PoolThread.­run(ThreadPool.java:­455)




-------------------­--------------------­----------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com­/?ad_ide95&alloc_id3­96&op=click
Add comment
Chris Haynes 14 February 2005 20:58:41 permanent link ]
 The big question is...

Is
ImageServlet.proces­sRequest(Unknown Source)
the line that sends the LAST item of data?

I myself would want to get to the bottom of it, to make sure there was no
possibility of data loss.

Are the clients standard Browsers or are they applets?

Is your servlet trying to close the Output stream (it ought not to).

Chris Haynes


----- Original Message -----
From: "Michael Szalay" <michael.szalay@bas­is06.com>
To: <jetty-discuss@list­s.sourceforge.net>
Sent: Monday, February 14, 2005 5:00 PM
Subject: [jetty-discuss] Question about broken pipe



Hi all

I've got a question about an exception message I often see in the log of my
Jetty installation (see stack trace below). Its in a servlet reading a blob out
of a database and writing the byte-stream back into the servlet output stream.
It works fine, I've never heard any complaints from users. Does
anyone know if this message can be ignored?

Thanks for an answer

Regards

Michael




EOFException(java.n­et.SocketException: Broken pipe)
at org.mortbay.http.Bu­fferedOutputStream.f­lush(BufferedOutputS­tream.java:196)
at org.mortbay.http.Ch­unkingOutputStream.f­lush(ChunkingOutputS­tream.java:69)
at org.mortbay.http.Bu­fferedOutputStream.w­rite(BufferedOutputS­tream.java:143)
at org.mortbay.http.Ht­tpOutputStream.write­(HttpOutputStream.ja­va:438)
at org.mortbay.http.Ht­tpOutputStream.write­(HttpOutputStream.ja­va:430)
at org.mortbay.jetty.s­ervlet.ServletOut.wr­ite(ServletOut.java:­35)
at ImageServlet.proces­sRequest(Unknown Source)
at ImageServlet.doGet(­Unknown Source)
at javax.servlet.http.­HttpServlet.service(­HttpServlet.java:740­)
at javax.servlet.http.­HttpServlet.service(­HttpServlet.java:853­)
at org.mortbay.jetty.s­ervlet.ServletHolder­.handle(ServletHolde­r.java:360)
at
org.mortbay.jetty.s­ervlet.WebApplicatio­nHandler.dispatch(We­bApplicationHandler.­j
ava:294)
at org.mortbay.jetty.s­ervlet.ServletHandle­r.handle(ServletHand­ler.java:558)
at org.mortbay.http.Ht­tpContext.handle(Htt­pContext.java:1723)
at
org.mortbay.jetty.s­ervlet.WebApplicatio­nContext.handle(WebA­pplicationContext.ja­v
a:507)
at org.mortbay.http.Ht­tpContext.handle(Htt­pContext.java:1673)
at org.mortbay.http.Ht­tpServer.service(Htt­pServer.java:863)
at org.mortbay.http.Ht­tpConnection.service­(HttpConnection.java­:775)
at org.mortbay.http.Ht­tpConnection.handleN­ext(HttpConnection.j­ava:939)
at org.mortbay.http.Ht­tpConnection.handle(­HttpConnection.java:­792)
at org.mortbay.http.So­cketListener.handleC­onnection(SocketList­ener.java:201)
at org.mortbay.util.Th­readedServer.handle(­ThreadedServer.java:­289)
at org.mortbay.util.Th­readPool$PoolThread.­run(ThreadPool.java:­455)
getTargetException(­):
java.net.SocketExce­ption: Broken pipe
at java.net.SocketOutp­utStream.socketWrite­0(Native Method)
at java.net.SocketOutp­utStream.socketWrite­(SocketOutputStream.­java:92)
at java.net.SocketOutp­utStream.write(Socke­tOutputStream.java:1­36)
at org.mortbay.http.Nu­llableOutputStream.w­rite(NullableOutputS­tream.java:119)
at
org.mortbay.util.By­teBufferOutputStream­.writeTo(ByteBufferO­utputStream.java:160­)
at org.mortbay.http.Bu­fferedOutputStream.f­lush(BufferedOutputS­tream.java:192)
at org.mortbay.http.Ch­unkingOutputStream.f­lush(ChunkingOutputS­tream.java:69)
at org.mortbay.http.Bu­fferedOutputStream.w­rite(BufferedOutputS­tream.java:143)
at org.mortbay.http.Ht­tpOutputStream.write­(HttpOutputStream.ja­va:438)
at org.mortbay.http.Ht­tpOutputStream.write­(HttpOutputStream.ja­va:430)
at org.mortbay.jetty.s­ervlet.ServletOut.wr­ite(ServletOut.java:­35)
at ImageServlet.proces­sRequest(Unknown Source)
at ImageServlet.doGet(­Unknown Source)
at javax.servlet.http.­HttpServlet.service(­HttpServlet.java:740­)
at javax.servlet.http.­HttpServlet.service(­HttpServlet.java:853­)
at org.mortbay.jetty.s­ervlet.ServletHolder­.handle(ServletHolde­r.java:360)
at
org.mortbay.jetty.s­ervlet.WebApplicatio­nHandler.dispatch(We­bApplicationHandler.­j
ava:294)
at org.mortbay.jetty.s­ervlet.ServletHandle­r.handle(ServletHand­ler.java:558)
at org.mortbay.http.Ht­tpContext.handle(Htt­pContext.java:1723)
at
org.mortbay.jetty.s­ervlet.WebApplicatio­nContext.handle(WebA­pplicationContext.ja­v
a:507)
at org.mortbay.http.Ht­tpContext.handle(Htt­pContext.java:1673)
at org.mortbay.http.Ht­tpServer.service(Htt­pServer.java:863)
at org.mortbay.http.Ht­tpConnection.service­(HttpConnection.java­:775)
at org.mortbay.http.Ht­tpConnection.handleN­ext(HttpConnection.j­ava:939)
at org.mortbay.http.Ht­tpConnection.handle(­HttpConnection.java:­792)
at org.mortbay.http.So­cketListener.handleC­onnection(SocketList­ener.java:201)
at org.mortbay.util.Th­readedServer.handle(­ThreadedServer.java:­289)
at org.mortbay.util.Th­readPool$PoolThread.­run(ThreadPool.java:­455)




-------------------­--------------------­----------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com­/?ad_ide95&alloc_id3­96&op=ick
___________________­____________________­________
jetty-discuss mailing list
jetty-discuss@lists­.sourceforge.net
https://lists.sourc­eforge.net/lists/lis­tinfo/jetty-discuss





-------------------­--------------------­----------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com­/?ad_id=6595&alloc_i­d=14396&op=click
Add comment
Michael Szalay 14 February 2005 21:20:15 permanent link ]
 
Yes, the servlet sends all bytes of the response.
Clients are all web browsers.

The servlet does a close() to its OutputStream. Is that a problem (e.g. concerning HTTP 1.1)?

Thanks for the answer.

Regards

Michael



chris@harvington.or­g.uk wrote:
*******************­***********

The big question is...

Is
ImageServlet.proces­sRequest(Unknown Source)
the line that sends the LAST item of data?

I myself would want to get to the bottom of it, to make sure there was no
possibility of data loss.

Are the clients standard Browsers or are they applets?

Is your servlet trying to close the Output stream (it ought not to).

Chris Haynes


----- Original Message -----
From: "Michael Szalay" <michael.szalay@bas­is06.com>
To: <jetty-discuss@list­s.sourceforge.net>
Sent: Monday, February 14, 2005 5:00 PM
Subject: [jetty-discuss] Question about broken pipe



Hi all

I've got a question about an exception message I often see in the log of my
Jetty installation (see stack trace below). Its in a servlet reading a blob out
of a database and writing the byte-stream back into the servlet output stream.
It works fine, I've never heard any complaints from users. Does
anyone know if this message can be ignored?

Thanks for an answer

Regards

Michael




EOFException(java.n­et.SocketException: Broken pipe)
at org.mortbay.http.Bu­fferedOutputStream.f­lush(BufferedOutputS­tream.java:196)
at org.mortbay.http.Ch­unkingOutputStream.f­lush(ChunkingOutputS­tream.java:69)
at org.mortbay.http.Bu­fferedOutputStream.w­rite(BufferedOutputS­tream.java:143)
at org.mortbay.http.Ht­tpOutputStream.write­(HttpOutputStream.ja­va:438)
at org.mortbay.http.Ht­tpOutputStream.write­(HttpOutputStream.ja­va:430)
at org.mortbay.jetty.s­ervlet.ServletOut.wr­ite(ServletOut.java:­35)
at ImageServlet.proces­sRequest(Unknown Source)
at ImageServlet.doGet(­Unknown Source)
at javax.servlet.http.­HttpServlet.service(­HttpServlet.java:740­)
at javax.servlet.http.­HttpServlet.service(­HttpServlet.java:853­)
at org.mortbay.jetty.s­ervlet.ServletHolder­.handle(ServletHolde­r.java:360)
at
org.mortbay.jetty.s­ervlet.WebApplicatio­nHandler.dispatch(We­bApplicationHandler.­j
ava:294)
at org.mortbay.jetty.s­ervlet.ServletHandle­r.handle(ServletHand­ler.java:558)
at org.mortbay.http.Ht­tpContext.handle(Htt­pContext.java:1723)
at
org.mortbay.jetty.s­ervlet.WebApplicatio­nContext.handle(WebA­pplicationContext.ja­v
a:507)
at org.mortbay.http.Ht­tpContext.handle(Htt­pContext.java:1673)
at org.mortbay.http.Ht­tpServer.service(Htt­pServer.java:863)
at org.mortbay.http.Ht­tpConnection.service­(HttpConnection.java­:775)
at org.mortbay.http.Ht­tpConnection.handleN­ext(HttpConnection.j­ava:939)
at org.mortbay.http.Ht­tpConnection.handle(­HttpConnection.java:­792)
at org.mortbay.http.So­cketListener.handleC­onnection(SocketList­ener.java:201)
at org.mortbay.util.Th­readedServer.handle(­ThreadedServer.java:­289)
at org.mortbay.util.Th­readPool$PoolThread.­run(ThreadPool.java:­455)
getTargetException(­):
java.net.SocketExce­ption: Broken pipe
at java.net.SocketOutp­utStream.socketWrite­0(Native Method)
at java.net.SocketOutp­utStream.socketWrite­(SocketOutputStream.­java:92)
at java.net.SocketOutp­utStream.write(Socke­tOutputStream.java:1­36)
at org.mortbay.http.Nu­llableOutputStream.w­rite(NullableOutputS­tream.java:119)
at
org.mortbay.util.By­teBufferOutputStream­.writeTo(ByteBufferO­utputStream.java:160­)
at org.mortbay.http.Bu­fferedOutputStream.f­lush(BufferedOutputS­tream.java:192)
at org.mortbay.http.Ch­unkingOutputStream.f­lush(ChunkingOutputS­tream.java:69)
at org.mortbay.http.Bu­fferedOutputStream.w­rite(BufferedOutputS­tream.java:143)
at org.mortbay.http.Ht­tpOutputStream.write­(HttpOutputStream.ja­va:438)
at org.mortbay.http.Ht­tpOutputStream.write­(HttpOutputStream.ja­va:430)
at org.mortbay.jetty.s­ervlet.ServletOut.wr­ite(ServletOut.java:­35)
at ImageServlet.proces­sRequest(Unknown Source)
at ImageServlet.doGet(­Unknown Source)
at javax.servlet.http.­HttpServlet.service(­HttpServlet.java:740­)
at javax.servlet.http.­HttpServlet.service(­HttpServlet.java:853­)
at org.mortbay.jetty.s­ervlet.ServletHolder­.handle(ServletHolde­r.java:360)
at
org.mortbay.jetty.s­ervlet.WebApplicatio­nHandler.dispatch(We­bApplicationHandler.­j
ava:294)
at org.mortbay.jetty.s­ervlet.ServletHandle­r.handle(ServletHand­ler.java:558)
at org.mortbay.http.Ht­tpContext.handle(Htt­pContext.java:1723)
at
org.mortbay.jetty.s­ervlet.WebApplicatio­nContext.handle(WebA­pplicationContext.ja­v
a:507)
at org.mortbay.http.Ht­tpContext.handle(Htt­pContext.java:1673)
at org.mortbay.http.Ht­tpServer.service(Htt­pServer.java:863)
at org.mortbay.http.Ht­tpConnection.service­(HttpConnection.java­:775)
at org.mortbay.http.Ht­tpConnection.handleN­ext(HttpConnection.j­ava:939)
at org.mortbay.http.Ht­tpConnection.handle(­HttpConnection.java:­792)
at org.mortbay.http.So­cketListener.handleC­onnection(SocketList­ener.java:201)
at org.mortbay.util.Th­readedServer.handle(­ThreadedServer.java:­289)
at org.mortbay.util.Th­readPool$PoolThread.­run(ThreadPool.java:­455)




-------------------­--------------------­----------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com­/?ad_ide95&alloc_id3­96&op=ick
___________________­____________________­________
jetty-discuss mailing list
jetty-discuss@lists­.sourceforge.net
https://lists.sourc­eforge.net/lists/lis­tinfo/jetty-discuss





-------------------­--------------------­----------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com­/?ad_id=6595&alloc_i­d=14396&op=click
___________________­____________________­________
jetty-discuss mailing list
jetty-discuss@lists­.sourceforge.net
https://lists.sourc­eforge.net/lists/lis­tinfo/jetty-discuss



-------------------­--------------------­----------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com­/?ad_ide95&alloc_id3­96&op=click
Add comment
Chris Haynes 14 February 2005 22:29:14 permanent link ]
 Yep, that's it.

Don't close the stream yourself, you don't even need to flush it. Jetty handles
all flushing and closing for you. And, in the case of 1.1 it does not close the
stream after each response.

Chris


"Michael Szalay" replied:


Yes, the servlet sends all bytes of the response.
Clients are all web browsers.

The servlet does a close() to its OutputStream. Is that a problem (e.g.
concerning HTTP 1.1)?

Thanks for the answer.

Regards

Michael



chris@harvington.or­g.uk wrote:
*******************­***********

The big question is...

Is
ImageServlet.proces­sRequest(Unknown Source)
the line that sends the LAST item of data?

I myself would want to get to the bottom of it, to make sure there was no
possibility of data loss.

Are the clients standard Browsers or are they applets?

Is your servlet trying to close the Output stream (it ought not to).

Chris Haynes


----- Original Message -----
From: "Michael Szalay" <michael.szalay@bas­is06.com>
To: <jetty-discuss@list­s.sourceforge.net>
Sent: Monday, February 14, 2005 5:00 PM
Subject: [jetty-discuss] Question about broken pipe



Hi all

I've got a question about an exception message I often see in the log of my
Jetty installation (see stack trace below). Its in a servlet reading a blob out
of a database and writing the byte-stream back into the servlet output stream.
It works fine, I've never heard any complaints from users. Does
anyone know if this message can be ignored?

Thanks for an answer

Regards

Michael




EOFException(java.n­et.SocketException: Broken pipe)
at org.mortbay.http.Bu­fferedOutputStream.f­lush(BufferedOutputS­tream.java:196)
at org.mortbay.http.Ch­unkingOutputStream.f­lush(ChunkingOutputS­tream.java:69)
at org.mortbay.http.Bu­fferedOutputStream.w­rite(BufferedOutputS­tream.java:143)
at org.mortbay.http.Ht­tpOutputStream.write­(HttpOutputStream.ja­va:438)
at org.mortbay.http.Ht­tpOutputStream.write­(HttpOutputStream.ja­va:430)
at org.mortbay.jetty.s­ervlet.ServletOut.wr­ite(ServletOut.java:­35)
at ImageServlet.proces­sRequest(Unknown Source)
at ImageServlet.doGet(­Unknown Source)
at javax.servlet.http.­HttpServlet.service(­HttpServlet.java:740­)
at javax.servlet.http.­HttpServlet.service(­HttpServlet.java:853­)
at org.mortbay.jetty.s­ervlet.ServletHolder­.handle(ServletHolde­r.java:360)
at
org.mortbay.jetty.s­ervlet.WebApplicatio­nHandler.dispatch(We­bApplicationHandler.­j
ava:294)
at org.mortbay.jetty.s­ervlet.ServletHandle­r.handle(ServletHand­ler.java:558)
at org.mortbay.http.Ht­tpContext.handle(Htt­pContext.java:1723)
at
org.mortbay.jetty.s­ervlet.WebApplicatio­nContext.handle(WebA­pplicationContext.ja­v
a:507)
at org.mortbay.http.Ht­tpContext.handle(Htt­pContext.java:1673)
at org.mortbay.http.Ht­tpServer.service(Htt­pServer.java:863)
at org.mortbay.http.Ht­tpConnection.service­(HttpConnection.java­:775)
at org.mortbay.http.Ht­tpConnection.handleN­ext(HttpConnection.j­ava:939)
at org.mortbay.http.Ht­tpConnection.handle(­HttpConnection.java:­792)
at org.mortbay.http.So­cketListener.handleC­onnection(SocketList­ener.java:201)
at org.mortbay.util.Th­readedServer.handle(­ThreadedServer.java:­289)
at org.mortbay.util.Th­readPool$PoolThread.­run(ThreadPool.java:­455)
getTargetException(­):
java.net.SocketExce­ption: Broken pipe
at java.net.SocketOutp­utStream.socketWrite­0(Native Method)
at java.net.SocketOutp­utStream.socketWrite­(SocketOutputStream.­java:92)
at java.net.SocketOutp­utStream.write(Socke­tOutputStream.java:1­36)
at org.mortbay.http.Nu­llableOutputStream.w­rite(NullableOutputS­tream.java:119)
at
org.mortbay.util.By­teBufferOutputStream­.writeTo(ByteBufferO­utputStream.java:160­)
at org.mortbay.http.Bu­fferedOutputStream.f­lush(BufferedOutputS­tream.java:192)
at org.mortbay.http.Ch­unkingOutputStream.f­lush(ChunkingOutputS­tream.java:69)
at org.mortbay.http.Bu­fferedOutputStream.w­rite(BufferedOutputS­tream.java:143)
at org.mortbay.http.Ht­tpOutputStream.write­(HttpOutputStream.ja­va:438)
at org.mortbay.http.Ht­tpOutputStream.write­(HttpOutputStream.ja­va:430)
at org.mortbay.jetty.s­ervlet.ServletOut.wr­ite(ServletOut.java:­35)
at ImageServlet.proces­sRequest(Unknown Source)
at ImageServlet.doGet(­Unknown Source)
at javax.servlet.http.­HttpServlet.service(­HttpServlet.java:740­)
at javax.servlet.http.­HttpServlet.service(­HttpServlet.java:853­)
at org.mortbay.jetty.s­ervlet.ServletHolder­.handle(ServletHolde­r.java:360)
at
org.mortbay.jetty.s­ervlet.WebApplicatio­nHandler.dispatch(We­bApplicationHandler.­j
ava:294)
at org.mortbay.jetty.s­ervlet.ServletHandle­r.handle(ServletHand­ler.java:558)
at org.mortbay.http.Ht­tpContext.handle(Htt­pContext.java:1723)
at
org.mortbay.jetty.s­ervlet.WebApplicatio­nContext.handle(WebA­pplicationContext.ja­v
a:507)
at org.mortbay.http.Ht­tpContext.handle(Htt­pContext.java:1673)
at org.mortbay.http.Ht­tpServer.service(Htt­pServer.java:863)
at org.mortbay.http.Ht­tpConnection.service­(HttpConnection.java­:775)
at org.mortbay.http.Ht­tpConnection.handleN­ext(HttpConnection.j­ava:939)
at org.mortbay.http.Ht­tpConnection.handle(­HttpConnection.java:­792)
at org.mortbay.http.So­cketListener.handleC­onnection(SocketList­ener.java:201)
at org.mortbay.util.Th­readedServer.handle(­ThreadedServer.java:­289)
at org.mortbay.util.Th­readPool$PoolThread.­run(ThreadPool.java:­455)




-------------------­--------------------­----------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com­/?ad_ide95&alloc_id3­96&op=ick
___________________­____________________­________
jetty-discuss mailing list
jetty-discuss@lists­.sourceforge.net
https://lists.sourc­eforge.net/lists/lis­tinfo/jetty-discuss





-------------------­--------------------­----------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com­/?ad_id=6595&alloc_i­d=14396&op=click
___________________­____________________­________
jetty-discuss mailing list
jetty-discuss@lists­.sourceforge.net
https://lists.sourc­eforge.net/lists/lis­tinfo/jetty-discuss



-------------------­--------------------­----------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com­/?ad_ide95&alloc_id3­96&op=ick
___________________­____________________­________
jetty-discuss mailing list
jetty-discuss@lists­.sourceforge.net
https://lists.sourc­eforge.net/lists/lis­tinfo/jetty-discuss





-------------------­--------------------­----------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com­/?ad_id=6595&alloc_i­d=14396&op=click
Add comment
Jian Chen 15 February 2005 06:51:03 permanent link ]
 Hi, Chris,

I also had this issue for a long tme. Thanks for pointing out the
problem. However, I have another question.

In order to optimize the response, I compress the data being sent back
to the browser. So, I have:

out = new GZIPOutputStream(re­sp.getOutputStream()­)
// send the data using out
...
// with gzip'ed stream, we have to close the output stream
//in order for the browser to see the html page
out.close();

So, as you see, I have to call the close() on the GZIP stream. I have
tested using firefox as the browser, if I don't close the GZIP stream,
the browser won't get/render the html sent as compressed.

But, as you mentioned, because of the close() call, I got occasionally
broken pipe in the log. Any thoughts how to tackle this?

Thanks,

Jian

On Mon, 14 Feb 2005 19:29:14 -0000, Chris Haynes
<chris@harvington.o­rg.uk> wrote:> Yep, that's it.>
Don't close the stream yourself, you don't even need to flush it. Jetty handles> all flushing and closing for you. And, in the case of 1.1 it does not close the> stream after each response.>
Chris>


-------------------­--------------------­----------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com­/?ad_id=6595&alloc_i­d=14396&op=click
Add comment
Chris Haynes 15 February 2005 11:07:10 permanent link ]
 FilterOutputStream alwaysOpen =
new FilterOutputStream(­ resp.getOutputStrea­m() ){
public void close(){;}
};

out = new GZIPOutputStream( alwaysOpen );

Chris Haynes



"jian chen" asked:

Hi, Chris,>
I also had this issue for a long tme. Thanks for pointing out the> problem. However, I have another question.>
In order to optimize the response, I compress the data being sent back> to the browser. So, I have:>
out = new GZIPOutputStream(re­sp.getOutputStream()­)> // send the data using out> ...> // with gzip'ed stream, we have to close the output stream> //in order for the browser to see the html page> out.close();>
So, as you see, I have to call the close() on the GZIP stream. I have> tested using firefox as the browser, if I don't close the GZIP stream,> the browser won't get/render the html sent as compressed.>
But, as you mentioned, because of the close() call, I got occasionally> broken pipe in the log. Any thoughts how to tackle this?>
Thanks,>
Jian>
On Mon, 14 Feb 2005 19:29:14 -0000, Chris Haynes> <chris@harvington.o­rg.uk> wrote:> > Yep, that's it.> >
Don't close the stream yourself, you don't even need to flush it. Jetty
handles> > all flushing and closing for you. And, in the case of 1.1 it does not close
stream after each response.> >
Chris> >
-------------------­--------------------­----------------> SF email is sponsored by - The IT Product Guide> Read honest & candid reviews on hundreds of IT Products from real users.> Discover which products truly live up to the hype. Start reading now.> http://ads.osdn.com­/?ad_id=6595&alloc_i­d=14396&op=click> ___________________­____________________­________> jetty-discuss mailing list> jetty-discuss@lists­.sourceforge.net> https://lists.sourc­eforge.net/lists/lis­tinfo/jetty-discuss>­




-------------------­--------------------­----------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com­/?ad_id=6595&alloc_i­d=14396&op=click
Add comment
Mike Baranczak 15 February 2005 18:37:45 permanent link ]
 From the javadocs for GZIPOutputStream:

public void finish()
throws IOException
Finishes writing compressed data to the output stream without closing
the underlying stream. Use this method when applying multiple filters
in succession to the same output stream.



On Feb 14, 2005, at 10:51 PM, jian chen wrote:
Hi, Chris,>
I also had this issue for a long tme. Thanks for pointing out the> problem. However, I have another question.>
In order to optimize the response, I compress the data being sent back> to the browser. So, I have:>
out = new GZIPOutputStream(re­sp.getOutputStream()­)> // send the data using out> ...> // with gzip'ed stream, we have to close the output stream> //in order for the browser to see the html page> out.close();>
So, as you see, I have to call the close() on the GZIP stream. I have> tested using firefox as the browser, if I don't close the GZIP stream,> the browser won't get/render the html sent as compressed.>
But, as you mentioned, because of the close() call, I got occasionally> broken pipe in the log. Any thoughts how to tackle this?>
Thanks,>
Jian>
On Mon, 14 Feb 2005 19:29:14 -0000, Chris Haynes> <chris@harvington.o­rg.uk> wrote:>> Yep, that's it.>>
Don't close the stream yourself, you don't even need to flush it. >> Jetty handles>> all flushing and closing for you. And, in the case of 1.1 it does >> not close the>> stream after each response.>>
Chris>>
-------------------­--------------------­----------------> SF email is sponsored by - The IT Product Guide> Read honest & candid reviews on hundreds of IT Products from real > users.> Discover which products truly live up to the hype. Start reading now.> http://ads.osdn.com­/?ad_id=6595&alloc_i­d=14396&op=click> ___________________­____________________­________> jetty-discuss mailing list> jetty-discuss@lists­.sourceforge.net> https://lists.sourc­eforge.net/lists/lis­tinfo/jetty-discuss>­



-------------------­--------------------­----------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com­/?ad_id=6595&alloc_i­d=14396&op=click
Add comment
Guest 8 May 2008 04:52:03 permanent link ]
 can anybody pleasemention hs the problem got resolved by not closing the stream yourself.
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > Java Programming > Question about broken pipe 8 May 2008 04:52:03

see also:
regarding books
I NEED A GOOD PROJECT
automake and autoconf
пройди тесты:
see also:
ONE VERSE THAT MADE ME LOVE MY SISTER…
HERE IS A STORY OF OUR LIVES!!!
THE FIRST TIME I MADE MY SISTER PROUD…

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .