Questions for Confluence license has expired.

Please purchase a new license to continue using Questions for Confluence.

Tengo error al ejecutar sonar-scanner 2.8 - sonar 7.5 desde jenkins

 
1
0
-1
Started by user Moreno Romero, Leticia Nataly (lnmoreno)
Building remotely on slave_windows_MADVMNJNKNSSW06 in workspace D:\JenkinsSlaveHome\jenkinsLPFSW\workspace\job1
using credential ad19a32b-1f2f-4f46-a932-e430a746ffc7
 > C:\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > C:\Git\bin\git.exe config remote.origin.url https://bitbucket.indra.es/scm/lpfsw/clinicaweb.git # timeout=10
Fetching upstream changes from https://bitbucket.indra.es/scm/lpfsw/clinicaweb.git
 > C:\Git\bin\git.exe --version # timeout=10
using GIT_ASKPASS to set credentials 
 > C:\Git\bin\git.exe fetch --tags --progress https://bitbucket.indra.es/scm/lpfsw/clinicaweb.git +refs/heads/*:refs/remotes/origin/*
 > C:\Git\bin\git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
 > C:\Git\bin\git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10
Checking out Revision 87c12886539f17c6dce44e4fcc52f0e941e9ab0f (refs/remotes/origin/master)
 > C:\Git\bin\git.exe config core.sparsecheckout # timeout=10
 > C:\Git\bin\git.exe checkout -f 87c12886539f17c6dce44e4fcc52f0e941e9ab0f
Commit message: "sonar-project.properties edited online with Bitbucket"
 > C:\Git\bin\git.exe rev-list --no-walk bf15ea3ee4fd2f376fb90435527ce83ade0e03fc # timeout=10
[job1] $ "C:\Program Files\sonar-scanner-2.8-prod\bin\sonar-scanner.bat" -Dsonar.host.url=https://sonarqube.indra.es ******** -Dproject.settings=D:\JenkinsSlaveHome\jenkinsLPFSW\workspace\job1\sonar-project.properties -Dsonar.projectBaseDir=D:\JenkinsSlaveHome\jenkinsLPFSW\workspace\job1
C:\Program Files\sonar-scanner-2.8-prod\bin\..
INFO: Scanner configuration file: C:\Program Files\sonar-scanner-2.8-prod\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: D:\JenkinsSlaveHome\jenkinsLPFSW\workspace\job1\sonar-project.properties
INFO: SonarQube Scanner 2.8
INFO: Java 1.8.0_181 Oracle Corporation (64-bit)
INFO: Windows Server 2012 R2 6.3 amd64
INFO: User cache: C:\Users\Administrator\.sonar\cache
INFO: Publish mode
INFO: Load global settings
INFO: Load global settings (done) | time=129ms
INFO: Server id: A605EF81-AWd5H0kvplzSgAk2IyU1
INFO: User cache: C:\Users\Administrator\.sonar\cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=44ms
INFO: Load/download plugins (done) | time=283ms
INFO: Loaded core extensions: branch-scanner
INFO: SonarQube server 7.5.0
INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=4ms
INFO: Load project branches
INFO: Load project branches (done) | time=14ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=6ms
INFO: Load branch configuration
INFO: Load branch configuration (done) | time=3ms
INFO: Load project repositories
INFO: Load project repositories (done) | time=10ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=37ms
INFO: Load active rules
INFO: Load active rules (done) | time=834ms
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=34ms
INFO: Project key: MInd:LPFSW
INFO: Project base dir: D:\JenkinsSlaveHome\jenkinsLPFSW\workspace\job1
INFO: -------------  Scan job1
INFO: Base dir: D:\JenkinsSlaveHome\jenkinsLPFSW\workspace\job1
INFO: Working dir: D:\JenkinsSlaveHome\jenkinsLPFSW\workspace\job1\.sonar
INFO: Source paths: Fuentes/clinica_web/WEB-INF/src/com/clinica/controller
INFO: Source encoding: windows-1252, default locale: en_US
INFO: Language is forced to java
INFO: Index files
INFO: 9 files indexed
INFO: Quality profile for java: Sonar way
INFO: Sensor JavaSquidSensor [java]
INFO: Configured Java source version (sonar.java.source): none
INFO: JavaClasspath initialization
INFO: JavaClasspath initialization (done) | time=16ms
INFO: JavaTestClasspath initialization
INFO: JavaTestClasspath initialization (done) | time=0ms
INFO: Java Main Files AST scan
INFO: 9 source files to be analyzed
WARN: Invalid character encountered in file D:/JenkinsSlaveHome/jenkinsLPFSW/workspace/job1/Fuentes/clinica_web/WEB-INF/src/com/clinica/controller/ProcesoSolicitud.java at line 409 for encoding windows-1252. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
WARN: Classes not found during the analysis : [javax.servlet.http.HttpServletRequest]
INFO: 9/9 source files have been analyzed
INFO: Java Main Files AST scan (done) | time=9119ms
INFO: Java Test Files AST scan
INFO: 0 source files to be analyzed
INFO: Java Test Files AST scan (done) | time=1ms
INFO: Sensor JavaSquidSensor [java] (done) | time=9775ms
INFO: Sensor SurefireSensor [java]
INFO: parsing [D:\JenkinsSlaveHome\jenkinsLPFSW\workspace\job1\target\surefire-reports]
ERROR: Reports path not found or is not a directory: D:\JenkinsSlaveHome\jenkinsLPFSW\workspace\job1\target\surefire-reports
INFO: 0/0 source files have been analyzed
INFO: Sensor SurefireSensor [java] (done) | time=3ms
INFO: Sensor JaCoCoSensor [java]
INFO: JaCoCo report not found: 'target/jacoco.exec'
INFO: JaCoCo report not found: 'target/jacoco-it.exec'
INFO: Sensor JaCoCoSensor [java] (done) | time=1ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=1ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=13ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=3ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=68ms
INFO: Sensor JavaSecuritySensor [security]
INFO: Reading UCFGs from: D:\JenkinsSlaveHome\jenkinsLPFSW\workspace\job1\.sonar\ucfg2\java
INFO: UCFGs: 3, excluded: 3, source entrypoints: 0
INFO: No UCFGs have been included for analysis.
INFO: Sensor JavaSecuritySensor [security] (done) | time=58ms
INFO: Sensor CSharpSecuritySensor [security]
INFO: Reading UCFGs from: D:\JenkinsSlaveHome\jenkinsLPFSW\workspace\job1\ucfg_cs2
INFO: UCFGs: 0, excluded: 0, source entrypoints: 0
INFO: No UCFGs have been included for analysis.
INFO: Sensor CSharpSecuritySensor [security] (done) | time=0ms
INFO: Sensor Java CPD Block Indexer
INFO: Sensor Java CPD Block Indexer (done) | time=162ms
INFO: SCM Publisher is disabled
INFO: 1 file had no CPD blocks
INFO: Calculating CPD for 8 files
INFO: CPD calculation finished
INFO: Analysis report generated in 283ms, dir size=567 KB
INFO: Analysis reports compressed in 69ms, zip size=142 KB
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 18.261s
INFO: Final Memory: 75M/680M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Insufficient privileges
ERROR: 
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeeded?
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILURE


Soy nueva viendo éstos temas, por favor si pueden ayudarme. 



    CommentAdd your comment...

    3 answers

    1.  
      1
      0
      -1

      Hola,

      Pues diría que sí, en teoría sonar esta diseñado para pasarse a código fuente. En el caso de java no se si analizará un .jar o un war.

      Un saludo

      CommentAdd your comment...
    2.  
      1
      0
      -1

      consulta, impacta que el cod se encuentre compilado o no? 

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hola,

        Aparentemente el análisis lo está realizando:

        9/9 source files have been analyzed, 

        INFO: Analysis report generated in 283ms, dir size=567 KB

        INFO: Analysis reports compressed in 69ms, zip size=142 KB

        Parece que no encuentra el report-task, que viene a ser el fichero que envía la información a la  bbdd/servidor de sonar o que no tiene permisos para trabajar con el.

        Yo miraría a ver si te lo esta creado, en caso de que lo cree que la ruta para llegar a él sea correcta y si esto está bien, miraría que no se estuviese borrando la zona de trabajo de jenkins y el tema de permisos.

        Un saludo

          CommentAdd your comment...