Alluxio and jmx_exporter

11 views
Skip to first unread message

Eduard Ahmatgareev

unread,
Nov 17, 2021, 10:17:10 AM11/17/21
to Alluxio Users
Hi all,

Probably someone of you will be able to help me. I am trying to integrate alluxio with jmx_node_exporter to get java metrics.
For that, I downloaded https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.16.0/jmx_prometheus_javaagent-0.16.0.jar to /opt/alluxio/lib/jmx_prometheus_javaagent-0.16.1.jar
After that I modified: 
/opt/alluxio/conf/alluxio-env.sh and added:

ALLUXIO_WORKER_JAVA_OPTS="-javaagent:/opt/alluxio/lib/jmx_prometheus.jar=8091:/opt/alluxio/conf/jmx_exporter.yml"

next, I restarted worker and run:
/opt/alluxio/bin/alluxio-start.sh worker

and got:

RUN WORKER: -javaagent:/opt/alluxio/lib/jmx_prometheus.jar=8091:/opt/alluxio/conf/jmx_exporter.yml -Dalluxio.home=/opt/alluxio-2.4.1-1 -Dalluxio.conf.dir=/opt/alluxio-2.4.1-1/conf -Dalluxio.logs.dir=/opt/alluxio-2.4.1-1/logs -Dalluxio.user.logs.dir=/opt/alluxio-2.4.1-1/l
ogs/user -Dlog4j.configuration=file:/opt/alluxio-2.4.1-1/conf/log4j.properties -Dorg.apache.jasper.compiler.disablejsr199=true -Djava.net.preferIPv4Stack=true -Dorg.apache.ratis.thirdparty.io.netty.allocator.useCacheForAllThreads=false -Dalluxio.logger.type=WORKER_LOGGER
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
        at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
Caused by: java.net.BindException: Address already in use
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Net.java:461)
        at sun.nio.ch.Net.bind(Net.java:453)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:222)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:85)
        at sun.net.httpserver.ServerImpl.<init>(ServerImpl.java:100)
        at sun.net.httpserver.HttpServerImpl.<init>(HttpServerImpl.java:50)
        at sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(DefaultHttpServerProvider.java:35)
        at com.sun.net.httpserver.HttpServer.create(HttpServer.java:130)
        at io.prometheus.jmx.shaded.io.prometheus.client.exporter.HTTPServer.<init>(HTTPServer.java:190)
        at io.prometheus.jmx.shaded.io.prometheus.jmx.JavaAgent.premain(JavaAgent.java:31)
        ... 6 more
FATAL ERROR in native method: processing of -javaagent failed
/opt/alluxio/bin/alluxio-monitor.sh: line 82: 23151 Aborted                 "${JAVA}" -cp ${CLASSPATH} ${alluxio_config} ${monitor_exec}


this is something wired with which I need help.

Thank you.

Reply all
Reply to author
Forward
0 new messages