客户部署的镜像反馈在容器平台上反复重启,还来不及看日志就开始反复重启了。
- 查看容器事件
发现一些 exit code 1字样,没有发现有效信息,节点资源使用达到92%以上,一度怀疑与资源有关,降低过资源请求,发现仍然不断重启。
- 查看容器日志,仅3行
看到 no main manifest attribute, in ****.jar 字样,
1 2 |
DEBUG 2020-05-28 13:34:12:395 main AgentPackagePath : The beacon <span class="code-keyword">class </span>location is jar:file:/root/myapp/skywalking-agent/skywalking-agent.jar!/org/apache/skywalking/apm/agent/core/boot/AgentPackagePath.class. INFO 2020-05-28 13:34:12:404 main SnifferConfigInitializer : Config file found in /root/myapp/skywalking-agent/config/agent.config. no main manifest attribute, in pri-****.jar |
于是找到了这篇文档 Can't execute jar- file: “no main manifest attribute” (阅读量高达一百四十万,你没看错)
里面有针对用户环境的多种解决方法。
jar不可执行时,需要增加插件引用
- 用户pom.xml文件增加插件字段
1 2 3 4 5 6 7 8 |
<span class="pun"><</span><span class="pln">build</span><span class="pun">></span> <span class="pun"><</span><span class="pln">plugins</span><span class="pun">></span> <span class="pun"><</span><span class="pln">plugin</span><span class="pun">></span> <span class="pun"><</span><span class="pln">groupId</span><span class="pun">></span><span class="pln">org</span><span class="pun">.</span><span class="pln">springframework</span><span class="pun">.</span><span class="pln">boot</span><span class="pun"></</span><span class="pln">groupId</span><span class="pun">></span> <span class="pun"><</span><span class="pln">artifactId</span><span class="pun">></span><span class="pln">spring</span><span class="pun">-</span><span class="pln">boot</span><span class="pun">-</span><span class="pln">maven</span><span class="pun">-</span><span class="pln">plugin</span><span class="pun"></</span><span class="pln">artifactId</span><span class="pun">></span> <span class="pun"></</span><span class="pln">plugin</span><span class="pun">></span> <span class="pun"></</span><span class="pln">plugins</span><span class="pun">></span> <span class="pun"></</span><span class="pln">build</span><span class="pun">></span> |
- 了解maven环境各种引用依赖,而且貌似有版本关联性。
文章评论