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

[挂载elasticsearch]ClassNotFoundException: com.alibaba.jvm.sandbox.core.CoreConfigure #437

Open
guangju-dev opened this issue Aug 24, 2023 · 1 comment
Assignees
Labels

Comments

@guangju-dev
Copy link

场景:使用sandbox挂载elasticsearch的进程,elasticsearch命令行和sandbox都报错

elasticsearch出现的报错如下

Exception in thread "Attach Listener" java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
	at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(InstrumentationImpl.java:535)
Caused by: java.lang.RuntimeException: sandbox attach failed.
	at com.alibaba.jvm.sandbox.agent.AgentLauncher.install(AgentLauncher.java:261)
	at com.alibaba.jvm.sandbox.agent.AgentLauncher.agentmain(AgentLauncher.java:109)
	... 6 more
Caused by: java.lang.ClassNotFoundException: com.alibaba.jvm.sandbox.core.CoreConfigure
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:594)
	at com.alibaba.jvm.sandbox.agent.SandboxClassLoader.loadClass(SandboxClassLoader.java:58)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
	at com.alibaba.jvm.sandbox.agent.AgentLauncher.install(AgentLauncher.java:223)
	... 7 more
Agent failed to start!

sandbox出现的报错如下

com.sun.tools.attach.AgentInitializationException: Agent JAR loaded but agent failed to initialize
	at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.loadAgent(HotSpotVirtualMachine.java:165)
	at com.alibaba.jvm.sandbox.core.CoreLauncher.attachAgent(CoreLauncher.java:61)
	at com.alibaba.jvm.sandbox.core.CoreLauncher.<init>(CoreLauncher.java:20)
	at com.alibaba.jvm.sandbox.core.CoreLauncher.main(CoreLauncher.java:43)
sandbox load jvm failed : Agent JAR loaded but agent failed to initialize
attach JVM 40957 fail.

版本如下:jdk11,sandbox1.4,elasticsearch 7.9.0,使用系统是macOS

挂载duddo,一些java应用都没有问题,麻烦问下大家有无解决方案,谢谢🙏

@guangju-dev guangju-dev changed the title ClassNotFoundException: com.alibaba.jvm.sandbox.core.CoreConfigure [挂载elasticsearch]ClassNotFoundException: com.alibaba.jvm.sandbox.core.CoreConfigure Aug 24, 2023
@oldmanpushcart
Copy link
Collaborator

这种情况一般是sandbox-core.jar文件丢失或者损坏,核对过这个文件是否还在?MAC下的默认路径应该是${HOME}/.opt/sandbox/lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants