Open envybee opened 6 years ago
@envybee did you find a solution to this?
@samzx Unfortunately no, we still have this issue
Also ran into this. Was able to work around it by adding --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED
to the java start command.
We started seeing these issues once we moved to Java 10:
ERROR o.c.metrics.datadog.DatadogReporter - Error reporting gauge metric (name: jvm.fd, tags: []) to Datadog, continuing reporting other metrics.\njava.lang.reflect.InaccessibleObjectException: Unable to make public long com.sun.management.internal.OperatingSystemImpl.getOpenFileDescriptorCount() accessible: module jdk.management does not \"opens com.sun.management.internal\" to unnamed module @49ff7d8c\n\tat java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:337)\n\tat java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:281)\n\tat java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:198)\n\tat java.base/java.lang.reflect.Method.setAccessible(Method.java:192)\n\tat com.codahale.metrics.jvm.FileDescriptorRatioGauge.invoke(FileDescriptorRatioGauge.java:48)\n\tat com.codahale.metrics.jvm.FileDescriptorRatioGauge.getRatio(FileDescriptorRatioGauge.java:35)\n\tat com.codahale.metrics.RatioGauge.getValue(RatioGauge.java:64)\n\tat com.codahale.metrics.RatioGauge.getValue(RatioGauge.java:11)\n\tat org.coursera.metrics.datadog.DatadogReporter.reportGauge(DatadogReporter.java:210)\n\tat org.coursera.metrics.datadog.DatadogReporter.report(DatadogReporter.java:90)\n\tat com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:162)\n\tat com.codahale.metrics.ScheduledReporter$1.run(ScheduledReporter.java:117)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)\n\tat java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)\n\tat java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)\n\tat java.base/java.lang.Thread.run(Thread.java:844)
Is there a way this can be fixed?