Hello.
I trying to install this plugin to my ActiveMQ Artemis broker and after i done it with instruction in Readme file i got this error on page http://0.0.0.0:8161/metrics:
HTTP ERROR 500
Problem accessing /metrics/. Reason:
Server Error
Caused by:
java.lang.NoClassDefFoundError: io/micrometer/core/instrument/Metrics
at org.apache.activemq.artemis.core.server.metrics.plugins.ArtemisPrometheusMetricsPluginServlet.(ArtemisPrometheusMetricsPluginServlet.java:38)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.base/java.lang.Class.newInstance(Class.java:584)
at org.eclipse.jetty.server.handler.ContextHandler$Context.createInstance(ContextHandler.java:2521)
at org.eclipse.jetty.servlet.ServletContextHandler$Context.createServlet(ServletContextHandler.java:1326)
at org.eclipse.jetty.servlet.ServletHolder.newInstance(ServletHolder.java:1273)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:614)
at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:498)
at org.eclipse.jetty.servlet.ServletHolder.ensureInstance(ServletHolder.java:785)
at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:770)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:538)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1593)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1239)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:481)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1562)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1141)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:564)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:122)
at org.eclipse.jetty.util.thread.strategy.ExecutingExecutionStrategy.invoke(ExecutingExecutionStrategy.java:58)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:201)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:133)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
at java.base/java.lang.Thread.run(Thread.java:829)
I put artemis-prometheus-metrics-plugin-1.1.0.jar in directory /var/lib/test-broker/lib, then put metrics.war in directory /var/lib/test-broker/web.
In /var/lib/test-broker/etc/broker.xml i added to "configuration" scope:
<metrics-plugin class-name="org.apache.activemq.artemis.core.server.metrics.plugins.ArtemisPrometheusMetricsPlugin"/>
and added:
<app url="metrics" war="metrics.war"/>
to the WEB element in /var/lib/test-broker/etc/bootstrap.xml.
But still got this error and really don't know what exactly wrong here.
As the error indicates, Artemis 2.8.1 does not contain Micrometer.
And since 2.8.1 is very old, I suggest you upgrade to a more recent or the most recent version.
Hello. I trying to install this plugin to my ActiveMQ Artemis broker and after i done it with instruction in Readme file i got this error on page http://0.0.0.0:8161/metrics:
I put artemis-prometheus-metrics-plugin-1.1.0.jar in directory /var/lib/test-broker/lib, then put metrics.war in directory /var/lib/test-broker/web. In /var/lib/test-broker/etc/broker.xml i added to "configuration" scope:
<metrics-plugin class-name="org.apache.activemq.artemis.core.server.metrics.plugins.ArtemisPrometheusMetricsPlugin"/>
and added:<app url="metrics" war="metrics.war"/>
to the WEB element in /var/lib/test-broker/etc/bootstrap.xml.But still got this error and really don't know what exactly wrong here.
My broker instance example is here: https://github.com/nikzhernovkov357/apache-artemis-broker-example I using this version of ActiveMQ server: 2.8.1