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