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

logger 命令在jdk17的环境下无响应 #2659

Closed
1 task done
wlngo opened this issue Sep 14, 2023 · 4 comments
Closed
1 task done

logger 命令在jdk17的环境下无响应 #2659

wlngo opened this issue Sep 14, 2023 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@wlngo
Copy link

wlngo commented Sep 14, 2023

  • 我已经在 issues 里搜索,没有重复的issue。

环境信息

  • arthas-boot.jar 或者 as.sh 的版本:3.6.7
  • Arthas 版本: 3.6.7
  • 操作系统版本: Ubuntu 22.04
  • 目标进程的JVM版本: opendjk17
  • 执行arthas-boot的版本: 3.6.7

重现问题的步骤

  1. 在控制执行logger命令没有没有响应

期望的结果

有日志信息返回

实际运行的结果

image

2023-09-14 08:57:02 [arthas-command-execute] ERROR c.t.a.c.command.logger.LoggerCommand -arthas loggger command try to define helper class error: com.taobao.arthas.core.command.logger.LogbackHelper2a869a16366d8b97
java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "cause" is null
	at com.taobao.arthas.common.ReflectException.<init>(ReflectException.java:9)
	at com.taobao.arthas.common.ReflectUtils.defineClass(ReflectUtils.java:493)
	at com.taobao.arthas.common.ReflectUtils.defineClass(ReflectUtils.java:418)
	at com.taobao.arthas.core.command.logger.LoggerCommand.helperClassNameWithClassLoader(LoggerCommand.java:301)
	at com.taobao.arthas.core.command.logger.LoggerCommand.loggerInfo(LoggerCommand.java:315)
	at com.taobao.arthas.core.command.logger.LoggerCommand.loggers(LoggerCommand.java:237)
	at com.taobao.arthas.core.command.logger.LoggerCommand.process(LoggerCommand.java:144)
	at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.process(AnnotatedCommandImpl.java:82)
	at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl.access$100(AnnotatedCommandImpl.java:18)
	at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:111)
	at com.taobao.arthas.core.shell.command.impl.AnnotatedCommandImpl$ProcessHandler.handle(AnnotatedCommandImpl.java:108)
	at com.taobao.arthas.core.shell.system.impl.ProcessImpl$CommandProcessTask.run(ProcessImpl.java:385)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

@hengyunabc hengyunabc added the bug Something isn't working label Sep 19, 2023
@hengyunabc hengyunabc added this to the 4.0.0 milestone Sep 19, 2023
@mintonzhang
Copy link

@hengyunabc 请问有什么临时解决办法吗? 我看你的意思是4.0.0修复这个问题吗?

@hengyunabc
Copy link
Collaborator

@hengyunabc 请问有什么临时解决办法吗? 我看你的意思是4.0.0修复这个问题吗?

暂时没有发版本计划,可以自己本地打包下。 或者让应用在启动时增加 jvm 参数,增加 open export 之类的。比如 --add-opens java.base/java.util=ALL-UNNAMED (不一定准确)

@wanqiu410
Copy link

测试了下,可以通过添加 --add-opens java.base/java.lang=ALL-UNNAMED 来解决

@xiezhx9
Copy link

xiezhx9 commented May 22, 2024

arthas可以运行时增加--add-opens java.base/java.lang=ALL-UNNAMED参数吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants