Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > terrible java.net.SocketException: Broken pipe, please HELP!!

Reply
Thread Tools

terrible java.net.SocketException: Broken pipe, please HELP!!

 
 
Tomas Penc
Guest
Posts: n/a
 
      10-23-2003
Hi folks,

lot of days we have problems with SocketException, thrown once per
several hours on our TCP connection (thrown in client socket) and cannot
overcome it. (( We already tried to find something elsewhere on web,
but it never worked out. So, please help, if you can...

We have a Socket connected over TCP and 2 threads: one reads constantly
from the socket (blocking read), one writes data time to time. The
application runs on Tomcat4.1 under Linux, Java 1.4.1. Once per several
hours the following exception is thrown while writing to socket:

java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutp utStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStre am.java:136)
at
java.io.BufferedOutputStream.flushBuffer(BufferedO utputStream.java:69)
at
java.io.BufferedOutputStream.flush(BufferedOutputS tream.java:127)
....

(We also tried it without BufferedOutputStream.)

We will be thankful for every useful comment.

regards,
Tomas Penc

 
Reply With Quote
 
 
 
 
Matt Humphrey
Guest
Posts: n/a
 
      10-23-2003

"Tomas Penc" <(E-Mail Removed)> wrote in message
news:bn8abd$i13$(E-Mail Removed)...
> Hi folks,
>
> lot of days we have problems with SocketException, thrown once per
> several hours on our TCP connection (thrown in client socket) and cannot
> overcome it. (( We already tried to find something elsewhere on web,
> but it never worked out. So, please help, if you can...
>
> We have a Socket connected over TCP and 2 threads: one reads constantly
> from the socket (blocking read), one writes data time to time. The
> application runs on Tomcat4.1 under Linux, Java 1.4.1. Once per several
> hours the following exception is thrown while writing to socket:
>
> java.net.SocketException: Broken pipe
> at java.net.SocketOutputStream.socketWrite0(Native Method)
> at
> java.net.SocketOutputStream.socketWrite(SocketOutp utStream.java:92)
> at java.net.SocketOutputStream.write(SocketOutputStre am.java:136)
> at
> java.io.BufferedOutputStream.flushBuffer(BufferedO utputStream.java:69)
> at
> java.io.BufferedOutputStream.flush(BufferedOutputS tream.java:127)
> ...
>
> (We also tried it without BufferedOutputStream.)
>
> We will be thankful for every useful comment.


Is the socket in use the entire time? Sockets will timeout and disconnect by
themselves when idle after about 2 hours.

Cheers,
Matt Humphrey http://www.velocityreviews.com/forums/(E-Mail Removed) http://www.iviz.com/


 
Reply With Quote
 
 
 
 
Tomas Penc
Guest
Posts: n/a
 
      10-23-2003
Matt Humphrey wrote:
> Is the socket in use the entire time? Sockets will timeout and disconnect by
> themselves when idle after about 2 hours.


Yes, there is usually lot of traffic and we are also sending keep-alives
every couple of minutes.

regards,
Tomas

 
Reply With Quote
 
EJP
Guest
Posts: n/a
 
      10-24-2003
If you get this you have to assume that the target has closed the socket
prematurely and react accordingly. Whether this is actually true is
another matter, it can be an artefact of transient network conditions,
but the effect is the same.

Tomas Penc wrote:
>
> Hi folks,
>
> lot of days we have problems with SocketException, thrown once per
> several hours on our TCP connection (thrown in client socket) and cannot
> overcome it. (( We already tried to find something elsewhere on web,
> but it never worked out. So, please help, if you can...
>
> We have a Socket connected over TCP and 2 threads: one reads constantly
> from the socket (blocking read), one writes data time to time. The
> application runs on Tomcat4.1 under Linux, Java 1.4.1. Once per several
> hours the following exception is thrown while writing to socket:
>
> java.net.SocketException: Broken pipe
> at java.net.SocketOutputStream.socketWrite0(Native Method)
> at
> java.net.SocketOutputStream.socketWrite(SocketOutp utStream.java:92)
> at java.net.SocketOutputStream.write(SocketOutputStre am.java:136)
> at
> java.io.BufferedOutputStream.flushBuffer(BufferedO utputStream.java:69)
> at
> java.io.BufferedOutputStream.flush(BufferedOutputS tream.java:127)
> ...
>
> (We also tried it without BufferedOutputStream.)
>
> We will be thankful for every useful comment.
>
> regards,
> Tomas Penc

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Logitechs terrible customer support Please read before buying anything Logitech Hugh Tyler Windows 64bit 5 08-23-2006 06:54 PM
Designing on VS.2003 is terrible =?Utf-8?B?xZ5lbm9sIEFrYnVsYWs=?= ASP .Net 6 03-18-2005 06:28 PM
Terrible behaviour of Cisco 5200! Neshat Cisco 4 08-19-2004 08:54 AM
TERRIBLE BUG IN ASP SERVER!!! Dannie Juge ASP .Net 4 12-19-2003 08:27 PM
resizing image has terrible quality neverstill ASP .Net 6 12-17-2003 08:45 PM



Advertisments