The pits encountered by the sonar installation

Error one:

ERROR: Error during SonarQube Scanner execution Please provide compiled classes of your project with property

Solution: did not write**/target/classes

Error two:

WARN: Unable to locate'report-task.txt' in the workspace. Did the SonarScanner succedeed?

ERROR: SonarQube scanner exited with non-zero code: 1

Solution: configure scm and svn

Error three:

ERROR: Error during SonarQube Scanner execution

org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube

Solution: SonarQube servers on Jenkins are incorrectly configured

Other errors:

(1) The JDK version is wrong, the solution is to modify the wrapper.conf file in the sonarqube-7.1/conf directory

(2) ERROR: Error during SonarQube Scanner execution ERROR: Failed to upload report-An error has occurred. Please contact your administrator

com.mysql.jdbc.PacketTooBigException: Packet for query is too large (18307204> 16777216). You can change this value on the server by setting the max_allowed_packet' variable. It
 means that writing data to the MySQL database exceeds the single maximum The amount of data can be resolved by modifying the max_allowed_packet parameter in MySQL.

Solution steps:
1. Check the configuration file mysql.cnf of the MySQL database, which contains configuration (or command show VARIABLES like'%max_allowed_packet%';)

max_allowed_packet = 16M

2. Modify it to

max_allowed_packet = 64M

3. Then restart the MySQL container and view the following through the command

mysql start restart

View status systemctl status mysql service mysqld status find / -name mysqd

Mysql startup error: Please read "Security" section of the manual to find out how to run mysqld as root!

Specify the user through --user ./mysqld --user = root restart ./mysqld --user = root stop ./mysqld --user = root start

failed to set datadir to /usr/local/mysql/data/ Create a new data folder

If you don’t have permission, chmod -R 755 /folder -R folder and its sub-files

Re-run SonarScanner using the -X switch to enable full debug logging.

Restart sonar

Switch users Cannot start with root, otherwise es will report an error, causing sonar to fail to start, if it is found that the sonar user cannot start. Modify the permissions of this directory chmod -R 777 /opt/sonar

After walking through the pit, the integration is finally completed,