You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Varun Tomar <Va...@zaplabs.com> on 2018/08/29 04:53:21 UTC

Error when try to enable Prometheus jmx exporter

Hi,

I am trying to enable Prometheus jmx exporter, added below line in bootstrap.conf:
java.arg.17=-javaagent:/usr/local/Cellar/nifi/1.6.0/libexec/conf/jmx_prometheus_javaagent-0.3.1.jar=8081:/tmp/prometheus.yaml

But I am getting below error:
2018-08-28 21:41:49,906 INFO [main] org.apache.nifi.bootstrap.Command Launched Apache NiFi with Process ID 14465
2018-08-28 21:41:50,120 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception in thread "main" java.lang.reflect.InvocationTargetException
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr at java.lang.reflect.Method.invoke(Method.java:498)
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
2018-08-28 21:41:50,121 INFO [NiFi logging handler] org.apache.nifi.StdOut FATAL ERROR in native method: processing of -javaagent failed
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr at io.prometheus.jmx.shaded.io.prometheus.jmx.JmxCollector.<init>(JmxCollector.java:74)
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr at io.prometheus.jmx.shaded.io.prometheus.jmx.JavaAgent.premain(JavaAgent.java:47)
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr ... 6 more
2018-08-28 21:41:50,915 INFO [main] org.apache.nifi.bootstrap.RunNiFi NiFi never started. Will not restart NiFi

________________________________
This email may be confidential. If you are not the intended recipient, please notify us immediately and delete this copy from your system.

Re: Error when try to enable Prometheus jmx exporter

Posted by Mark Payne <ma...@hotmail.com>.
Varun,

I am not overly familiar with Prometheus. I can confirm that the syntax that you provided there is
the correct syntax to add it as a Java Agent to the bootstrap, but beyond that I would have to recommend
that you double-check your prometheus.yaml file for correctness and reach out to the Prometheus team for help.

Thanks
-Mark


On Aug 29, 2018, at 12:53 AM, Varun Tomar <Va...@zaplabs.com>> wrote:

Hi,

I am trying to enable Prometheus jmx exporter, added below line in bootstrap.conf:
java.arg.17=-javaagent:/usr/local/Cellar/nifi/1.6.0/libexec/conf/jmx_prometheus_javaagent-0.3.1.jar=8081:/tmp/prometheus.yaml

But I am getting below error:
2018-08-28 21:41:49,906 INFO [main] org.apache.nifi.bootstrap.Command Launched Apache NiFi with Process ID 14465
2018-08-28 21:41:50,120 ERROR [NiFi logging handler] org.apache.nifi.StdErr Exception in thread "main" java.lang.reflect.InvocationTargetException
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr at java.lang.reflect.Method.invoke(Method.java:498)
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
2018-08-28 21:41:50,121 INFO [NiFi logging handler] org.apache.nifi.StdOut FATAL ERROR in native method: processing of -javaagent failed
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr at io.prometheus.jmx.shaded.io.prometheus.jmx.JmxCollector.<init>(JmxCollector.java:74)
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr at io.prometheus.jmx.shaded.io.prometheus.jmx.JavaAgent.premain(JavaAgent.java:47)
2018-08-28 21:41:50,121 ERROR [NiFi logging handler] org.apache.nifi.StdErr ... 6 more
2018-08-28 21:41:50,915 INFO [main] org.apache.nifi.bootstrap.RunNiFi NiFi never started. Will not restart NiFi

________________________________
This email may be confidential. If you are not the intended recipient, please notify us immediately and delete this copy from your system.