I have various applications that are running in a Kubernetes cluster, and are configured to allow YourKit to connect and profile the running application. My problem is if Kubernetes terminates and subsequently restart the application, YourKit seems to fail to properly initialize and prevents the application from successfully initializing. The entirety of the log files regarding this are:
[YourKit Java Profiler 2020.9-b419] Log file: /root/.yjp/log/Tomcat-1.log
20.9-419 0.282: error: agentInit: Core.init() returned false
If the -agentpath JVM arguements which enable yourkit are removed, then the application is able to be restarted correctly.
What can be done to resolve this issue?
Problem restarting applications that use YourKit
-
- Posts: 2
- Joined: Fri Jul 23, 2021 4:33 pm
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Problem restarting applications that use YourKit
Is the problem reproducible with the latest version YourKit Java Profiler 2021.3? The version you use is no longer supported.
Please try the agent startup option "skip_advanced_port_check":
https://www.yourkit.com/docs/java/help/ ... port_check
Please try the agent startup option "skip_advanced_port_check":
https://www.yourkit.com/docs/java/help/ ... port_check
-
- Posts: 2
- Joined: Fri Jul 23, 2021 4:33 pm
Re: Problem restarting applications that use YourKit
Both of these options fixed the problem for me. Thanks!
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Problem restarting applications that use YourKit
Since YourKit Java Profiler 2021.3 the option "skip_advanced_port_check" is implied when the agent detects it runs under Kubernetes.