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
Java 11 causes Error injecting constructor, java.io.IOException: Can not attach to current VM #752
Comments
Try adding this to
If that's the problem, we should add that to the deployment instructions. |
So I tried that, and now I'm getting
Note, I am running with
|
Trying with a minimal set of flags to figure out if it's anything specific. |
It seems like these are the minimum properties needed to cause this problem:
|
Without any extra jvm flags, eg:
jvm.config:
it causes the original error, and with |
The problem is that the first three flags tell the JVM to start the agent, then the Airlift code in We either need to fix this detection, or add a config flag to skip loading the agent. This flag might need to go in Presto to conditionally add the Guice module |
I see, so it shouldn't occur if I set the jmx options in presto only? Also, what about |
|
I see, that makes sense. So status update for anyone else who runs into these issues: I was able to still use JMX by only using
in config.properties, and
In jvm.properties. All seems to be working, including my Prometheus JMX exporter. Once you touch |
Thanks for helping us find this confusing scenario. I have a patch to add a hint about the self-attach flag and to skip starting the agent if it's already configured: airlift/airlift#733 |
This was fixed in Presto 312. |
This solved the issue for me @electrum, if that's the case for most of us, please add it to deployment documentation. |
@codekaust thanks. This is already part of the docs -- https://prestosql.io/docs/current/installation/deployment.html#jvm-config |
Getting the following error when trying to run Presto 310 with Java 11. I also found the same issue in the prestosql slack channel https://prestosql.slack.com/archives/CFLB9AMBN/p1554760462185400.
The text was updated successfully, but these errors were encountered: