rh-messaging / artemis-prometheus-metrics-plugin

Apache License 2.0
22 stars 20 forks source link

Failed startup of context for war version 3.0.0 #35

Closed Stevenpc3 closed 2 weeks ago

Stevenpc3 commented 2 weeks ago

I am now getting this error when using the latest war and jar with artemis version 2.37.0

image

It worked fine with the older version 1 and artemis 2.34

I am copying in the new files to the same location as the old files that worked

COPY plugins/artemis-prometheus-metrics-plugin-3.0.0.jar $ARTEMIS_BROKER_HOME/lib
RUN mkdir $ARTEMIS_BROKER_HOME/web
COPY plugins/artemis-prometheus-metrics-plugin-servlet-3.0.0.war $ARTEMIS_BROKER_HOME/web

my broker uses the NEW plugin as describe in the README

{{ if .Values.metrics.enabled -}}
      <metrics>
         <jvm-gc>{{ .Values.metrics.jvm.gc.enabled }}</jvm-gc>
         <jvm-memory>{{ .Values.metrics.jvm.memory.enabled }}</jvm-memory>
         <jvm-threads>{{ .Values.metrics.jvm.threads.enabled }}</jvm-threads>
         <netty-pool>{{ .Values.metrics.nettyPool.enabled }}</netty-pool>
         <file-descriptors>{{ .Values.metrics.fileDescriptors.enabled }}</file-descriptors>
         <processor>{{ .Values.metrics.processor.enabled }}</processor>
         <uptime>{{ .Values.metrics.uptime.enabled }}</uptime>
         <logging>{{ .Values.metrics.logging.enabled }}</logging>
         <security-caches>{{ .Values.metrics.securityCaches.enabled }}</security-caches>
         {{ if .Values.metrics.serviceMonitor.enabled -}}
         <plugin class-name="com.redhat.amq.broker.core.server.metrics.plugins.ArtemisPrometheusMetricsPlugin"/>
         {{ else -}}
         <plugin class-name="org.apache.activemq.artemis.core.server.metrics.plugins.LoggingMetricsPlugin"/>
         {{- end }}
      </metrics>
      {{- end }}
Stevenpc3 commented 2 weeks ago

Need to double check that the "metrics.war" was there or not. Might have copied the wrong file. I assumed artemis-prometheus-metrics-plugin-servlet-3.0.0.war was the new name

image

Stevenpc3 commented 2 weeks ago

These are the changes that went from working to broken

image

Stevenpc3 commented 2 weeks ago

Maybe I should only be using tag 2.2.0?

Stevenpc3 commented 2 weeks ago

It's likely because the image I'm using does not have Jakarta and I either need to update or use 2.2.0. I just thought the Artemis would have included the dependencies I guess.

brusdev commented 2 weeks ago

artemis-prometheus-metrics-plugin 3.x is for future ActiveMQArtemis versions. You can use artemis-prometheus-metrics-plugin 2.2.0 for ActiveMQArtemis 2.37.0.