Camel Context not auto-discovered #1712

Closed
covolution opened this Issue Nov 5, 2014 · 20 comments

Projects

None yet

5 participants

@covolution

I have Camel running in my JVM and hawtio connected to it. I can see Camel details in the hawtio JMX tab but the Camel plugin doesn't seem to work.

How is the camel context auto-discovered? Can it be configured?
I'm using:
<camel:jmxAgent id="agent" mbeanObjectDomainName="My.Camel" statisticsLevel="RoutesOnly" />

@davsclaus
Member

Try removing statisticsLevel="RoutesOnly"

I wonder if the Camel plugin assumes that people dont change that option. If so we would need to add logic to the Camel plugin to deal with that.

Mind that this option reduces the level of details in JMX that the Camel plugin needs. So its not recommended to use if you want to use the full power of Camel and hawtio

@covolution

Removing statisticsLevel didn't seem to fix it. On Camel 2.13.2, tomcat 8, hawtio 1.4.29. The hawtio sample works showing Camel but when it connects to the other server it doesn't seem to find the Camel Context. Is there some debugging I can turn on?

@davsclaus
Member

Have it worked before?

And do you have jolokia installed on that remote server?

And what is that remote server?

You can also try to access jolokia directly on that remote server without hawtio, to see if you can get some basic jolokia response.

You can enable more logging in the prefrence. There is a logging console panel, where you can change log level. The logs can be seen in that log viewer in the top corner. Also in your browser console

@covolution

It's never worked. I have 2 servers. Jolokia is running as an agent on the target server. Hawtio is connecting and loading the JMX view but not the special Camel Tab.
hawtio_alf

@davsclaus
Member

Ah maybe its the 500 limit. In the preference there is a option about jolokia max size. I think its set to 500 by default. Try to set that higher.

@gashcrumb
Member

The camel plugin as it's coded now will only work for camel contexts that register in JMX under the org.apache.camel domain.

@davsclaus
Member

Ah darn didn't spot that domain name change ;)

Yeah 99,9% of ppl just use the org.apache.camel default domain. I think it can be too much trouble to use custom domain names for Camel / ActiveMQ / CXF etc with all the tooling assuming using the hardcoded default naming convention.

@gashcrumb
Member

One fix that you could do locally is override vendor.js and add:

Camel.jmxDomain = "Alfresco.Camel";

@davsclaus
Member

Logged an ticket to see if we can support this in the future with #1755

@davsclaus davsclaus closed this Nov 19, 2014
@jstrachan jstrachan modified the milestone: 1.4.36 Nov 20, 2014
@yazun
yazun commented Jul 23, 2015

Is there a way to define a custom jmxDomain for activemq?
We have defined the custom name and this of course disables the activemq plugin..

@davsclaus
Member

No not in hawtio

@yazun
yazun commented Jul 23, 2015

We would appreciate to add it as a future milestone, similarly to #1755
Or more general solution could be added for any plugin with custom jmxDomain.
Could you explain where jmxDomain is defined? - it's referenced in the plugin's source code:
https://github.com/hawtio/hawtio/blob/master/hawtio-web/src/main/webapp/app/activemq/js/activemqPlugin.ts , so maybe redefining it there would be enough?

@davsclaus
Member

Yeah hopefully that would be the only change, but we haven't tried with different domain.

Why are you btw using a different domain for the AMQ broker?

@yazun
yazun commented Jul 23, 2015

The reason to use JMX was to delete the queues - in our (debatable) model we have queues created per (processing) run by a coordinator process and jmx was the way to delete them by the coordinator process after processing nodes (spawned in the batch system) finished using them. Other methods of queue cleanup did not work somehow (we tried expiration of the queues, not sure if advisory messages too). If you have hints how to do this without jmx, it would be good to hear!

Developer introduced a custom values for jmxDomainName in activemq config, probably to make explicit reference later in the coordinator. Since such values could be changed in the activemq config I believe it should be configurable in the toolset around it. Other option would be to disable custom name in the activemq.
FYI: we use both activemq and camel (we got your book into our library too) for variability studies in our project:
http://sci.esa.int/gaia/28820-summary/
Cheers,
Krzysztof

@davsclaus
Member

Yeah we could maybe have a preference for activemq, where people can configure the name of the domain?

@yazun
yazun commented Jul 23, 2015

Yes, this would do.

@davsclaus
Member

Okay I have just implemented this. See that ticket above

@davsclaus
Member

I wonder how many places this requires to change to support this for Camel also?

@yazun
yazun commented Jul 28, 2015

thanks for implementing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment