Skip to content
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

Possible race when servlet discovers registry? #25

Open
jbertram opened this issue Feb 15, 2024 · 0 comments
Open

Possible race when servlet discovers registry? #25

jbertram opened this issue Feb 15, 2024 · 0 comments

Comments

@jbertram
Copy link
Collaborator

jbertram commented Feb 15, 2024

This report comes from ASF Slack:

Hi, I've enabled Artemis Prometheus metrics as follow in my broker.xml:

<metrics>
  <plugin class-name="org.apache.activemq.artemis.core.server.metrics.plugins.ArtemisPrometheusMetricsPlugin"/>
</metrics>

It works most of the time and I'm able to get Prometheus metrics. However, randomly (usually after node restart) some nodes don't have metrics anymore and display the following error:

HTTP ERROR 404 Prometheus meter registry is null. Has the Prometheus Metrics Pluging been configured?

There is no visible difference in logs produced by a node having metrics and a node having no metrics. I don't know how to reproduce it. As a workaround, I have found that metrics can be enabled again by calling the JMX restartEmbeddedWebServer() to restart the Jetty server. Have you already seen something like that?

jbertram added a commit to jbertram/artemis-prometheus-metrics-plugin that referenced this issue Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant