You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Howard W. Smith, Jr." <sm...@gmail.com> on 2013/04/13 01:13:14 UTC
java.net.SocketTimeoutException: Read timed out
After reading antoine philippe chaker's last email/post, that motivated me
to pose a question as well.
I am using Tomcat 7.0.39 (via TomEE 1.6.0 snapshot), Atmosphere 1.0.13
(snapshot...recently downloaded within the last week), and OmniFaces Gzip
filter, and Google Calendar API (v3).
A bit of background... hmmm, some weeks ago, I started using tomcat 7.0.39
along with google calendar API (v3) and Atmosphere 1.0.12, and I'm sure
requests to google calendar is about the same. Recently, I added Atmosphere
1.0.13, and I started experiencing issues related to adding events on
google calendar from my app.
Now, I'm sure, I could revert back to Atmosphere 1.0.12, and see how that
works for next few days. Also, I could check to make sure that there has
been no internet connection downtime to/for the server, especially when
these issues are occurring.
At any rate, the log seems to only record one exception, and then it seems
as though all subsequent attempts/requests (to google calendar) are failing
with some exception that is not being recorded in the logs. 3 or 4 days
ago, there was a different exception, but they both seemed somewhat related
to (JSON) http response.
The first time I experienced an issue, the exception started here (my code
is the last line below)
at
com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:159)
at
com.google.api.client.googleapis.json.GoogleJsonResponseException.execute(GoogleJsonResponseException.java:203)
at
com.google.api.client.googleapis.services.GoogleClient.executeUnparsed(GoogleClient.java:237)
at
com.google.api.client.http.json.JsonHttpRequest.executeUnparsed(JsonHttpRequest.java:207)
at
com.google.api.services.calendar.Calendar$Events$Insert.execute(Calendar.java:2775)
at
utils.googleCalendar.GoogleCalendarUtil.addEventToCalendar(GoogleCalendarUtil.java:134)
and then today, i experienced a different issue/exception (my code is the
last line below)
at com.google.api.client.http.HttpResponse.getContent(HttpResponse.java:380)
at
com.google.api.client.http.json.JsonHttpParser.parserForResponse(JsonHttpParser.java:118)
at
com.google.api.client.http.json.JsonHttpParser.parse(JsonHttpParser.java:90)
at com.google.api.client.http.HttpResponse.parseAs(HttpResponse.java:499)
at
com.google.api.services.calendar.Calendar$Events$Insert.execute(Calendar.java:2776)
at
utils.googleCalendar.GoogleCalendarUtil.addEventToCalendar(GoogleCalendarUtil.java:134)
The stack trace below is the exception that occurred today. Does this look
like a tomcat or google calendar issue? google calendar API has usage
limits, so I am leaning toward google calendar API, but please advise.
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.InputRecord.readFully(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
at sun.security.ssl.AppInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at sun.net.www.MeteredStream.read(Unknown Source)
at java.io.FilterInputStream.read(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown
Source)
at java.util.zip.CheckedInputStream.read(Unknown Source)
at java.util.zip.GZIPInputStream.readUByte(Unknown Source)
at java.util.zip.GZIPInputStream.readUShort(Unknown Source)
at java.util.zip.GZIPInputStream.readHeader(Unknown Source)
at java.util.zip.GZIPInputStream.<init>(Unknown Source)
at java.util.zip.GZIPInputStream.<init>(Unknown Source)
at com.google.api.client.http.HttpResponse.getContent(HttpResponse.java:380)
at
com.google.api.client.http.json.JsonHttpParser.parserForResponse(JsonHttpParser.java:118)
at
com.google.api.client.http.json.JsonHttpParser.parse(JsonHttpParser.java:90)
at com.google.api.client.http.HttpResponse.parseAs(HttpResponse.java:499)
at
com.google.api.services.calendar.Calendar$Events$Insert.execute(Calendar.java:2776)
at
utils.googleCalendar.GoogleCalendarUtil.addEventToCalendar(GoogleCalendarUtil.java:134)
at
utils.googleCalendar.GoogleCalendarUtil.deleteAndAddEvents(GoogleCalendarUtil.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
at org.apache.openejb.cdi.CdiInterceptor.invoke(CdiInterceptor.java:130)
at org.apache.openejb.cdi.CdiInterceptor.access$000(CdiInterceptor.java:43)
at org.apache.openejb.cdi.CdiInterceptor$1.call(CdiInterceptor.java:67)
at
org.apache.openejb.cdi.CdiInterceptor.aroundInvoke(CdiInterceptor.java:73)
at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
at
org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:180)
at
org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:99)
at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
at
org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:138)
at
org.apache.openejb.core.singleton.SingletonContainer._invoke(SingletonContainer.java:233)
at
org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:200)
at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.synchronizedBusinessMethod(EjbObjectProxyHandler.java:256)
at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:251)
at
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:85)
at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:302)
at
utils.googleCalendar.GoogleCalendarUtil$LocalBeanProxy.deleteAndAddEvents(utils/googleCalendar/GoogleCalendarUtil.java)
at pf.ApplicationScopeBean.deleteAndAddEvents(ApplicationScopeBean.java:220)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.webbeans.intercept.InterceptorHandler.invoke(InterceptorHandler.java:322)
at
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:117)
at
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:108)
at
pf.ApplicationScopeBean_$$_javassist_0.deleteAndAddEvents(ApplicationScopeBean_$$_javassist_0.java)
at
mdb.GoogleCalendarMessage.deleteAndAddEventsOnDate(GoogleCalendarMessage.java:193)
at mdb.GoogleCalendarMessage.onMessage(GoogleCalendarMessage.java:72)
at sun.reflect.GeneratedMethodAccessor914.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
at org.apache.openejb.cdi.CdiInterceptor.invoke(CdiInterceptor.java:130)
at org.apache.openejb.cdi.CdiInterceptor.access$000(CdiInterceptor.java:43)
at org.apache.openejb.cdi.CdiInterceptor$1.call(CdiInterceptor.java:67)
at
org.apache.openejb.cdi.CdiInterceptor.aroundInvoke(CdiInterceptor.java:73)
at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
at
org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:180)
at
org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:99)
at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
at
org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:138)
at org.apache.openejb.core.mdb.MdbContainer._invoke(MdbContainer.java:416)
at org.apache.openejb.core.mdb.MdbContainer.invoke(MdbContainer.java:387)
at
org.apache.openejb.core.mdb.EndpointHandler.deliverMessage(EndpointHandler.java:227)
at
org.apache.openejb.core.mdb.EndpointHandler.invoke(EndpointHandler.java:168)
at
mdb.GoogleCalendarMessage$LocalBeanProxy.onMessage(mdb/GoogleCalendarMessage.java)
at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:123)
at
org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:64)
at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:861)
at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:169)
at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:366)
at
org.apache.geronimo.connector.work.pool.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Thanks,
Howard
Re: java.net.SocketTimeoutException: Read timed out
Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
On Fri, Apr 12, 2013 at 8:02 PM, Howard W. Smith, Jr. <
smithh032772@gmail.com> wrote:
>
> On Fri, Apr 12, 2013 at 7:25 PM, Caldarale, Charles R <
> Chuck.Caldarale@unisys.com> wrote:
>
>> > From: Howard W. Smith, Jr. [mailto:smithh032772@gmail.com]
>> > Subject: java.net.SocketTimeoutException: Read timed out
>>
>> > The stack trace below is the exception that occurred today. Does this
>> look
>> > like a tomcat or google calendar issue?
>>
>> It has nothing to do with Tomcat; it's your webapp that opened the
>> connection to Google - Tomcat is completely unaware of it. Whether it's a
>> Google limitation or a bug in your webapp can't be determined from just the
>> stack trace. Best if you could get a network traffic capture for the
>> incident and see if the request to Google is malformed, which might well
>> result in the Google server ignoring it.
>>
>> - Chuck
>>
>>
>
I tweaked the google calendar exception-handling code, a bit, and
downloaded Wireshark. The next time it happens, I should be ready to
debug/troubleshoot.
I should have mentioned last time, that to workaround/resolve the issue, I
stop tomee/tomcat, restart, and I run the utility within the webapp which
can do 'manual' updates/pushes to google calendar. that 'always' works...
so, based on that, i am under the assumption that the webapp is not to be
blamed for the exceptions that I'm experiencing...over time, but I'm
(still) considering all what you said and recommended though.
May not be to the best interest of Atmosphere committer, but I reverted
back to Atmosphere 1.0.12 (even though Atmosphere 1.0.13 snapshot seems to
have some good/valid fixes, that don't seem so applicable to me and my use
case), as I found that/1.0.12 as a stable release, and I experienced no
issues. If I experience this issue again, it is time to revert to tomcat
7.0.37 and/or 7.0.35, after diving into Wireshark, while the issue is
occurring.
Hmmm, i think i remember someone posting an issue with their 'tomcat5'
after windows did an automatic update on their machine (I assume, as it did
on mine that same morning), but I forgot what was the person's issue and if
issue was resolved. I know...I'd have to search the archives or recent
history, since it was earlier this week. :)
just trying to think out loud of all the 'changes' that occurred. it is
clearly not a data issue (since a restart of tomcat and running my 'manual
google calendar update' utility updates google calendar, successfully, with
the same data that was attempted to be pushed via @Schedule and MDB), and i
am not convinced (yet) that my app is to blame, but my app consists of
any/all dependencies that I'm using...including tomee/tomcat. :)
one of the tomee committer has advised me to use @Asynchronous instead of
JMS/ActiveMQ. considering that, but i really don't feel the JMS/ActiveMQ is
'broke'... so, if it ain't broke, don't fix it.
Re: java.net.SocketTimeoutException: Read timed out
Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
On Fri, Apr 12, 2013 at 7:25 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:
> > From: Howard W. Smith, Jr. [mailto:smithh032772@gmail.com]
> > Subject: java.net.SocketTimeoutException: Read timed out
>
> > The stack trace below is the exception that occurred today. Does this
> look
> > like a tomcat or google calendar issue?
>
> It has nothing to do with Tomcat; it's your webapp that opened the
> connection to Google - Tomcat is completely unaware of it. Whether it's a
> Google limitation or a bug in your webapp can't be determined from just the
> stack trace. Best if you could get a network traffic capture for the
> incident and see if the request to Google is malformed, which might well
> result in the Google server ignoring it.
>
> - Chuck
>
>
I agree, Chuck. Honestly, I didn't think it was my app, but your response
lead me to believe that I may need to take a closer look at the (data I'm
sending in the) request. I know that I'm sending google-maps URLs in the
google calendar event description, and that may lead to this exception
(should have provided that earlier).
com.google.api.client.googleapis.json.GoogleJsonResponseException: 503
Service Unavailable
{
"code" : 503,
"errors" : [ {
"domain" : "global",
"message" : "Backend Error",
"reason" : "backendError"
} ],
"message" : "Backend Error"
}
at
com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:159)
at
com.google.api.client.googleapis.json.GoogleJsonResponseException.execute(GoogleJsonResponseException.java:203)
at
com.google.api.client.googleapis.services.GoogleClient.executeUnparsed(GoogleClient.java:237)
at
com.google.api.client.http.json.JsonHttpRequest.executeUnparsed(JsonHttpRequest.java:207)
at
com.google.api.services.calendar.Calendar$Events$Insert.execute(Calendar.java:2775)
at
utils.googleCalendar.GoogleCalendarUtil.addEventToCalendar(GoogleCalendarUtil.java:134)
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail and
> its attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: java.net.SocketTimeoutException: Read timed out
Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
On Fri, Apr 12, 2013 at 7:45 PM, antoine philippe chaker <
philippe.chaker@gmail.com> wrote:
> I think that Chuck is right : it has nothing to do with Tomcat, it's more a
> problem of communication between your webapp and the Google API.
>
>
Agreed. :)
Re: java.net.SocketTimeoutException: Read timed out
Posted by antoine philippe chaker <ph...@gmail.com>.
I think that Chuck is right : it has nothing to do with Tomcat, it's more a
problem of communication between your webapp and the Google API.
2013/4/12 Caldarale, Charles R <Ch...@unisys.com>
> > From: Howard W. Smith, Jr. [mailto:smithh032772@gmail.com]
> > Subject: java.net.SocketTimeoutException: Read timed out
>
> > The stack trace below is the exception that occurred today. Does this
> look
> > like a tomcat or google calendar issue?
>
> It has nothing to do with Tomcat; it's your webapp that opened the
> connection to Google - Tomcat is completely unaware of it. Whether it's a
> Google limitation or a bug in your webapp can't be determined from just the
> stack trace. Best if you could get a network traffic capture for the
> incident and see if the request to Google is malformed, which might well
> result in the Google server ignoring it.
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail and
> its attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
--
CHAKER Antoine Philippe Chekry
Ingénieur Informaticien / Software Engineer
Cote d'Ivoire / Ivory Coast
Afrique de l'Ouest / West Africa
*
*
RE: java.net.SocketTimeoutException: Read timed out
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Howard W. Smith, Jr. [mailto:smithh032772@gmail.com]
> Subject: java.net.SocketTimeoutException: Read timed out
> The stack trace below is the exception that occurred today. Does this look
> like a tomcat or google calendar issue?
It has nothing to do with Tomcat; it's your webapp that opened the connection to Google - Tomcat is completely unaware of it. Whether it's a Google limitation or a bug in your webapp can't be determined from just the stack trace. Best if you could get a network traffic capture for the incident and see if the request to Google is malformed, which might well result in the Google server ignoring it.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org