skywalking agent部署spring boot项目问题记录
官方给出的agent配置以及启动方式:https://github.com/apache/skywalking/blob/master/docs/en/setup/service-agent/java-agent/README.md#table-of-agent-configuration-properties
问题一:以jar包方式启动boot项目:java -javaagent:E:\xx\agent\skywalking-agent.jar -jar sky-0.1.jar SW_AGENT_NAME=skyboot
查看日志文件agent\logs\skywalking-api.log
WARN 2021-02-03 15:36:44:520 main AbstractClassEnhancePluginDefine : enhance class com.jachs.sky.controller.SwaController by plugin org.apache.skywalking.apm.plugin.spring.mvc.v3.define.ControllerInstrumentation is not working. Because witness class org.springframework.web.servlet.view.xslt.AbstractXsltView is not existed. WARN 2021-02-03 15:36:44:523 main AbstractClassEnhancePluginDefine : enhance class com.jachs.sky.controller.SwaController by plugin org.apache.skywalking.apm.plugin.spring.mvc.v4.define.ControllerInstrumentation is not working. Because witness class org.springframework.cache.interceptor.DefaultKeyGenerator is not existed. WARN 2021-02-03 15:36:44:523 main AbstractClassEnhancePluginDefine : enhance class com.jachs.sky.controller.SwaController by plugin org.apache.skywalking.apm.plugin.spring.mvc.v4.define.ControllerForLowVersionInstrumentation is not working. Because witness class org.springframework.cache.interceptor.DefaultKeyGenerator is not existed. WARN 2021-02-03 15:36:44:706 main AbstractClassEnhancePluginDefine : enhance class com.jachs.sky.controller.SwaController by plugin org.apache.skywalking.apm.plugin.spring.mvc.v5.define.reactive.ReactiveControllerInstrumentation is not working. Because witness class org.springframework.web.reactive.result.method.InvocableHandlerMethod is not existed. WARN 2021-02-03 15:36:48:137 main AbstractClassEnhancePluginDefine : enhance class org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController by plugin org.apache.skywalking.apm.plugin.spring.mvc.v3.define.ControllerInstrumentation is not working. Because witness class org.springframework.web.servlet.view.xslt.AbstractXsltView is not existed. WARN 2021-02-03 15:36:48:137 main AbstractClassEnhancePluginDefine : enhance class org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController by plugin org.apache.skywalking.apm.plugin.spring.mvc.v4.define.ControllerInstrumentation is not working. Because witness class org.springframework.cache.interceptor.DefaultKeyGenerator is not existed. WARN 2021-02-03 15:36:48:138 main AbstractClassEnhancePluginDefine : enhance class org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController by plugin org.apache.skywalking.apm.plugin.spring.mvc.v4.define.ControllerForLowVersionInstrumentation is not working. Because witness class org.springframework.cache.interceptor.DefaultKeyGenerator is not existed. WARN 2021-02-03 15:36:48:139 main AbstractClassEnhancePluginDefine : enhance class org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController by plugin org.apache.skywalking.apm.plugin.spring.mvc.v5.define.reactive.ReactiveControllerInstrumentation is not working. Because witness class org.springframework.web.reactive.result.method.InvocableHandlerMethod is not existed. WARN 2021-02-03 15:36:58:201 main AbstractClassEnhancePluginDefine : enhance class org.springframework.web.method.HandlerMethod by plugin org.apache.skywalking.apm.plugin.spring.mvc.v3.define.HandlerMethodInstrumentation is not working. Because witness class org.springframework.web.servlet.view.xslt.AbstractXsltView is not existed. WARN 2021-02-03 15:36:58:202 main AbstractClassEnhancePluginDefine : enhance class org.springframework.web.method.HandlerMethod by plugin org.apache.skywalking.apm.plugin.spring.mvc.v4.define.HandlerMethodInstrumentation is not working. Because witness class org.springframework.cache.interceptor.DefaultKeyGenerator is not existed. WARN 2021-02-03 15:36:58:280 main AbstractClassEnhancePluginDefine : enhance class org.springframework.web.method.support.InvocableHandlerMethod by plugin org.apache.skywalking.apm.plugin.spring.mvc.v3.define.InvocableHandlerInstrumentation is not working. Because witness class org.springframework.web.servlet.view.xslt.AbstractXsltView is not existed. WARN 2021-02-03 15:36:58:280 main AbstractClassEnhancePluginDefine : enhance class org.springframework.web.method.support.InvocableHandlerMethod by plugin org.apache.skywalking.apm.plugin.spring.mvc.v4.define.InvocableHandlerInstrumentation is not working. Because witness class org.springframework.cache.interceptor.DefaultKeyGenerator is not existed.
找不到jar包解决办法将/optional-plugins下的jar添加到/plugins文件夹下。项目依赖jar不同缺失jar不同添加缺失jar
问题二:
jvm内存异常查看日志打印:
# # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000000000002, pid=948, tid=7460 # # JRE version: Java(TM) SE Runtime Environment (8.0_05-b13) (build 1.8.0_05-b13) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.5-b02 mixed mode windows-amd64 compressed oops) # Problematic frame: # C 0x0000000000000002 # # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # If you would like to submit a bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # --------------- T H R E A D --------------- Current thread (0x000000000236d800): JavaThread "main" [_thread_in_Java, id=7460, stack(0x0000000002370000,0x0000000002470000)] siginfo: ExceptionCode=0xc0000005, ExceptionInformation=0x0000000000000008 0x0000000000000002 Registers: RAX=0x00000000c1b5c168, RBX=0x000000001467d438, RCX=0x00000000026e3480, RDX=0x00000000c1b5c168 RSP=0x000000000246d120, RBP=0x00000000edbc09b8, RSI=0x0000000100089660, RDI=0x0000000014746668 R8 =0x00000000c14b2510, R9 =0x00000000c1b38628, R10=0x00000000c1b5c168, R11=0x0000000002ee2a20 R12=0x0000000000000000, R13=0x000000000246d110, R14=0x000000000246d1b8, R15=0x000000000236d800 RIP=0x0000000000000002, EFLAGS=0x0000000000010246 Top of Stack: (sp=0x000000000246d120)
这个问题比较奇葩尝试过调整jvm大小调整jvm启动参数,都不好使最后没办法换JDK试试。解决办法,升级JDK8版本由原版本1.8.0_05升级到了1.8.0_281
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· DeepSeek “源神”启动!「GitHub 热点速览」
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· C# 集成 DeepSeek 模型实现 AI 私有化(本地部署与 API 调用教程)
· DeepSeek R1 简明指南:架构、训练、本地部署及硬件要求
· 2 本地部署DeepSeek模型构建本地知识库+联网搜索详细步骤