zoukankan      html  css  js  c++  java
  • sonar:api/ce/submit接口上传失败

    https://blog.csdn.net/weixin_34185320/article/details/87115268

    https://ask.helplib.com/others/post_12706136

    https://stackoverflow.com/questions/37997306/error-500-during-sonar-runner-execution-on-jenkins

    报错截图:

    报错原因查看:

      sonarqube的web.log文件报错如下:

    Caused by: com.mysql.jdbc.PacketTooBigException: Packet for query is too large (6324977 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.
        at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3681)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2512)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2486)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
        at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2079)
        at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2013)
        at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5104)
        at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1998)
        at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136)
        at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136)
        at org.sonar.db.ce.CeTaskInputDao.insert(CeTaskInputDao.java:53)
        ... 48 common frames omitted

    1、修改mysql配置

      在my.ini(或者my.conf)文件中添加如下三行配置

    [mysqld]
    max_allowed_packet=512M
    innodb_log_file_size=256M

    2、修改sonar.properties配置

      增加&max_allowed_packet=512M配置,与mysql

    sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&max_allowed_packet=512M

    3、重启mysql和sonar

  • 相关阅读:
    golang linux安装
    vscode 插件
    windows访问eks pods
    go mod包管理
    beego创建项目
    Atcoder ARC-125
    AtCoder AGC003 简要题解
    Python 字符串转成变量名
    13_Go基础(binary)
    12_Go基础(iota)
  • 原文地址:https://www.cnblogs.com/gcgc/p/11053034.html
Copyright © 2011-2022 走看看