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
Cannot attach to process in docker container #203
Comments
This issue is documented in Troubleshooting section. The different folder is the problem.
|
It's not obviously cleared what the cause of the error from troubleshooting. Spent some time to figure out. So there are three main points:
May be it should by mentioned some where ? |
@buhtr Do you have a suggestion how to improve the documentation? Ideally without focusing on docker, as the problem is not docker-specific. |
Hi could you please share your changes? I mount the folder to docker and run the profiler from the host from the same path, but it still fails to inject the profiler to the user process. Thanks |
@huangshiyou What OS image and Java version does your container run? Do you use the latest release of async-profiler? Did you try to run the profiler inside the container? |
Thanks for your reply. Yes, I tried to run the profiler inside the container and it works. I guess the reason why it fails to work from the host machine is that: the main container launches another sub-container where the Java process runs. I can only mount the profiler folder to the main container so that in the sub-container, the Java process cannot access the profile library. I am not a docker expert. As it works by running the profiler from the container, it is good enough for me. |
@huangshiyou You're right - subcontainer must be the issue. In the future version, I'll try to handle copying of |
Documentation says attaching to java process in docker from host machine should be possible, but requirements are not clear.
I get following error when trying to attach to java process in docker container:
There no jdk on host machine.
Folder with profiler is mounted inside container, but into different folder
The text was updated successfully, but these errors were encountered: