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

JVM File Descriptor gauge reporting issue in Java 10 #100

Open
envybee opened this issue Oct 16, 2018 · 3 comments
Open

JVM File Descriptor gauge reporting issue in Java 10 #100

envybee opened this issue Oct 16, 2018 · 3 comments

Comments

@envybee
Copy link

envybee commented Oct 16, 2018

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?

@samzx
Copy link

samzx commented Nov 15, 2019

@envybee did you find a solution to this?

@envybee
Copy link
Author

envybee commented Jan 9, 2020

@samzx Unfortunately no, we still have this issue

@billonahill
Copy link

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.

See https://stackoverflow.com/questions/55952859/unable-to-make-public-long-com-sun-management-internal-operatingsystemimpl-getop

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

3 participants