New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camel Context not auto-discovered #1712

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

Comments

Projects
None yet
5 participants
@covolution

covolution commented Nov 5, 2014

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

This comment has been minimized.

Show comment
Hide comment
@davsclaus

davsclaus Nov 11, 2014

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

Member

davsclaus commented Nov 11, 2014

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

This comment has been minimized.

Show comment
Hide comment
@covolution

covolution Nov 11, 2014

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?

covolution commented Nov 11, 2014

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

This comment has been minimized.

Show comment
Hide comment
@davsclaus

davsclaus Nov 11, 2014

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

Member

davsclaus commented Nov 11, 2014

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

This comment has been minimized.

Show comment
Hide comment
@covolution

covolution Nov 11, 2014

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

covolution commented Nov 11, 2014

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

This comment has been minimized.

Show comment
Hide comment
@davsclaus

davsclaus Nov 11, 2014

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.

Member

davsclaus commented Nov 11, 2014

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

This comment has been minimized.

Show comment
Hide comment
@gashcrumb

gashcrumb Nov 11, 2014

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.

Member

gashcrumb commented Nov 11, 2014

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

This comment has been minimized.

Show comment
Hide comment
@davsclaus

davsclaus Nov 11, 2014

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.

Member

davsclaus commented Nov 11, 2014

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

This comment has been minimized.

Show comment
Hide comment
@gashcrumb

gashcrumb Nov 11, 2014

Member

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

Camel.jmxDomain = "Alfresco.Camel";

Member

gashcrumb commented Nov 11, 2014

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

Camel.jmxDomain = "Alfresco.Camel";

@davsclaus

This comment has been minimized.

Show comment
Hide comment
@davsclaus

davsclaus Nov 19, 2014

Member

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

Member

davsclaus commented Nov 19, 2014

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

This comment has been minimized.

Show comment
Hide comment
@yazun

yazun 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..

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

This comment has been minimized.

Show comment
Hide comment
@davsclaus

davsclaus Jul 23, 2015

Member

No not in hawtio

Member

davsclaus commented Jul 23, 2015

No not in hawtio

@yazun

This comment has been minimized.

Show comment
Hide comment
@yazun

yazun 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?

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

This comment has been minimized.

Show comment
Hide comment
@davsclaus

davsclaus Jul 23, 2015

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?

Member

davsclaus commented Jul 23, 2015

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

This comment has been minimized.

Show comment
Hide comment
@yazun

yazun 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

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

This comment has been minimized.

Show comment
Hide comment
@davsclaus

davsclaus Jul 23, 2015

Member

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

Member

davsclaus commented Jul 23, 2015

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

@yazun

This comment has been minimized.

Show comment
Hide comment
@yazun

yazun Jul 23, 2015

Yes, this would do.

yazun commented Jul 23, 2015

Yes, this would do.

@davsclaus

This comment has been minimized.

Show comment
Hide comment
@davsclaus

davsclaus Jul 23, 2015

Member

Okay I have just implemented this. See that ticket above

Member

davsclaus commented Jul 23, 2015

Okay I have just implemented this. See that ticket above

@davsclaus

This comment has been minimized.

Show comment
Hide comment
@davsclaus

davsclaus Jul 23, 2015

Member

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

Member

davsclaus commented Jul 23, 2015

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

@yazun

This comment has been minimized.

Show comment
Hide comment
@yazun

yazun Jul 28, 2015

thanks for implementing!

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