On Thu, Jan 2, 2014 at 12:35 PM, Richa <[email protected]> wrote: > Hi, > I have a camel route for which I want to enable monitoring. I have added the > following code to enable monitoring: > System.setProperty("org.apache.camel.jmx", "true"); > > context.getManagementStrategy().getManagementAgent().setServiceUrlPath("/route/monitoring"); > context.getManagementStrategy().getManagementAgent().setRegistryPort(2114); > context.getManagementStrategy().getManagementAgent().setCreateConnector(true); > > I am using the following service jmx url: > service:jmx:rmi:////jndi/rmi://localhost:2114/route/monitoring > I am using the camelwatch project from github to monitor my route. But when > I give this jmx url, I get the following exception: > java.net.MalformedURLException: URL path must begin with /jndi/ or /stub/ or > /ior/: //jndi/rmi://localhost:2114/ib/monitoring >
When Camel startup, when you have create connector = true, it should log the URL to use for connecting remotely for JMX. You should then use that url to connect, and it ought to work. PS: You may want to take a look at hawtio as well, as its a new and very active developed web console project that also allows to manage and monitor Camel, ActiveMQ, and much more. http://hawt.io/ > javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1902) > > javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:275) > > javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:268) > > com.sksamuel.camelwatch.CamelJmxConnection.<init>(CamelJmxConnection.java:50) > > com.sksamuel.camelwatch.CamelConnectionFactory.getConnection(CamelConnectionFactory.java:28) > > com.sksamuel.camelwatch.web.ManagerController.listContexts(ManagerController.java:25) > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > java.lang.reflect.Method.invoke(Method.java:606) > > org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213) > > org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126) > > org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96) > > org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617) > > org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578) > > org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) > > org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) > > org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) > > org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) > > org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) > javax.servlet.http.HttpServlet.service(HttpServlet.java:621) > javax.servlet.http.HttpServlet.service(HttpServlet.java:728) > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > > org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) > > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) > > Kindly help me with this issue. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-JMS-monitoring-tp5745429.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen Make your Camel applications look hawt, try: http://hawt.io
