在安装和是用sonarqube踩过如下坑,记录一下:

1、java版本不正确

java版本的问题,主要体现在两个方面,

第一个:是需要安装对应电脑版本的jdk, 具体报如下错误:

Unable to load the Wrapper's native library 'wrapper.dll'.
          The file is located on the path at the following location but
          could not be loaded:
            F:\sonarqube-8.3.1.34397\bin\windows-x86-64\.\lib\wrapper.dll
          Please verify that the file is readable by the current user
          and that the file has not been corrupted in any way.
          One common cause of this problem is running a 32-bit version
          of the Wrapper with a 64-bit version of Java, or vica versa.
          This is a 32-bit JVM.

原因:因为本人的电脑是64位,却安装了32位的jdk

第二个:是需要安装对应sonarqube的jdk, 具体报如下错误:

WrapperSimpleApp: Encountered an error running main: java.lang.IllegalStateException: SonarQube requires Java 11 to run

ava.lang.IllegalStateException: SonarQube requires Java 11 to run
    at com.google.common.base.Preconditions.checkState(Preconditions.java:508)
    at org.sonar.application.App.checkJavaVersion(App.java:94)
    at org.sonar.application.App.start(App.java:57)
    at org.sonar.application.App.main(App.java:98)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
    at java.lang.Thread.run(Thread.java:748)
<-- Wrapper Stopped

2、sonarqube不能启动java

修改wrapper.conf配置文件

3、一直报java.io.IOException: 远程主机强迫关闭了一个现有的连接。

--> Wrapper Started as Console
Launching a JVM...
2020.05.20 16:58:10 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2020.05.20 16:58:10 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [F:\sonarqube-8.3.1.34397]: C:\Program Files\Java\jdk-11.0.7\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=F:\sonarqube-8.3.1.34397\temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/common/*;F:\sonarqube-8.3.1.34397\lib\jdbc\postgresql\postgresql-42.2.11.jar org.sonar.server.app.WebServer F:\sonarqube-8.3.1.34397\temp\sq-process5431657342893089302properties
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

2020.05.20 16:58:10 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory F:\sonarqube-8.3.1.34397\temp
2020.05.20 16:58:10 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
Exception in thread "main" java.lang.IllegalStateException: Could not read properties from file: F:\sonarqube-8.3.1.34397\temp\sq-process5431657342893089302properties
    at org.sonar.process.ConfigurationUtils.loadPropsFromCommandLineArgs(ConfigurationUtils.java:78)
    at org.sonar.process.ProcessEntryPoint.createForArguments(ProcessEntryPoint.java:169)
    at org.sonar.server.app.WebServer.main(WebServer.java:95)
Caused by: java.io.FileNotFoundException: F:\sonarqube-8.3.1.34397\temp\sq-process5431657342893089302properties (系统找不到指定的文件。)
    at java.base/java.io.FileInputStream.open0(Native Method)
    at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
    at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
    at org.sonar.process.ConfigurationUtils.loadPropsFromCommandLineArgs(ConfigurationUtils.java:75)
    ... 2 more
2020.05.20 16:58:10 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [F:\sonarqube-8.3.1.34397\elasticsearch]: C:\Program Files\Java\jdk-11.0.7\bin\java -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=F:\sonarqube-8.3.1.34397\temp -XX:ErrorFile=../logs/es_hs_err_pid%p.log -Des.enforce.bootstrap.checks=true -Xmx512m -Xms512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=F:\sonarqube-8.3.1.34397\elasticsearch -Des.path.conf=F:\sonarqube-8.3.1.34397\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2020.05.20 16:58:10 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2020.05.20 16:58:10 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [web]: 1
2020.05.20 16:58:10 INFO  app[][o.s.a.SchedulerImpl] Process[web] is stopped
2020.05.20 16:58:10 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2020.05.20 16:58:10 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2020.05.20 16:58:10 WARN  app[][o.e.t.TcpTransport] exception caught on transport layer [Netty4TcpChannel{localAddress=/127.0.0.1:51118, remoteAddress=/127.0.0.1:9001}], closing connection
java.io.IOException: 远程主机强迫关闭了一个现有的连接。
    at java.base/sun.nio.ch.SocketDispatcher.read0(Native Method)
    at java.base/sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
    at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276)
    at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:233)
    at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:223)
    at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:358)
    at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:433)
    at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
    at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:656)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:591)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:508)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:470)
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
    at java.base/java.lang.Thread.run(Thread.java:834)
2020.05.20 16:58:10 WARN  app[][o.e.t.TcpTransport] exception caught on transport layer [Netty4TcpChannel{localAddress=/127.0.0.1:51120, remoteAddress=/127.0.0.1:9001}], closing connection
java.io.IOException: 远程主机强迫关闭了一个现有的连接。
    at java.base/sun.nio.ch.SocketDispatcher.read0(Native Method)
    at java.base/sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
    at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276)
    at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:233)
    at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:223)
    at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:358)
    at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:433)
    at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
    at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:656)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:591)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:508)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:470)
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
    at java.base/java.lang.Thread.run(Thread.java:834)
2020.05.20 16:58:10 WARN  app[][o.e.t.TcpTransport] exception caught on transport layer [Netty4TcpChannel{localAddress=/127.0.0.1:51112, remoteAddress=/127.0.0.1:9001}], closing connection
java.io.IOException: 远程主机强迫关闭了一个现有的连接。
    at java.base/sun.nio.ch.SocketDispatcher.read0(Native Method)
    at java.base/sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
    at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276)
    at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:233)
    at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:223)
    at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:358)
    at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:433)
    at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
    at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:656)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:591)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:508)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:470)
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
    at java.base/java.lang.Thread.run(Thread.java:834)
2020.05.20 16:58:10 WARN  app[][o.e.t.TcpTransport] exception caught on transport layer [Netty4TcpChannel{localAddress=/127.0.0.1:51115, remoteAddress=/127.0.0.1:9001}], closing connection
java.io.IOException: 远程主机强迫关闭了一个现有的连接。

原因:

   报这个错的原因,主要因为数据库连接不成功或者端口被占用,

解决办法,首先检查一下数据库能否正确连接,如果能,请检查配置文件的参数是否正确,如果正确,确定端口是否被占用

需要修改配置sonar.properties文件

报如下错误The SonarQube service is not installed - 指定的服务未安装。 (0x0)

OpenSCManager failed - 拒绝访问。 (0x0)
The SonarQube service was not running.
SonarQube removed.
OpenSCManager failed - 拒绝访问。 (0x0)
The SonarQube service is not installed - 指定的服务未安装。 (0x0)
The SonarQube service is not installed - 指定的服务未安装。 (0x0)

5、在使用sonar-scanner时报错:

这里需要几点需要注意,就是在写配置文件的时候,需要注意:

#projectKey是项目的唯一标识,不能出现重复,可随意起,并且不能纯数字,推荐英文即可
sonar.projectKey=xxx
# this is the name displayed in the SonarQube UI,不能是中文
sonar.projectName=yyyy

SonarQube的安装部署过程中踩过的坑相关推荐

  1. Android Studio安装使用过程中踩到的坑

    首先在整成安装的过程中,会弹出一句话,Unable to access Android SDK add-on list,意思是无法访问Android SDK加载项列表 此时,你点击Cancel选项即可 ...

  2. 在使用ambari进行安装部署过程中遇到的glibc问题

    在使用ambari进行安装部署过程中遇到的glibc问题 使用 yum check rpm -e rpm -q 处理问题 报错信息如下: stderr: Traceback (most recent ...

  3. Centos7+mysql57+python3安装过程中踩过的坑

    Centos7+mysql57+python3安装过程中踩过的坑 说明: 为了练习Django项目,准备在虚拟机中安装Centos7+mysql57+python3.在windows环境下通过Navi ...

  4. azkaban的部署过程中遇到的一些坑(部署篇)

    2019独角兽企业重金招聘Python工程师标准>>> 1.azkaban源码下载 maven下载地址3.0.0版本:https://gitee.com/wenhaijin_830_ ...

  5. 启动mq 在虚拟机中_记在使用rocketmq client客户端过程中踩到的坑

    前言 最近项目中使用阿里的RocketMQ来做消息队列,具体怎么使用RocketMQ不在本文讨论范围之内,其相关帮助文档可以参考如下链接 本文主要记录在使用rocketmq client时,遇到的一些 ...

  6. 从vue文件中抽取出子组件的流程及过程中踩过的坑

    流程: 1. 确保注册.引入子组件的正确性: 创建一个新的vue文件,包含基本的template,及export的内容,其中可简单包含空的data函数.暂时先不把子组件中的代码移出.在父组件中impo ...

  7. jetson nano配置过程中踩过的坑

    一.更换源地址后apt-get update出错 解决办法: 进入桌面,打开设置 ------软件更新---------勾选所有选项,再次运行更新命令 二.python3及pip安装 sudo apt ...

  8. 阿里云rds mysql坑_配置ECS上自建MySQL作为RDS从库过程中踩到的坑

    环境: RDS版本:阿里云的5.6 ECS自建MySQL5.6.34(官方版本) 通过将阿里云rds的自动全量备份下载到ECS上,按照官方的步骤解压--> aploy-log ---> m ...

  9. 安装vagant、Orachel virtual box和homestead过程中踩坑

    安装vagant.Orachel virtual box和homestead过程中踩坑 主要参考安装过程 1.virtual box中的错误 2.ssh问题提示time out 3.vagrant u ...

最新文章

  1. 安装python爬虫scrapy踩过的那些坑和编程外的思考
  2. 验证 Boost.Optional 复制构造函数不会尝试调用从模板化参数初始化构造函数的元素类型
  3. matlab guide 将matlab处理过的图片保存
  4. 未能加载包studio package_Python包开发者的必备清单
  5. 伪静态 apache重写
  6. vue中的浏览量_Laravel 5.3和vuejs实现文章浏览次数问题
  7. java程序片的元素符号_UML 中的 基本画图元素及符号
  8. 【转】IT从业人员必看的10个论坛
  9. Eclipse 最佳字体 推荐
  10. KDJ指标详解教程跟KDJ指标详解的绝招
  11. Legend of Mir(传奇)官方源码学习1、运行游戏
  12. 宋体 ttf_Linux安装7种思源宋体的5个步骤
  13. 保存 web.xml 卡
  14. python workflow_Python 编写一个有道翻译的 workflow 教程
  15. Python复习 基础知识
  16. 消失的阅读量:你家公众号还能活多久?
  17. 如果改计算机mac,怎么修改计算机mac_修改计算机mac
  18. 新型红包套路,论推广和运营,灰产们真是一把好手
  19. 计算机三级网络技术知识点大全(七)
  20. 西门子 博途V16安装 TIA Portal V16安装 详细流程(含免费下载)

热门文章

  1. Java没有友联(函数)这个概念怎么办?
  2. java格式化html代码
  3. 2022.10.10
  4. 如何在微信小程序中下载APP?
  5. storm风暴英雄 tempo_风暴英雄玩好乔汉娜需要知道的7个技巧 TempoStorm
  6. PureMVC(AS3)剖析:实例
  7. bboss quartz定时任务使用案例介绍
  8. [转知乎]网易云音乐的歌单推荐算法是怎样的?
  9. Numpy + Matplotlib 绘制白色画图
  10. android自定义起止时间的时间刻度尺,Android 自定义View篇(六)实现时钟表盘效果...