uncaught SocketException in AbstractBaseService

0 views
Skip to first unread message

Chris Liebman

unread,
Aug 8, 2008, 11:45:29 AM8/8/08
to David Kavanagh, lifegu...@googlegroups.com
David,
This should be one of the retry-able exceptions and be caught
where SocketTimeoutException is.

ERROR [com.directthought.lifeguard.AbstractBaseService] Something
unexpected happened in the kwscore service
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at
com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
at
com.sun.net.ssl.internal.ssl.InputRecord.readV3Record(InputRecord.java:
405)
at
com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:360)
at
com
.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:
782)
at
com
.sun
.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:
739)
at
com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:
254)
at java.io.BufferedInputStream.read(BufferedInputStream.java:
313)
at
org
.apache
.commons
.httpclient
.ContentLengthInputStream.read(ContentLengthInputStream.java:170)
at java.io.FilterInputStream.read(FilterInputStream.java:111)
at
org
.apache
.commons
.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:108)
at
org
.jets3t
.service
.io.InterruptableInputStream.read(InterruptableInputStream.java:72)
at
org
.jets3t
.service
.impl
.rest
.httpclient
.HttpMethodReleaseInputStream.read(HttpMethodReleaseInputStream.java:
123)
at java.io.InputStream.read(InputStream.java:89)
at
com
.directthought
.lifeguard.AbstractBaseService.run(AbstractBaseService.java:159)
at com.pm.service.kwtool.RunService.main(RunService.java:56)

I am tempted to re-factor AbstractBaseService a bit, we have have a
number of implementations where being able to modify the behavior of
small parts without have to maintain an essentially complete copy of
the file. Have you any plans along these lines? One that would be
particularly handy would be to be able to easily disable the fetching
of the instance id, as this can take a few minutes to timeout and we
do run 1 service outside of ec2....

-- Chris

David Kavanagh

unread,
Aug 8, 2008, 2:23:17 PM8/8/08
to Chris Liebman, lifegu...@googlegroups.com
Hi Chris,
I'm working in AbstractBaseService a little right now. After some
testing, I'll commit it. I can see disabling the instance id check.
I'd rather have something the code checks to override the instance ID.
That would allow you to make a config setting. I usually set the
retries to 1 for local testing, but that, admittedly is a bit of a
hack.
On the Connection Reset problem, I saw that also. In fact, I recorded
the stack trace last December. Let me see if I've addressed that in
any way. I think it's just another thing that ought to be caught and
handled properly.

I added instance monitoring to the PoolManager. So, now, it will ping
instances and if they remain unreachable for an amount of time, they
will be terminated and replaced. I'm testing that also, and hope to
commit it shortly.

David

On Fri, Aug 8, 2008 at 11:45 AM, Chris Liebman <cbli...@gmail.com> wrote:
> David,
> This should be one of the retry-able exceptions and be caught where
> SocketTimeoutException is.
>
> ERROR [com.directthought.lifeguard.AbstractBaseService] Something unexpected
> happened in the kwscore service
> java.net.SocketException: Connection reset
> at java.net.SocketInputStream.read(SocketInputStream.java:168)
> at
> com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
> at
> com.sun.net.ssl.internal.ssl.InputRecord.readV3Record(InputRecord.java:405)
> at
> com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:360)
> at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:782)
> at

> com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:739)


> at
> com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
> at java.io.BufferedInputStream.read1(BufferedInputStream.java:254)
> at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
> at

> org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:170)


> at java.io.FilterInputStream.read(FilterInputStream.java:111)
> at
> org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:108)
> at
> org.jets3t.service.io.InterruptableInputStream.read(InterruptableInputStream.java:72)
> at

> org.jets3t.service.impl.rest.httpclient.HttpMethodReleaseInputStream.read(HttpMethodReleaseInputStream.java:123)
> at java.io.InputStream.read(InputStream.java:89)
> at
> com.directthought.lifeguard.AbstractBaseService.run(AbstractBaseService.java:159)

Reply all
Reply to author
Forward
0 new messages