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

最新文章

  1. Jquery客户端校验——jquery.validate.js
  2. VC++6.0文件关联问题的解决方法
  3. PHP移动文件指针ftell()、fseek()、rewind()总结
  4. spring的初始化bean,销毁bean之前的操作详解
  5. Notepad++ 配置java编译环境
  6. BZOJ4003 [JLOI2015]城池攻占
  7. java多线程之:线程对象一些api
  8. Qt---在QLabel上实现系统时间
  9. direction:rtl demo
  10. Linux内核结构分析与移植
  11. [LeetCode] 141&142 Linked List Cycle I & II
  12. pyqt QTableWidget例子学习(重点)
  13. ActionBarSherlock学习笔记 第一篇——部署
  14. HDU_1245_Saving James Bond_最短路
  15. PHP中require和include的区别
  16. 利用sfc文件构建网络渗透
  17. 38)django-组合搜索
  18. Python selectors实现socket并发
  19. vue 浏览器页面刷新时执行一段代码
  20. .NET中的三种Timer的区别和用法(收集)

热门文章

  1. HTML 007 链接
  2. GreenPlum 数据库创建用户、文件空间、表空间、数据库
  3. CF837D Round Subset 动态规划
  4. P2736 “破锣摇滚”乐队 Raucous Rockers
  5. 视觉SLAM十四讲(三)——三维空间刚体运动(下)
  6. 10月清北学堂培训 Day 7
  7. codeforces396C
  8. luogu_P4767 [IOI2000]邮局
  9. ZR#959
  10. Tkinter 之Combobox下拉