当前位置:   article > 正文

K8S+Dubbo+skywalking_empty watch file list. disabling

empty watch file list. disabling

 服务依赖参数:

-javaagent:C:/Users/lixiuyang/Desktop/apache-skywalking-apm-bin/agent/skywalking-agent.jar  -Dskywalking.collector.backend_service=127.0.0.1:11800

 服务依赖:

  1. <dependency>
  2. <groupId>org.apache.skywalking</groupId>
  3. <artifactId>apm-toolkit-logback-1.x</artifactId>
  4. <version>8.8.0</version>
  5. </dependency>

控制台日志:

  1. 17:49:39.993 [http-nio-18082-exec-3] INFO logger_name:com.lxy.controller.StudentController - [TID:8b6d110b5fc34cbda8b92a2c5a668df9.120.16439681799930001] - message:消费者------
  2. 17:49:44,399 |-INFO in ReconfigureOnChangeTask(born:1643967704392) - Empty watch file list. Disabling
  3. 17:50:14,407 |-INFO in ReconfigureOnChangeTask(born:1643967704392) - Empty watch file list. Disabling
  4. 17:49:32,823 |-INFO in ReconfigureOnChangeTask(born:1643967692809) - Empty watch file list. Disabling
  5. 17:49:39.995 [DubboServerHandler-192.168.1.105:20880-thread-3] INFO logger_name:com.lxy.service.StudentServiceImpl - [TID:8b6d110b5fc34cbda8b92a2c5a668df9.120.16439681799930001] - message:生产者------
  6. 17:50:02,824 |-INFO in ReconfigureOnChangeTask(born:1643967692809) - Empty watch file list. Disabling

linux版本:   

2.制作需要的jre镜像

  1. #项目中使用的基础jre镜像
  2. docker pull openjdk:8-jre
  3. #运行jre
  4. docker run -it --name myjre d44e1fb77166
  5. #拷贝本地文件到容器内部
  6. docker cp /data/sk 容器:/data
  7. #提交制作好的镜像
  8. docker commit -a ‘lixiuyang’ 65b0a832e83b myjre:v1
  9. #登录阿里云docker 镜像仓库
  10. docker login --username=XXX@qq.com registry.cn-hangzhou.aliyuncs.com
  11. #打包本地镜像仓库
  12. docker tag 3e597ed0a120 registry.cn-hangzhou.aliyuncs.com/lixiuyang/jdk:v1
  13. #推送本地镜像到阿里云
  14. docker push registry.cn-hangzhou.aliyuncs.com/lixiuyang/jdk:v1
  15. 至此,自定义镜像已经制作完成

2.制作Dockerfile文件

  1. FROM registry.cn-hangzhou.aliyuncs.com/lixiuyang/jdk:v1
  2. MAINTAINER lixiuyang
  3. ENV DUBBO_PORT_TO_REGISTRY: tool-template
  4. ENV DUBBO_PORT_TO_BIND: 20883
  5. ADD dubbo-consumer-1.0.0.jar dubbo-consumer.jar
  6. RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
  7. ENTRYPOINT ["java","-javaagent:/data/apache-skywalking-apm-bin/agent/skywalking-agent.jar","-Dskywalking.collector.backend_service=112.74.188.53:11800","-Dskywalking.agent.service_name=dubbo-consumer", "-jar", "-Xms200m", "-Xmx200m", "/dubbo-consumer.jar"]

3.容器部署

  1. #制作服务镜像
  2. docker build -f Dockerfile -t dubbo-provider:1 .
  3. docker build -f Dockerfile -t dubbo-consumer:1 .
  4. #运行容器
  5. docker run -p 18082:18082 -d dubbo-consumer:1
  6. docker run dubbo-provider:1

4.查看日志

  1. 11:30:34.793 [http-nio-18082-exec-8] INFO logger_name:com.lxy.controller.StudentController - [TID:d30ecf9d0b2f4ba6a535670aa39166b7.79.16469694347910001] - message:uri:"http://172.18.0.8:20880"------
  2. 11:30:34.793 [http-nio-18082-exec-8] INFO logger_name:com.lxy.controller.StudentController - [TID:d30ecf9d0b2f4ba6a535670aa39166b7.79.16469694347910001] - message:消费者------
  3. 11:30:34.322 [DubboServerHandler-172.18.0.8:20880-thread-6] INFO logger_name:com.lxy.service.StudentServiceImpl - [TID:d30ecf9d0b2f4ba6a535670aa39166b7.76.16469694343180001] - message:生产者------
  4. 11:30:34.478 [DubboServerHandler-172.18.0.8:20880-thread-7] INFO logger_name:com.lxy.service.StudentServiceImpl - [TID:d30ecf9d0b2f4ba6a535670aa39166b7.77.16469694344710001] - message:生产者------
  5. 11:30:34.623 [DubboServerHandler-172.18.0.8:20880-thread-8] INFO logger_name:com.lxy.service.StudentServiceImpl - [TID:d30ecf9d0b2f4ba6a535670aa39166b7.78.16469694346190001] - message:生产者------
  6. 11:30:34.796 [DubboServerHandler-172.18.0.8:20880-thread-9] INFO logger_name:com.lxy.service.StudentServiceImpl - [TID:d30ecf9d0b2f4ba6a535670aa39166b7.79.16469694347910001] - message:生产者------

5.UI查看链路追踪


至此,自定义镜像+项目集成skywalking就算结束了,接下来就可以着手去生产环境k8s环境实践一波了

skywalking-8.8.0-Java文档类资源-CSDN下载1.从官网趴下来的,官网下载很慢2.版本比较新8.8更多下载资源、学习资料请访问CSDN下载频道.https://download.csdn.net/download/riju4713/79231332

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/169561
推荐阅读
相关标签
  

闽ICP备14008679号