Interesting, and I can understand why exceptions (and FAQ) like this...go unanswered for years.
I think I have seen this exception in the past, since my app was dependent on a Verizon 4G wireless internet connection (something that CEO wanted and was proud to have, until myself and another personnel asked for a more stable/faster internet connection...we went with Cox@Business). Anyway, I saw socket exceptions, because my app has @Schedule which will make IMAP connection to email server, and download emails from email server (GMAIL). Now, that I have a better internet connection, I 'rarely' see socket connections related to IMAP connection from my app to GMAIL. I saw an IMAP connection error in the log 1 or 2 days ago, but that was first time in a long time. Definitely some type of (lack of) connection issue. Also, my app pushes data to Google Calendar via Google Calendar API (REST web service, I think), and keeps Google Calendar up-to-date with data in database, as endusers add/modify/delete (calendar-based/related) data. Anyway, Google Calendar API returns a 503 error, which is some type of 'service not available' or 'server error'. I have experienced this error a lot, at different times, and since I have tweaked/improved my exception handling in my app, I and the endusers are more aware when this issue occurs. At first, this error bugged me, because I had MDBs that were not initialized properly (per message), and the error would persist, even though there was really no error. Every time an MDB would be queued to update google calendar with some data, error would persist in the log and a message that is pushed to endusers. Since the MDB was pooled and pulled from the pool and reused by my app, I just had to initialize the MDB onMessage(). So, after that minor-and-major fix, I started seeing that Google Calendar API 503 error occurs quite often. Google Calendar API requires you to renew your connection or reconnect via oAuth2 every 1 hour, and my app is doing that, but I am recognizing that 503 error seem to occur 10 to 15 minutes prior to the 1 hour 'mark' that the app needs to reconnect via oAuth2. My apologies, if my response is off-topic, but seems to be related, and I think you are doing well to ensure your app works around these idiosynchrasies (or network connection issues). I am doing the same. I append data back to the queue, when I experience network connection issues like this. On Tue, Apr 23, 2013 at 4:05 AM, SuoNayi <suonayi2...@163.com> wrote: > Seems this is a real FAQ but never gets answered. > > http://stackoverflow.com/questions/62929/java-net-socketexception-connection-reset > > > > > At 2013-04-23 15:26:21,Prashant <prash...@in.ibm.com> wrote: > >We are frequently getting 'java.net.SocketException' in ActiveMQ logs. > Aftr > >that the number of consumer becomes 0 and message becomes pending. > >java.net.SocketException: Connection reset | > >org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ > >Transport: tcp:///10.51.19.88:2855 > > > >Our Client is configured such that when it gets any asynchronous Exception > >from JMS Server, it reconnects after 20 minutes. So after 20 minutes again > >number of consumer becomes 1 and the messages pending in the ActiveMQ > queue > >get transported to Client. > > > >We are not sure what is causing connection to get reset. Is it Firewall? > If > >yes is it Firewall from broker side or from client side? > > > >Or any router in between is causing the connection to be dropped? > > > >We will appreciate any valuable input. > > > > > > > > > > > >-- > >View this message in context: > http://activemq.2283324.n4.nabble.com/Getting-java-net-SocketException-in-ActiveMQ-logs-frequently-tp4666138.html > >Sent from the ActiveMQ - User mailing list archive at Nabble.com. >