Jenkins 통합 SonarQube 가 겪 은 오류 문 제 를 해결 하 다.
3241 단어 JenkinsSonarQube잘못 을 보고 하 다
1.jenkins 에 sonarqube 의 token 증명 서 를 추가 할 수 없습니다.
추 가 된 증빙 형식 이 잘못 되 었 기 때문에 token 을 추가 할 수 없습니다.형식 은'username with password'가 아 닌'Secret text'를 선택해 야 합 니 다.
2.sonarqube 시작 오류
# :
ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
ERROR: Elasticsearch did not exit normally - check the logs at /opt/sonarqube/logs/sonarqube.log
: SonarQube Elasticsearch, Docker Elasticsearch 。
: Linux , root :( )
sysctl -w vm.max_map_count=262144
sysctl -w fs.file-max=65536
ulimit -n 65536
ulimit -u 4096
3.es 프로그램 은 sonarqube 디 렉 터 리 에서 자바 를 찾 을 수 없습니다(또는 자바 환경 변 수 를 정의 하지 않 았 습 니 다)\#전체 오류 보고:
2021.07.12 05:59:54 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
could not find java in ES_JAVA_HOME at /opt/java/openjdk/bin/java
2021.07.12 05:59:54 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
2021.07.12 05:59:54 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
이유:sonarqube:9.0.0-comunity 최신 버 전 을 사 용 했 기 때문에 sonar 버 전 문제 일 수 있 습 니 다(잘 모 르 겠 습 니 다)
해결:낮은 버 전 으로 바 꾸 면 이 문제 가 없 을 것 입 니 다.예 를 들 어 sonarqube:8.9.1-community 버 전 입 니 다.
4.sonarqube 하 이 버 전 은 my sql 데이터 베 이 스 를 지원 하지 않 습 니 다.
\#전체 오류 보고:
Exception in thread "main" org.sonar.process.MessageException: Unsupported JDBC driver provider: mysql
원인:sonarqube 7.9 이상 my sql 데이터 베 이 스 를 지원 하지 않 습 니 다.
해결:postgresql,oracle,sqlserver 데이터베이스 로 변경
5.jenkins 프로젝트 에 sonarqube Scanner 오류 설정
\#전체 오류 보고:
ERROR: Tasks support was removed in SonarQube 7.6.
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeed?
ERROR: SonarQube scanner exited with non-zero code: 2
해결:Execute SonarQube Scanner 에서 Task to run 란 을 삭제 하고 아무것도 채 우지 마 십시오.
\#완전 오류 신고
org.sonar.java.AnalysisException: Your project contains .java files, please provide compiled classes with sonar.java.binaries property,
or exclude them from the analysis with sonar.exclusions property.
원인:sonarqube 의 sonar-자바 플러그 인 은 4.1.2 부터 sonar.java.binaries 인 자 를 강제로 요구 합 니 다.
해결:Analysis properties 설정 에'sonar.java.binaries'인 자 를 추가 합 니 다.
이로써 Jenkins 집성 SonarQube 가 만난 오류 에 관 한 이 글 은 여기까지 소개 되 었 습 니 다.더 많은 관련 Jenkins 집성 SonarQube 의 오류 내용 은 우리 의 이전 글 을 검색 하거나 아래 의 관련 글 을 계속 조회 하 시기 바 랍 니 다.앞으로 많은 응원 부탁드립니다!
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
GitLab webhook에서 jenkis 빌드소개 프로젝트 운영으로 자산을 만들 때 jenkins로 빌드하고 있습니다. 이미지 등 git에 push하고 jenkins의 매개 변수를 설정하고 포치 이것만이지만,이 작업을 수행하는 데 매일 상당한 횟수가 있습니다....
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.