Example Analysis of SonarQube deployment Mining Pit
What this article shares to you is the example analysis of the SonarQube deployment pit, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
1: the first pit
7.4, which has been used locally, was specially downloaded from the official website when deployed on the server, but did not read the documentation carefully. After deployment, it was found that this version does not support mysql. Version 7.8 was the last version to support mysql, so it had to be switched to 7.8.
2: the second pit: ElasticSearch
Java.nio.file.AccessDeniedException: / usr/local/sonarQube/sonarqube-7.8/temp/conf/es/elasticsearch.yml
ElasticSearch is used in Sonar, but ElasticSearch does not support root account execution, so it needs to be run under another account.
The steps are as follows:
1: to prepare an account, whether it is a new account or an old account, you must give sonar directory permission.
2: set sonar.properties
Sonar.search.javaAdditionalOpts=-Dbootstrap.system_call_filter=false
3: set wrapper.conf
Wrapper.java.additional.1=-Dsonar.wrapped=true-Dbootstrap.system_call_filter=false
4: add content: / sonarqube-7.8/elasticsearch/config/elasticsearch.yml
Bootstrap.memory_lock: falsebootstrap.system_call_filter: false
If the above methods are not effective: temporary files may cause: delete all files in the sonarqube temp directory.
Other:
Error message: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
Reason: ordinary user execution problem
Solution: switch to root user, edit / etc/security/limits.conf
Add userName hard nofile 65536
UserName soft nofile 65536
Error message: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
Cause: the vm.max_map_count parameter setting of the operating system is too small
Solution: switch super user, edit / etc/sysctl.conf
Add vm.max_map_count=655360
Save exit, execute sysctl-p
The above is the example analysis of SonarQube deployment mining pit, the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.