https4

2017-07-17 Thread Ryan T
I'm trying to connect to devices that have https enabled but you connect to
an ip address and no valid certificates.  How can I allow all certificates
using http4 endpoint?



Getting error:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: No trusted certificate found

Additional Info:
Devices cannot communicate on http.  It has to be https.
I have no control over the certificates for the devices.



--
View this message in context: 
http://camel.465427.n5.nabble.com/https4-tp5807254.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: ExchangeTimedOutException

2017-03-22 Thread Ryan T
Any other advice out there as to the problem I am trying solve?



--
View this message in context: 
http://camel.465427.n5.nabble.com/ExchangeTimedOutException-tp5795836p5795893.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Help diagnosing camel exception

2017-03-28 Thread Ryan T
can anyone help me on diagnosing this exception?  Any hints as to how I might
proceed on fixing it?





--
View this message in context: 
http://camel.465427.n5.nabble.com/Help-diagnosing-camel-exception-tp5796669.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Help diagnosing camel exception

2017-03-29 Thread Ryan T
First, thanks souciance for responding.  You seem to be the only one that
will respond to me posts and you have been of great help.  

I understand that I am having a timeout because the OUT is not received in
time.  What I am having trouble finding is what actual part or node that the
OUT is not being received in time.  When this happens my whole job stops
processing and does not finish.  Am I just not seeing the obvious or is
there something I need to change in my route to be able to identify the
actual part or node this is occurring in?

Thanks
Ryan



--
View this message in context: 
http://camel.465427.n5.nabble.com/Help-diagnosing-camel-exception-tp5796669p5796719.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Exception handling in camel

2017-03-29 Thread Ryan T
You can obtain the exception like this in side your ExceptionProcessor:



As far as the bean, I am unsure as to what bean you are referring to, but if
I could make a guess you probably want to just get the
exchange.getIn().getBody()

When an exception happens the body of the currently processing message is
still there.

Hope this helps.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Exception-handling-in-camel-tp5796686p5796721.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Exception handling in camel

2017-03-29 Thread Ryan T
On a side note to save you some trouble:

DO NOT USE the endDoTry() method call.  Change them to just end() it will
save you a headache as I spent a ton of time figuring why the try catch was
not working properly.  It should look like the following:



Hope that helps.
Cheers!



--
View this message in context: 
http://camel.465427.n5.nabble.com/Exception-handling-in-camel-tp5796686p5796722.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Help diagnosing camel exception

2017-04-25 Thread Ryan T
Sorry it took me so long to get back.  I wanted to add some more logging to
try to be more complete in defining my problem.  Below is the code:



Below here is the logs of what I am getting:
Error:


success:


In the error case I am confused to as why it skipped several nodes of the
route.  I expected that once it handled the exception it would continue to
process the rest of the nodes.  I mean the whole point of putting all the
extra logging nodes into the route was to attempt to identify the actual
node having the timeout.  But I am no closer to solving this.

Thanks for any help you might be able to provide.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Help-diagnosing-camel-exception-tp5796669p5798261.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Help diagnosing camel exception

2017-04-26 Thread Ryan T
More code that might help in diagnosing the issue.  What do you think could
be happening?





--
View this message in context: 
http://camel.465427.n5.nabble.com/Help-diagnosing-camel-exception-tp5796669p5798367.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Help diagnosing camel exception

2017-04-27 Thread Ryan T
In the bean:jobService it may go on to hit a mongo instance.  But I'm not
sure where in the logs it led you to think it was there except that you
looked at the initial logs in the original message.  Those logs could be a
little confusing I'm sure as the original authors of the code did some
interesting routes.  I've attempted to simplify them somewhat so the
original error logs may not reflect the current code.  I would if you have
time concentrate on the reply messages that I sent most recently instead. 
Sorry if it confused you.  I tried to comment in the code what things are
doing so I did not have to send you the whole code base.  The important
thing to look at now would be the recent logs I messaged along with the
code.  The TimeOutErrorProcessor is implementing some of your suggestions
for the logs that is why I included it.  I sent you two routes, but the
second one is the most interesting as that is where the time out occurs. See
"//start of problem area".  I am just not sure which node.  I'm leaning that
it is the call externally, but since it never prints some of the log entries
I am not sure.  See success log example vs failure log example.  You will
see that some of the log entries that should be printing out are not and are
skipped, but then when it gets to the "saveDeviceUsageHistory' it starts
logging again.  There are stop and end log entries inside of every
Processor/Bean node entry so that I can see when it is starting and ending a
node.  You can see this by looking at the successful log.

Sorry for the novel,  I hope you can help me.  And thanks for your time.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Help-diagnosing-camel-exception-tp5796669p5798424.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Help diagnosing camel exception

2017-04-27 Thread Ryan T
That would be ideal, but I it is really hard to reproduce.  Out of say 6
records processed.  I "sometimes" get the timeout.  Everytime I run it in my
local dev environment it seems to succeed.  When it does fail in my dev
environment, I usually have to add more logging as I learn more.  I'm
basically trying to prove that it is a network or connectivity issue and
eliminate the code as the problem, but if I cannot pin point the exact node
there is the doubt that it could be happening in the serializer or a
database call to mongo or in the cxf code that does the rest call.  My gut
says that it is a connectivity issue, but how do you explain to management
that the problem is between Amazon, and Verizon, Kore(T-Mobile), or ATT. 
They are more inclined to say it is the code base.  Because of this being
more reproducible in a production environment, it makes it really hard to
just start removing node to find the problem.  It is however an interesting
thought and I will look into maybe making a pseudo route that can mimic
pieces in the route, specifically the places I think it might be happening.

On a side note:  I forgot to give you the actual exception in the log as
part of the log post message to this board.  Included below:





--
View this message in context: 
http://camel.465427.n5.nabble.com/Help-diagnosing-camel-exception-tp5796669p5798428.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Help diagnosing camel exception

2017-04-27 Thread Ryan T
> Can you explain why some of the individual processor nodes in each route 
> have processing times in the order of an hour or more!?

The route is a batch job process that is triggered by a Quartz2 or API get
call.  The base route can take anywhere from 2 minutes to run in the case of
ATT because we only have 200 devices.  But for Verizon we have 5 devices
and that can take around 2 hours to run.

> How are you testing these routes? What unit tests do you have for these 
> routes?

We have some Scala tests that unit test the individual Processors passing in
a Mocked exchange object.  As for the beans they mostly are services to
interact with a Mongodb store.  Not much processing actually happens in
them.  I inherited this code and I have slowly been refactoring it to be
less monolithic, but that takes time.  I have created some tests, not in
this area with the timeouts, that test whole routes Mocking the external
payloads that are received.  They are on the more simpler routes.   But
doing these test can be difficult because of how monolithic these routes
are.

> Also, give each node in the processing chain of a route a discrete ID. 
> Makes it a lot easier to map, rather than figuring out what 'choice43' is!

Agreed this would help.  I will implement them right away.   The problem is,
to get the verbose logging, I have to tell camel that the exceptions are not
handled and if I do that then the whole batch stops when an exception
happens.  I need a way of printing the verbose logging, like in the original
ticket message, but without stopping the world when they happen.  Do you
know how to do that?

Thanks for your help.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Help-diagnosing-camel-exception-tp5796669p5798451.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Help diagnosing camel exception

2017-04-27 Thread Ryan T
I thought about increasing the timeout limit, but the timings do not suggest
that would be the best way to handle the issue.  The reason I say that is
because the timings on 99% are with in 2 seconds.  Fact is the only time i
see them go above 2 seconds is when these timeouts occur.  This suggests to
me that it is an external pause of some sort or maybe a GC happens. 
Although the GC does not quite make sense either because other processes do
not pause at the same time from what I can see.  I have had these timeouts
happen on single API calls too.  Not just the batch jobs.  It sure smells of
network issues to me.  I want to eliminate the carriers(ATT, Verizon, etc)
as it happens regardless of carrier API I am hitting.  If I were to narrow
down to what things it could be, I would say it is either network issues, a
problem in CXF(Camel), or a problem in the marshalling
JacksonXML/Json(Camel).



--
View this message in context: 
http://camel.465427.n5.nabble.com/Help-diagnosing-camel-exception-tp5796669p5798467.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Help diagnosing camel exception

2017-04-27 Thread Ryan T
I actually do have that.  If you look at the code the try catch only catches:
CxfOperationException.class,
UnknownHostException.class,
ConnectException.class,
SocketTimeoutException.class,
NoRouteToHostException.class,
Fault.class

When the TimeoutException happens it does not go into this portion of the
route. 
 
It is going into this portion of code which is why I included both routes as
this is in the parent route.



Do you think that the error message might be more plain and/or helpful if I
moved this onException into the seda routes?  Is the fact that the
onException is in the parent route hiding important information do you
think?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Help-diagnosing-camel-exception-tp5796669p5798468.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Understanding onExceptionOccurred

2017-04-27 Thread Ryan T
What is the difference between the following:



and 





--
View this message in context: 
http://camel.465427.n5.nabble.com/Understanding-onExceptionOccurred-tp5798470.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Bug in onException with onRedelivery

2017-05-01 Thread Ryan T
I am running into an anomaly that I am hoping someone can resolve.

I have a route that looks like:



And a MyProcessor:


RedeliveryProcessor:



I start the test as below:


Result obtained:
--- redeliveryCount: 1
--- redeliveryCount: 2
[main] WARN route3 - ***   YetAnotherException happened.

Based on the code I expected "***   AnotherException happened." not "***  
YetAnotherException happened."

Can anyone explain why I got the "***   YetAnotherException happened."
result?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Bug-in-onException-with-onRedelivery-tp5798549.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Bug in onException with onRedelivery

2017-05-03 Thread Ryan T
Can someone verify that this is a bug or not?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Bug-in-onException-with-onRedelivery-tp5798549p5798619.html
Sent from the Camel - Users mailing list archive at Nabble.com.


How to increase camel exchange timeout threshold

2017-05-03 Thread Ryan T
I'm getting this exception.

org.apache.camel.ExchangeTimedOutException: The OUT message was not received
within: 3 millis. Exchange[ID-mid3-33287-1493765150908-0-613311]

Anyone know how to change the threshold to say 60 seconds?

I've tried:

from("seda:myProcess?concurrentConsumers=10&timeout=45000")

But it must be a different setting as adding the timeout param did nothing
to resolve the exchange timeout.



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-increase-camel-exchange-timeout-threshold-tp5798620.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to increase camel exchange timeout threshold

2017-05-04 Thread Ryan T
souciance,
Thanks for the feed back.  I will try that change.  Do you know if there is
a way to do it at the route level?




--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-increase-camel-exchange-timeout-threshold-tp5798620p5798654.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Bug in onException with onRedelivery

2017-05-09 Thread Ryan T
I stepped through it with the debugger and yep it does.  You could try it if
you would like.
https://github.com/catequil/CamelTests.git
  
The repository should be public.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Bug-in-onException-with-onRedelivery-tp5798549p5799178.html
Sent from the Camel - Users mailing list archive at Nabble.com.


seda timeout setting not working as expected

2017-05-15 Thread Ryan T

I have a seda route:


I expected and error in the logs as below:
The OUT message was not received within: 45000 millis.
Exchange[ID-rtracy-53657-1494891566058-0-24]

But I got the below instead: 

The OUT message was not received within: 3 millis.
Exchange[ID-rtracy-53657-1494891566058-0-24]

Can anyone help on resolving this issue?



--
View this message in context: 
http://camel.465427.n5.nabble.com/seda-timeout-setting-not-working-as-expected-tp5799550.html
Sent from the Camel - Users mailing list archive at Nabble.com.