zoukankan      html  css  js  c++  java
  • 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:xxagentskywalking-agent.jar -jar sky-0.1.jar SW_AGENT_NAME=skyboot

    查看日志文件agentlogsskywalking-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

  • 相关阅读:
    .NET 云原生架构师训练营(模块一 架构师与云原生)--学习笔记
    《ASP.NET Core 与 RESTful API 开发实战》-- (第10章)-- 读书笔记
    《ASP.NET Core 与 RESTful API 开发实战》-- (第9章)-- 读书笔记(下)
    《ASP.NET Core 与 RESTful API 开发实战》-- (第9章)-- 读书笔记(上)
    《ASP.NET Core 与 RESTful API 开发实战》-- (第8章)-- 读书笔记(尾)
    解决win10桌面图标变成白图标的问题
    微信小程序封装http请求
    Java如何控制某个方法允许并发访问的线程个数----Semaphore
    java实现获取用户IP地址
    shell有减号开头的参数的问题
  • 原文地址:https://www.cnblogs.com/zhanchaohan/p/14367439.html
Copyright © 2011-2022 走看看