You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Thom Hehl <th...@nowhereatall.com> on 2006/01/14 21:33:08 UTC

Threads and SocketException

OK, I'm using tomcat and a sevlet to launch a background process in a 
separate thread. It seems to launch just fine, but after it runs for 
maybe 30 seconds it dies, spitting out this error:

java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at 
org.apache.commons.net.telnet.TelnetInputStream.__read(TelnetInputStream.java:114)
    at 
org.apache.commons.net.telnet.TelnetInputStream.run(TelnetInputStream.java:535)
    at java.lang.Thread.run(Unknown Source)

Any ideas as to what may be happening, how I can fix?

Thanks.

Thom Hehl
Heavyweight Software for Heavyweight Needs
www.heavyweightsoftware.com
-- 
"In every revolution, there is one man with a vision."--Jerome Bixby



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Threads and SocketException

Posted by Thom Hehl <th...@nowhereatall.com>.
The issue is that this works just fine when not running inside of 
Tomcat. Any ideas what runing inside of a servlet context-spawned thread 
can cause this kind of error?

Wade Chandler wrote:

>--- Thom Hehl <th...@nowhereatall.com> wrote:
>
>  
>
>>OK, I'm using tomcat and a sevlet to launch a
>>background process in a 
>>separate thread. It seems to launch just fine, but
>>after it runs for 
>>maybe 30 seconds it dies, spitting out this error:
>>
>>java.net.SocketException: Connection reset
>>    at java.net.SocketInputStream.read(Unknown
>>Source)
>>    at java.io.BufferedInputStream.read1(Unknown
>>Source)
>>    at java.io.BufferedInputStream.read(Unknown
>>Source)
>>    at java.io.BufferedInputStream.fill(Unknown
>>Source)
>>    at java.io.BufferedInputStream.read(Unknown
>>Source)
>>    at 
>>
>>    
>>
>org.apache.commons.net.telnet.TelnetInputStream.__read(TelnetInputStream.java:114)
>  
>
>>    at 
>>
>>    
>>
>org.apache.commons.net.telnet.TelnetInputStream.run(TelnetInputStream.java:535)
>  
>
>>    at java.lang.Thread.run(Unknown Source)
>>
>>Any ideas as to what may be happening, how I can
>>fix?
>>
>>Thanks.
>>
>>Thom Hehl
>>Heavyweight Software for Heavyweight Needs
>>www.heavyweightsoftware.com
>>-- 
>>"In every revolution, there is one man with a
>>vision."--Jerome Bixby
>>    
>>
>Well what ever it is has to do with your connecting to
>some service/resource and reading something.  Commons
>net Telnet connections maybe?  What ever it is is
>getting an exception.  I'd start there.  You can also
>debug your application.  Develop in an IDE and step
>through the code giving you an error.  Netbeans and
>Eclipse can help you there.
>
>Wade
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>  
>


Thom Hehl
Heavyweight Software for Heavyweight Needs
www.heavyweightsoftware.com
-- 
"In every revolution, there is one man with a vision."--Jerome Bixby



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Threads and SocketException

Posted by Wade Chandler <hw...@yahoo.com>.
--- Thom Hehl <th...@nowhereatall.com> wrote:

> OK, I'm using tomcat and a sevlet to launch a
> background process in a 
> separate thread. It seems to launch just fine, but
> after it runs for 
> maybe 30 seconds it dies, spitting out this error:
> 
> java.net.SocketException: Connection reset
>     at java.net.SocketInputStream.read(Unknown
> Source)
>     at java.io.BufferedInputStream.read1(Unknown
> Source)
>     at java.io.BufferedInputStream.read(Unknown
> Source)
>     at java.io.BufferedInputStream.fill(Unknown
> Source)
>     at java.io.BufferedInputStream.read(Unknown
> Source)
>     at 
>
org.apache.commons.net.telnet.TelnetInputStream.__read(TelnetInputStream.java:114)
>     at 
>
org.apache.commons.net.telnet.TelnetInputStream.run(TelnetInputStream.java:535)
>     at java.lang.Thread.run(Unknown Source)
> 
> Any ideas as to what may be happening, how I can
> fix?
> 
> Thanks.
> 
> Thom Hehl
> Heavyweight Software for Heavyweight Needs
> www.heavyweightsoftware.com
> -- 
> "In every revolution, there is one man with a
> vision."--Jerome Bixby
Well what ever it is has to do with your connecting to
some service/resource and reading something.  Commons
net Telnet connections maybe?  What ever it is is
getting an exception.  I'd start there.  You can also
debug your application.  Develop in an IDE and step
through the code giving you an error.  Netbeans and
Eclipse can help you there.

Wade

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org