前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >SonarQube 报错分析

SonarQube 报错分析

作者头像
林万程
发布2021-04-28 11:41:40
1.1K0
发布2021-04-28 11:41:40
举报
文章被收录于专栏:IT开发技术与工作效率

分析过程

查看 sonar 的 logs/sonar.log

代码语言:javascript
复制
2021.04.26 11:05:40 INFO  app[][o.s.a.SchedulerImpl] Process[web] is stopped
2021.04.26 11:05:40 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 143
2021.04.26 11:05:40 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2021.04.26 11:05:40 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

看到 es 报错 查看 logs/es.log

代码语言:javascript
复制
2021.04.26 11:05:27 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [61.6gb], net total_space [114.9gb], types [rootfs]
2021.04.26 11:05:27 INFO  es[][o.e.e.NodeEnvironment] heap size [494.9mb], compressed ordinary object pointers [true]
2021.04.26 11:05:27 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [_Ewy-aLkTLKbdkGHHvPgBw]
2021.04.26 11:05:27 INFO  es[][o.e.n.Node] version[6.8.4], pid[10075], build[default/tar/bca0c8d/2019-10-16T06:19:49.319352Z], OS[Linux/3.10.0-327.el7.x86_64/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/11/11+28]
2021.04.26 11:05:27 INFO  es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/opt/sonarqube-8.4.1.35646/temp, -XX:ErrorFile=../logs/es_hs_err_pid%p.log, -Des.enforce.bootstrap.checks=true, -Xmx512m, -Xms512m, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/opt/sonarqube-8.4.1.35646/elasticsearch, -Des.path.conf=/opt/sonarqube-8.4.1.35646/temp/conf/es, -Des.distribution.flavor=default, -Des.distribution.type=tar]
2021.04.26 11:05:28 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]
2021.04.26 11:05:28 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]
2021.04.26 11:05:28 INFO  es[][o.e.p.PluginsService] loaded module [mapper-extras]
2021.04.26 11:05:28 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2021.04.26 11:05:28 INFO  es[][o.e.p.PluginsService] loaded module [percolator]
2021.04.26 11:05:28 INFO  es[][o.e.p.PluginsService] loaded module [reindex]
2021.04.26 11:05:28 INFO  es[][o.e.p.PluginsService] loaded module [repository-url]
2021.04.26 11:05:28 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2021.04.26 11:05:28 INFO  es[][o.e.p.PluginsService] no plugins loaded
2021.04.26 11:05:29 WARN  es[][o.e.d.c.s.Settings] [http.enabled] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.
2021.04.26 11:05:30 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen] and host providers [settings]
2021.04.26 11:05:31 INFO  es[][o.e.n.Node] initialized
2021.04.26 11:05:31 INFO  es[][o.e.n.Node] starting ...
2021.04.26 11:05:31 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2021.04.26 11:05:31 INFO  es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2021.04.26 11:05:34 INFO  es[][o.e.c.s.MasterService] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {sonarqube}{_Ewy-aLkTLKbdkGHHvPgBw}{v1qWPHlmSWOaAx5vLUjI2g}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}
2021.04.26 11:05:34 INFO  es[][o.e.c.s.ClusterApplierService] new_master {sonarqube}{_Ewy-aLkTLKbdkGHHvPgBw}{v1qWPHlmSWOaAx5vLUjI2g}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}, reason: apply cluster state (from master [master {sonarqube}{_Ewy-aLkTLKbdkGHHvPgBw}{v1qWPHlmSWOaAx5vLUjI2g}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]])
2021.04.26 11:05:34 INFO  es[][o.e.n.Node] started
2021.04.26 11:05:34 INFO  es[][o.e.g.GatewayService] recovered [7] indices into cluster_state
2021.04.26 11:05:36 INFO  es[][o.e.c.r.a.AllocationService] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[metadatas][0]] ...]).
2021.04.26 11:05:40 INFO  es[][o.e.n.Node] stopping ...
2021.04.26 11:05:40 INFO  es[][o.e.n.Node] stopped
2021.04.26 11:05:40 INFO  es[][o.e.n.Node] closing ...
2021.04.26 11:05:40 INFO  es[][o.e.n.Node] closed

搜索 es[][o.e.c.r.a.AllocationService] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[metadatas][0]] ...]).

说是内存不足

往前看 -Xmx512m, -Xms512m

有 /opt/sonarqube-8.4.1.35646/temp/conf/es 字样

里面的 jvm.options 这个文件写着

代码语言:javascript
复制
# This file has been automatically generated by SonarQube during startup.
# Please use sonar.search.javaOpts and/or sonar.search.javaAdditionalOpts in sonar.properties to specify jvm options for Elasticsearch

# DO NOT EDIT THIS FILE

修改 sonar 的 conf/sonar.properties

代码语言:javascript
复制
# JVM options of Elasticsearch process
sonar.search.javaOpts=-Xmx2G -Xms2G -XX:+HeapDumpOnOutOfMemoryError

依旧失败

看了下 logs/web.log 才发现真正的原因

代码语言:javascript
复制
2021.04.26 11:37:20 ERROR web[][o.s.s.p.PlatformImpl] Web server startup failed: Plugin PDF Report [pdfreport] requires at least SonarQube 8.7.0.41497
2021.04.26 11:37:20 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2021.04.26 11:37:20 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 分析过程
相关产品与服务
Elasticsearch Service
腾讯云 Elasticsearch Service(ES)是云端全托管海量数据检索分析服务,拥有高性能自研内核,集成X-Pack。ES 支持通过自治索引、存算分离、集群巡检等特性轻松管理集群,也支持免运维、自动弹性、按需使用的 Serverless 模式。使用 ES 您可以高效构建信息检索、日志分析、运维监控等服务,它独特的向量检索还可助您构建基于语义、图像的AI深度应用。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档