Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DFC764728 for ; Mon, 9 May 2011 09:13:12 +0000 (UTC) Received: (qmail 71346 invoked by uid 500); 9 May 2011 09:13:12 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 71309 invoked by uid 500); 9 May 2011 09:13:12 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 71301 invoked by uid 99); 9 May 2011 09:13:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 09:13:12 +0000 X-ASF-Spam-Status: No, hits=3.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_BRBL_LASTEXT,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [87.117.246.105] (HELO ganesha.artcore.com) (87.117.246.105) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2011 09:13:05 +0000 Received: from mail-yw0-f45.google.com ([209.85.213.45]) by ganesha.artcore.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.69) (envelope-from ) id 1QJMWC-0007Dm-77 for users@camel.apache.org; Mon, 09 May 2011 10:12:44 +0100 Received: by ywl41 with SMTP id 41so2114001ywl.32 for ; Mon, 09 May 2011 02:12:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.105.195 with SMTP id k43mr7600246yhg.389.1304932361084; Mon, 09 May 2011 02:12:41 -0700 (PDT) Received: by 10.236.47.226 with HTTP; Mon, 9 May 2011 02:12:41 -0700 (PDT) In-Reply-To: References: Date: Mon, 9 May 2011 10:12:41 +0100 Message-ID: Subject: Re: Camel route stops sending messages From: Tom Howe To: users@camel.apache.org Content-Type: multipart/alternative; boundary=002354447931d69ec404a2d43d36 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ganesha.artcore.com X-AntiAbuse: Original Domain - camel.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - artcore.com X-Virus-Checked: Checked by ClamAV on apache.org --002354447931d69ec404a2d43d36 Content-Type: text/plain; charset=ISO-8859-1 What do you mean by propagates to file and point? We do actually have an error handler - the previous route I posted was just a summary. Below is the full config for the 2 camel contexts in the app. The first is for the main message routing, the 2nd is for the heartbeat. The app sends messages to splunk and a heartbeart to an activeMQ. The symptons we are finding is that occasionally, the application completely stops sending messages. The log which normally shows both messages being sent suddendly quietens down and only shows the heartbeat messages (even though they are not arriving either). After a restart it continues fine. The exceptions found in the log that I previously pasted do not coincide with the time at which it stops so may be a red herring. This application runs on quite heavily loaded VMs. We wonder if it could be due to memory issues as other applications on the box have died due to running out of memory. /*[starts-with(@name, 'wfe.')] /*[local-name() = "event"][./*/*[local-name() = "ispy-event"]] On Mon, May 9, 2011 at 9:49 AM, Filippo Balicchia wrote: > If there is no explicit error handling the default error i triggered, > and the exception is propagates it back to the caller. > In your case seems to have network error then then error is propagates > to file and point. > > To resolve your problem i just add 'delay' parameter on your > expression. With this parameter you instruct camel > to wait milliseconds before the next poll of the file/directory > > Cheers. > > --Filippo > > > 2011/5/8 Tom Howe : > > Most of the messages are flowing to splunk fine. A few are failing to get > > through - possibly we are flooding splunk - hence those errors. > > But what I dont understand is why the process then stops processing any > more > > messages. > > > > > > On Sun, May 8, 2011 at 6:07 AM, Filippo Balicchia >wrote: > > > >> Does your splunk accept you connection ? > >> > >> From stacktrace seems that refused your connection > >> > >> > >> 2011-05-07 12:41:47.042077500 Caused by: java.net.ConnectException: > >> Connection refused2011-05-07 12:41:47.042078500 at > >> > >> > >> --Filippo > >> > >> > >> 2011/5/7 Tom Howe : > >> > I have a simple java app that collect files of disk, converts the > [json] > >> > contents and then forwards it to a splunk instance over tcp using > mina. > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > input.endpoint = > >> > file:/dir/to/files?delete=true&recursive=true&maxMessagesPerPoll=500 > >> > output.endpoint = > >> > mina:tcp://splunkhost/?textline=true&textlineDelimiter=UNIX&sync=false > >> > > >> > It also emits a heartbeat message every minute over JMS using camel > >> quartz > >> > endpoint. > >> > > >> > The problem I am having is that after about a day of running, the > process > >> > stops picking up files and sending them to splunk and stops sending > the > >> > heartbeat JMS messages. However, the log is still showing that it is > >> > emitting messages. > >> > > >> > It's like the camel routes have just stopped working properly but I > have > >> no > >> > idea why. > >> > > >> > > >> > I see a bunch of these exceptions in the log like the following.. > which > >> is > >> > suggesting it is failing to connect to splunk sometimes. > >> > > >> > 2011-05-07 12:41:50.457659500 2011-05-07 13:41:50,456 [Camel (main) > >> thread > >> > #0 - file:///home/wfe/var/ispy/events] ERROR > >> > org.apache.camel.processor.DeadLetterChannel - Failed delivery for > >> > exchangeId: ID-vp-prod-wfe-a-61766-1304769141692-0-95088. Exhausted > after > >> > delivery attempt: 11 caught: > org.apache.mina.common.RuntimeIOException: > >> > Failed to get the session.. Processed by failure processor: > >> > sendTo(Endpoint[activemq://splunk.error] InOnly) > >> > 2011-05-07 12:41:50.457664500 > org.apache.mina.common.RuntimeIOException: > >> > Failed to get the session. > >> > 2011-05-07 12:41:50.457952500 at > >> > > >> > org.apache.mina.common.support.DefaultConnectFuture.getSession(DefaultConnectFuture.java:63) > >> > 2011-05-07 12:41:50.457953500 at > >> > > >> > org.apache.camel.component.mina.MinaProducer.openConnection(MinaProducer.java:211) > >> > 2011-05-07 12:41:50.457954500 at > >> > > >> > org.apache.camel.component.mina.MinaProducer.process(MinaProducer.java:80) > >> > 2011-05-07 12:41:50.457955500 at > >> > > >> > org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50) > >> > 2011-05-07 12:41:50.457963500 at > >> > > >> > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77) > >> > 2011-05-07 12:41:50.457964500 at > >> > > >> > org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104) > >> > ..snip.. > >> > 2011-05-07 12:41:47.042077500 Caused by: java.net.ConnectException: > >> > Connection refused2011-05-07 12:41:47.042078500 at > >> > sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) > >> > 2011-05-07 12:41:47.042082500 at > >> > sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) > >> > 2011-05-07 12:41:47.042083500 at > >> > > >> > org.apache.mina.transport.socket.nio.SocketConnector.processSessions(SocketConnector.java:293) > >> > 2011-05-07 12:41:47.042084500 at > >> > > >> > org.apache.mina.transport.socket.nio.SocketConnector.access$800(SocketConnector.java:53) > >> > 2011-05-07 12:41:47.042085500 at > >> > > >> > org.apache.mina.transport.socket.nio.SocketConnector$Worker.run(SocketConnector.java:383) > >> > 2011-05-07 12:41:47.042089500 at > >> > > >> > org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51) > >> > 2011-05-07 12:41:47.042090500 ... 3 more > >> > > >> > Any idea if this could be causing the routes to stop? > >> > > >> > Let me know if I should provide extra information. > >> > > >> > Thanks, Tom > >> > > >> > > > --002354447931d69ec404a2d43d36--