Unable to run sonar-scanner on Jenkins box

2,011 views
Skip to first unread message

bbop...@gmail.com

unread,
Mar 1, 2018, 3:42:18 PM3/1/18
to SonarQube
Hello,

I'm attempting to get code coverage numbers for an Angular application. I am using SonarTS as a plugin. I can successfully run the analysis and push numbers to a SonarQube server on my local machine but not from the Jenkins instance. 


My Local Machine
BHollister-m:internal-gateway-ui bhollister$ sonar-scanner -v
INFO: Scanner configuration file: /Users/bhollister/dev/software/sonar-scanner-3.0.3.778-macosx/conf/sonar-scanner.properties
INFO: Project root configuration file: /Users/bhollister/dev/spaces/vertice3-internal-gateway/internal-gateway-ui/sonar-project.properties
INFO: SonarQube Scanner 3.0.3.778
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Mac OS X 10.11.6 x86_64


Jenkins Instance
INFO: Scanner configuration file: D:\software\sonar-scanner-3.0.3.778\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: D:\data\Jenkins\jobs\Vertice\jobs\internal-gateway-ui-sonarqube\workspace\sonar-project.properties
INFO: SonarQube Scanner 3.0.3.778
INFO: Java 1.8.0_152 Oracle Corporation (64-bit)
INFO: Windows Server 2008 R2 6.1 amd64


Here's the results of calling sonar-scanner -X on the Jenkins machine;

15:38:05.248 INFO: Scanner configuration file: D:\software\sonar-scanner-3.0.3.778\bin\..\conf\sonar-scanner.properties
15:38:05.253 INFO: Project root configuration file: D:\data\Jenkins\jobs\Vertice\jobs\internal-gateway-ui-sonarqube\workspace\sonar-project.properties
15:38:05.276 INFO: SonarQube Scanner 3.0.3.778
15:38:05.276 INFO: Java 1.8.0_152 Oracle Corporation (64-bit)
15:38:05.276 INFO: Windows Server 2008 R2 6.1 amd64
15:38:05.429 DEBUG: keyStore is : 
15:38:05.429 DEBUG: keyStore type is : jks
15:38:05.429 DEBUG: keyStore provider is : 
15:38:05.429 DEBUG: init keystore
15:38:05.430 DEBUG: init keymanager of type SunX509
15:38:05.591 INFO: User cache: C:\Users\bhollister\.sonar\cache
15:38:05.591 DEBUG: Extract sonar-scanner-api-batch in temp...
15:38:05.597 DEBUG: Get bootstrap index...
15:38:05.657 DEBUG: Get bootstrap completed
15:38:05.658 DEBUG: Create isolated classloader...
15:38:05.668 DEBUG: Start temp cleaning...
15:38:05.677 DEBUG: Temp cleaning done
15:38:05.677 DEBUG: Execution getVersion
15:38:05.681 DEBUG: Execution start
15:38:05.926 INFO: Publish mode
15:38:06.075 INFO: Load global settings
15:38:06.167 INFO: Load global settings (done) | time=93ms
15:38:06.176 INFO: Server id: 166be666264bcec
15:38:06.187 INFO: User cache: C:\Users\bhollister\.sonar\cache
15:38:06.401 INFO: Load plugins index
15:38:06.409 DEBUG: GET 200 http://co1-cda01sha01.test.healthe/api/plugins/installed | time=8ms
15:38:06.451 INFO: Load plugins index (done) | time=50ms
15:38:06.452 DEBUG: Load plugins
15:38:06.470 DEBUG: Load plugins (done) | time=18ms
15:38:06.493 DEBUG: API compatibility mode is enabled on plugin PMD [pmd] (built with API lower than 5.2)
15:38:06.622 DEBUG: Plugins:
15:38:06.622 DEBUG:   * CSS / SCSS / Less 3.1 (css)
15:38:06.622 DEBUG:   * SonarPython 1.8.0.1496 (python)
15:38:06.622 DEBUG:   * Code Smells 4.0.0 (smells)
15:38:06.623 DEBUG:   * PMD 2.6 (pmd)
15:38:06.623 DEBUG:   * SonarQube :: Plugins :: SCM :: SVN 1.6.0.860 (scmsvn)
15:38:06.623 DEBUG:   * SonarJS 4.1.0.6085 (javascript)
15:38:06.623 DEBUG:   * SonarC# 6.5.0.3766 (csharp)
15:38:06.623 DEBUG:   * SonarJava 5.1.0.13090 (java)
15:38:06.623 DEBUG:   * LDAP 2.2.0.608 (ldap)
15:38:06.623 DEBUG:   * Flex 2.3 (flex)
15:38:06.623 DEBUG:   * SonarQube :: Plugins :: SCM :: Git 1.3.0.869 (scmgit)
15:38:06.623 DEBUG:   * SonarXML 1.4.3.1027 (xml)
15:38:06.623 DEBUG:   * SonarPHP 2.11.0.2485 (php)
15:38:06.624 DEBUG:   * SonarTS 1.5.0.2122 (typescript)
15:38:06.624 DEBUG:   * Checkstyle 4.8 (checkstyle)
15:38:06.643 DEBUG: Execution getVersion
15:38:06.644 INFO: SonarQube server 6.7.1
15:38:06.644 INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
15:38:06.645 DEBUG: Work directory: D:\data\Jenkins\jobs\Vertice\jobs\internal-gateway-ui-sonarqube\workspace\.scannerwork
15:38:06.645 DEBUG: Execution getVersion
15:38:06.646 DEBUG: Execution execute
15:38:07.214 INFO: Process project properties
15:38:07.223 DEBUG: Process project properties (done) | time=8ms
15:38:07.597 INFO: Load project repositories
15:38:07.676 INFO: Load project repositories (done) | time=79ms
15:38:07.757 DEBUG: Available languages:
15:38:07.757 DEBUG:   * CSS => "css"
15:38:07.757 DEBUG:   * SCSS => "scss"
15:38:07.757 DEBUG:   * Less => "less"
15:38:07.757 DEBUG:   * Python => "py"
15:38:07.758 DEBUG:   * JavaScript => "js"
15:38:07.758 DEBUG:   * C# => "cs"
15:38:07.758 DEBUG:   * Java => "java"
15:38:07.758 DEBUG:   * Flex => "flex"
15:38:07.758 DEBUG:   * XML => "xml"
15:38:07.758 DEBUG:   * PHP => "php"
15:38:07.758 DEBUG:   * TypeScript => "ts"
15:38:07.773 INFO: Load quality profiles
15:38:07.804 INFO: Load quality profiles (done) | time=31ms
15:38:07.816 INFO: Load active rules
15:38:08.329 INFO: Load active rules (done) | time=513ms
15:38:08.332 INFO: Load metrics repository
15:38:08.357 INFO: Load metrics repository (done) | time=25ms
15:38:08.405 INFO: Project key: internal-gateway-ui-brian
15:38:08.406 DEBUG: Start recursive analysis of project modules
15:38:08.407 INFO: -------------  Scan internal-gateway-ui-brian
15:38:08.573 INFO: Load server rules
15:38:08.662 DEBUG: GET 200 http://co1-cda01sha01.test.healthe/api/rules/list.protobuf | time=89ms
15:38:08.680 INFO: Load server rules (done) | time=107ms
15:38:08.732 INFO: Base dir: D:\data\Jenkins\jobs\Vertice\jobs\internal-gateway-ui-sonarqube\workspace
15:38:08.732 INFO: Working dir: D:\data\Jenkins\jobs\Vertice\jobs\internal-gateway-ui-sonarqube\workspace\.scannerwork
15:38:08.735 INFO: Source paths: src
15:38:08.735 INFO: Source encoding: windows-1252, default locale: en_US
15:38:08.908 DEBUG: Declared extensions of language CSS were converted to sonar.lang.patterns.css : **/*.css
15:38:08.908 DEBUG: Declared extensions of language SCSS were converted to sonar.lang.patterns.scss : **/*.scss
15:38:08.908 DEBUG: Declared extensions of language Less were converted to sonar.lang.patterns.less : **/*.less
15:38:08.908 DEBUG: Declared extensions of language Python were converted to sonar.lang.patterns.py : **/*.py
15:38:08.908 DEBUG: Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : **/*.js,**/*.jsx,**/*.vue
15:38:08.909 DEBUG: Declared extensions of language C# were converted to sonar.lang.patterns.cs : **/*.cs
15:38:08.909 DEBUG: Declared extensions of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
15:38:08.909 DEBUG: Declared extensions of language Flex were converted to sonar.lang.patterns.flex : **/*.as
15:38:08.909 DEBUG: Declared extensions of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl
15:38:08.909 DEBUG: Declared extensions of language PHP were converted to sonar.lang.patterns.php : **/*.php,**/*.php3,**/*.php4,**/*.php5,**/*.phtml,**/*.inc
15:38:08.909 DEBUG: Declared extensions of language TypeScript were converted to sonar.lang.patterns.ts : **/*.ts,**/*.tsx
15:38:08.916 DEBUG: Initializers : 
15:38:08.917 INFO: Index files
15:38:08.920 INFO: Excluded sources: 
15:38:08.921 INFO:   **/node-modules/**
15:38:08.921 INFO:   **/*.spec.ts
15:38:08.938 DEBUG: 'src\app\app.component.css' indexed with language 'css'
15:38:08.941 DEBUG: 'src\app\app-routing.module.ts' indexed with language 'ts'
15:38:08.941 DEBUG: 'src\app\app.component.html' indexed with language 'null'
15:38:08.943 DEBUG: 'src\app\app.config.ts' indexed with language 'ts'
15:38:08.944 DEBUG: 'src\app\auth\auth.component.ts' indexed with language 'ts'
15:38:08.945 DEBUG: 'src\app\auth\auth.service.ts' indexed with language 'ts'
15:38:08.947 DEBUG: 'src\app\auth\can-deactivate.guard.ts' indexed with language 'ts'
15:38:08.948 DEBUG: 'src\app\app.module.ts' indexed with language 'ts'
15:38:08.948 DEBUG: 'src\app\auth\user-auth.guard.ts' indexed with language 'ts'
15:38:08.949 DEBUG: 'src\app\home\home.component.html' indexed with language 'null'
15:38:08.951 DEBUG: 'src\app\home\home.component.ts' indexed with language 'ts'
15:38:08.953 DEBUG: 'src\app\rxjs-extensions.ts' indexed with language 'ts'
15:38:08.954 DEBUG: 'src\app\user\account\account.component.css' indexed with language 'css'
15:38:08.952 DEBUG: 'src\app\home\home.component.css' indexed with language 'css'
15:38:08.955 DEBUG: 'src\app\user\account\account.component.html' indexed with language 'null'
15:38:08.956 DEBUG: 'src\app\user\account\account.component.ts' indexed with language 'ts'
15:38:08.958 DEBUG: 'src\app\user\change-password\change-password.component.css' indexed with language 'css'
15:38:08.959 DEBUG: 'src\app\user\change-password\change-password.component.html' indexed with language 'null'
15:38:08.961 DEBUG: 'src\app\user\change-password\change-password.component.ts' indexed with language 'ts'
15:38:08.963 DEBUG: 'src\app\user\change-password\password-manager.service.ts' indexed with language 'ts'
15:38:08.963 DEBUG: 'src\app\user\change-password\passwordUpdate.ts' indexed with language 'ts'
15:38:08.963 DEBUG: 'src\app\app.component.ts' indexed with language 'ts'
15:38:08.964 DEBUG: 'src\app\user\user.component.css' indexed with language 'css'
15:38:08.965 DEBUG: 'src\app\user\user-routing.module.ts' indexed with language 'ts'
15:38:08.965 DEBUG: 'src\app\user\user.component.html' indexed with language 'null'
15:38:08.967 DEBUG: 'src\app\user\user.component.ts' indexed with language 'ts'
15:38:08.968 DEBUG: 'src\app\user\user.module.ts' indexed with language 'ts'
15:38:08.969 DEBUG: 'src\assets\favicon.ico' indexed with language 'null'
15:38:08.969 DEBUG: 'src\assets\forms.css' indexed with language 'css'
15:38:08.970 DEBUG: 'src\assets\healthesystems-sml.png' indexed with language 'null'
15:38:08.970 DEBUG: 'src\assets\healthesystems-logo.png' indexed with language 'null'
15:38:08.971 DEBUG: 'src\assets\healthesystems.png' indexed with language 'null'
15:38:08.971 DEBUG: 'src\assets\loading.css' indexed with language 'css'
15:38:08.972 DEBUG: 'src\assets\loading.gif' indexed with language 'null'
15:38:08.972 DEBUG: 'src\assets\nav.css' indexed with language 'css'
15:38:08.972 DEBUG: 'src\assets\style.css' indexed with language 'css'
15:38:08.973 DEBUG: 'src\assets\styles.css' indexed with language 'css'
15:38:08.975 DEBUG: 'src\app\user\change-password-modal.service.ts' indexed with language 'ts'
15:38:08.975 DEBUG: 'src\environments\environment.ts' indexed with language 'ts'
15:38:08.975 DEBUG: 'src\favicon.ico' indexed with language 'null'
15:38:08.976 DEBUG: 'src\helpers\mock-user-profile.service.ts' indexed with language 'ts'
15:38:08.976 DEBUG: 'src\helpers\mock.component.ts' indexed with language 'ts'
15:38:08.976 DEBUG: 'src\index.html' indexed with language 'null'
15:38:08.977 DEBUG: 'src\main.ts' indexed with language 'ts'
15:38:08.977 DEBUG: 'src\polyfills.ts' indexed with language 'ts'
15:38:08.978 DEBUG: 'src\environments\environment.prod.ts' indexed with language 'ts'
15:38:08.979 DEBUG: 'src\styles.css' indexed with language 'css'
15:38:08.980 DEBUG: 'src\test.ts' indexed with language 'ts'
15:38:08.981 DEBUG: 'src\tsconfig.app.json' indexed with language 'null'
15:38:08.981 DEBUG: 'src\typings.d.ts' indexed with language 'ts'
15:38:08.982 DEBUG: 'src\tsconfig.spec.json' indexed with language 'null'
15:38:08.982 INFO: 51 files indexed
15:38:08.982 INFO: 8 files ignored because of inclusion/exclusion patterns
15:38:08.983 INFO: Quality profile for css: Sonar way
15:38:08.983 INFO: Quality profile for ts: Sonar way (outdated copy)
15:38:10.375 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
15:38:10.376 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
15:38:10.377 DEBUG: 'SCSS Analyzer Sensor' skipped because there is no related file in current project
15:38:10.377 DEBUG: 'Less Analyzer Sensor' skipped because there is no related file in current project
15:38:10.377 DEBUG: 'Python Squid Sensor' skipped because there is no related file in current project
15:38:10.378 DEBUG: 'SmellMeasuresSensor' skipped because there is no related file in current project
15:38:10.378 DEBUG: 'SonarJS' skipped because there is no related file in current project
15:38:10.378 DEBUG: 'SonarJS Coverage' skipped because there is no related file in current project
15:38:10.378 DEBUG: 'C#' skipped because there is no related file in current project
15:38:10.379 DEBUG: 'C# Tests Coverage Report Import' skipped because there is no related file in current project
15:38:10.379 DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project
15:38:10.379 DEBUG: 'C# Unit Test Results Import' skipped because there is no related file in current project
15:38:10.379 DEBUG: 'SurefireSensor' skipped because there is no related file in current project
15:38:10.380 DEBUG: 'JaCoCoSensor' skipped because there is no related file in current project
15:38:10.380 DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project
15:38:10.380 DEBUG: 'Flex' skipped because there is no related file in current project
15:38:10.380 DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
15:38:10.381 DEBUG: 'XML Sensor' skipped because there is no related file in current project
15:38:10.381 DEBUG: 'PHP sensor' skipped because there is no related file in current project
15:38:10.385 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
15:38:10.385 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
15:38:10.385 DEBUG: 'SCSS Analyzer Sensor' skipped because there is no related file in current project
15:38:10.385 DEBUG: 'Less Analyzer Sensor' skipped because there is no related file in current project
15:38:10.385 DEBUG: 'Python Squid Sensor' skipped because there is no related file in current project
15:38:10.386 DEBUG: 'SmellMeasuresSensor' skipped because there is no related file in current project
15:38:10.386 DEBUG: 'SonarJS' skipped because there is no related file in current project
15:38:10.386 DEBUG: 'SonarJS Coverage' skipped because there is no related file in current project
15:38:10.386 DEBUG: 'C#' skipped because there is no related file in current project
15:38:10.386 DEBUG: 'C# Tests Coverage Report Import' skipped because there is no related file in current project
15:38:10.387 DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project
15:38:10.387 DEBUG: 'C# Unit Test Results Import' skipped because there is no related file in current project
15:38:10.387 DEBUG: 'SurefireSensor' skipped because there is no related file in current project
15:38:10.387 DEBUG: 'JaCoCoSensor' skipped because there is no related file in current project
15:38:10.387 DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project
15:38:10.388 DEBUG: 'Flex' skipped because there is no related file in current project
15:38:10.388 DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
15:38:10.388 DEBUG: 'XML Sensor' skipped because there is no related file in current project
15:38:10.388 DEBUG: 'PHP sensor' skipped because there is no related file in current project
15:38:10.392 DEBUG: Sensors : CSS Analyzer Sensor -> Embedded CSS Analyzer Sensor -> SonarJavaXmlFileSensor -> Analyzer for "php.ini" files -> SonarTS -> SonarTS Coverage -> Zero Coverage Sensor -> CPD Block Indexer
15:38:10.392 INFO: Sensor CSS Analyzer Sensor [css]
15:38:10.704 INFO: 11 source files to be analyzed
15:38:10.705 DEBUG: Analyzing D:/data/Jenkins/jobs/Vertice/jobs/internal-gateway-ui-sonarqube/workspace/src/app/app.component.css...
15:38:10.743 DEBUG: Not enough content in 'src/app/app.component.css' to have CPD blocks, it will not be part of the duplication detection
15:38:10.754 DEBUG: Analyzing D:/data/Jenkins/jobs/Vertice/jobs/internal-gateway-ui-sonarqube/workspace/src/app/home/home.component.css...
15:38:10.758 DEBUG: Not enough content in 'src/app/home/home.component.css' to have CPD blocks, it will not be part of the duplication detection
15:38:10.759 DEBUG: Analyzing D:/data/Jenkins/jobs/Vertice/jobs/internal-gateway-ui-sonarqube/workspace/src/app/user/account/account.component.css...
15:38:10.761 DEBUG: Not enough content in 'src/app/user/account/account.component.css' to have CPD blocks, it will not be part of the duplication detection
15:38:10.763 DEBUG: Analyzing D:/data/Jenkins/jobs/Vertice/jobs/internal-gateway-ui-sonarqube/workspace/src/app/user/change-password/change-password.component.css...
15:38:10.766 DEBUG: Not enough content in 'src/app/user/change-password/change-password.component.css' to have CPD blocks, it will not be part of the duplication detection
15:38:10.767 DEBUG: Analyzing D:/data/Jenkins/jobs/Vertice/jobs/internal-gateway-ui-sonarqube/workspace/src/app/user/user.component.css...
15:38:10.769 DEBUG: Not enough content in 'src/app/user/user.component.css' to have CPD blocks, it will not be part of the duplication detection
15:38:10.770 DEBUG: Analyzing D:/data/Jenkins/jobs/Vertice/jobs/internal-gateway-ui-sonarqube/workspace/src/assets/forms.css...
15:38:10.880 DEBUG: 'src/assets/forms.css' generated metadata  with charset 'windows-1252'
15:38:10.899 DEBUG: Analyzing D:/data/Jenkins/jobs/Vertice/jobs/internal-gateway-ui-sonarqube/workspace/src/assets/loading.css...
15:38:10.911 DEBUG: 'src/assets/loading.css' generated metadata  with charset 'windows-1252'
15:38:10.913 DEBUG: Not enough content in 'src/assets/loading.css' to have CPD blocks, it will not be part of the duplication detection
15:38:10.915 DEBUG: Analyzing D:/data/Jenkins/jobs/Vertice/jobs/internal-gateway-ui-sonarqube/workspace/src/assets/nav.css...
15:38:11.067 DEBUG: 'src/assets/nav.css' generated metadata  with charset 'windows-1252'
15:38:11.096 DEBUG: Analyzing D:/data/Jenkins/jobs/Vertice/jobs/internal-gateway-ui-sonarqube/workspace/src/assets/style.css...
15:38:11.110 DEBUG: 'src/assets/style.css' generated metadata  with charset 'windows-1252'
15:38:11.118 DEBUG: Analyzing D:/data/Jenkins/jobs/Vertice/jobs/internal-gateway-ui-sonarqube/workspace/src/assets/styles.css...
15:38:11.150 DEBUG: 'src/assets/styles.css' generated metadata  with charset 'windows-1252'
15:38:11.155 DEBUG: Analyzing D:/data/Jenkins/jobs/Vertice/jobs/internal-gateway-ui-sonarqube/workspace/src/styles.css...
15:38:11.156 DEBUG: 'src/styles.css' generated metadata  with charset 'windows-1252'
15:38:11.158 DEBUG: Not enough content in 'src/styles.css' to have CPD blocks, it will not be part of the duplication detection
15:38:11.192 INFO: Sensor CSS Analyzer Sensor [css] (done) | time=800ms
15:38:11.192 INFO: Sensor Embedded CSS Analyzer Sensor [css]
15:38:11.194 INFO: 6 source files to be analyzed
15:38:11.194 INFO: 11/11 source files have been analyzed
15:38:11.195 DEBUG: Analyzing D:/data/Jenkins/jobs/Vertice/jobs/internal-gateway-ui-sonarqube/workspace/src/app/app.component.html...
15:38:11.197 DEBUG: Analyzing D:/data/Jenkins/jobs/Vertice/jobs/internal-gateway-ui-sonarqube/workspace/src/app/home/home.component.html...
15:38:11.199 DEBUG: Analyzing D:/data/Jenkins/jobs/Vertice/jobs/internal-gateway-ui-sonarqube/workspace/src/app/user/account/account.component.html...
15:38:11.199 DEBUG: Analyzing D:/data/Jenkins/jobs/Vertice/jobs/internal-gateway-ui-sonarqube/workspace/src/app/user/change-password/change-password.component.html...
15:38:11.201 DEBUG: Analyzing D:/data/Jenkins/jobs/Vertice/jobs/internal-gateway-ui-sonarqube/workspace/src/app/user/user.component.html...
15:38:11.201 DEBUG: Analyzing D:/data/Jenkins/jobs/Vertice/jobs/internal-gateway-ui-sonarqube/workspace/src/index.html...
15:38:11.202 INFO: Sensor Embedded CSS Analyzer Sensor [css] (done) | time=10ms
15:38:11.202 INFO: Sensor SonarJavaXmlFileSensor [java]
15:38:11.203 INFO: Sensor SonarJavaXmlFileSensor [java] (done) | time=1ms
15:38:11.203 INFO: Sensor Analyzer for "php.ini" files [php]
15:38:11.204 INFO: 6/6 source files have been analyzed
15:38:11.207 INFO: Sensor Analyzer for "php.ini" files [php] (done) | time=4ms
15:38:11.207 INFO: Sensor SonarTS [typescript]
15:38:11.219 DEBUG: TypeScript compiler is found in this directory D:\data\Jenkins\jobs\Vertice\jobs\internal-gateway-ui-sonarqube\workspace\node_modules
15:38:11.220 DEBUG: It will be used for analysis of typescript files
15:38:11.221 DEBUG: Deploying bundle from `/sonarts-bundle.zip` to `D:\data\Jenkins\jobs\Vertice\jobs\internal-gateway-ui-sonarqube\workspace\.scannerwork`
15:38:11.861 DEBUG: Checking node version
15:38:12.077 DEBUG: Using Node.js v7.9.0
15:38:12.081 DEBUG: Analyzing 26 typescript file(s) with the following configuration file D:\data\Jenkins\jobs\Vertice\jobs\internal-gateway-ui-sonarqube\workspace\tsconfig.json
15:38:12.135 DEBUG: Setting 'NODE_PATH' to D:\data\Jenkins\jobs\Vertice\jobs\internal-gateway-ui-sonarqube\workspace\node_modules
15:38:12.135 DEBUG: Starting external process `node --max-old-space-size=2048 D:\data\Jenkins\jobs\Vertice\jobs\internal-gateway-ui-sonarqube\workspace\.scannerwork\sonarts-bundle\node_modules\tslint-sonarts\bin\tsrunner`
15:38:12.468 INFO: ------------------------------------------------------------------------
15:38:12.468 INFO: EXECUTION FAILURE
15:38:12.469 INFO: ------------------------------------------------------------------------
15:38:12.469 INFO: Total time: 7.254s
15:38:12.588 INFO: Final Memory: 53M/318M
15:38:12.588 INFO: ------------------------------------------------------------------------
15:38:12.617 DEBUG: Execution getVersion
15:38:12.618 DEBUG: Execution stop



The stacktrace is here;

D:\data\Jenkins\jobs\Vertice\jobs\internal-gateway-ui-sonarqube\workspace>sonar-scanner -X > sonar-scanner-results.txt
15:38:12.460 ERROR: FATAL ERROR: deserialize context Allocation failed - process out of memory
15:38:12.589 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Failed to run external process `node --max-old-space-size=2048 D:\data\Jenkins\jobs\Vertice\jobs\internal-gateway-ui-sonarqube\workspace\.scan
        at org.sonar.plugin.typescript.ExternalTypescriptSensor.executeExternalRunner(ExternalTypescriptSensor.java:232)
        at org.sonar.plugin.typescript.ExternalTypescriptSensor.analyze(ExternalTypescriptSensor.java:131)
        at org.sonar.plugin.typescript.ExternalTypescriptSensor.execute(ExternalTypescriptSensor.java:109)
        at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)
        at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:88)
        at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:82)
        at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:68)
        at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:88)
        at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:180)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
        at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:288)
        at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:283)
        at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:261)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
        at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
        at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
        at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
        at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
        at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:111)
        at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
        at com.sun.proxy.$Proxy0.execute(Unknown Source)
        at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
        at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
        at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
        at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
        at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.io.IOException: The pipe has been ended
        at java.io.FileOutputStream.writeBytes(Native Method)
        at java.io.FileOutputStream.write(FileOutputStream.java:326)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
        at java.io.FilterOutputStream.close(FilterOutputStream.java:158)
        at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:320)
        at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:149)
        at java.io.OutputStreamWriter.close(OutputStreamWriter.java:233)
        at org.sonar.plugin.typescript.ExternalTypescriptSensor.executeExternalRunner(ExternalTypescriptSensor.java:221)
        ... 34 more


Does anyone have any info that will get me over the hump? 

BTW, my apologies for such a long post but i wanted to try and be helpful and provide everything that would be needed.


Thank you, 

Brian


nicolas...@sonarsource.com

unread,
Mar 2, 2018, 5:29:32 AM3/2/18
to SonarQube
Hi Brian,

Two interesting things in your log and error/stacktrace:
  • process out of memory
  • Failed to run external process `node ...
I therefore suggest you start by:
  • making sure that your Jenkins slaves complies with SonarTS requirements (see prerequisites and node/typescript notes in the steps to analyze)
  • check that there isn't any resource related (e.g. not enough memory) issue on the agent itself
Fact that it works on your local machine, and the kind of error seen in Jenkins (as pointed here), show that you should definitely focus on the setup and environment, more than on the analysis configuration itself.

Best regards,
Nicolas

bbop...@gmail.com

unread,
Mar 2, 2018, 1:47:07 PM3/2/18
to SonarQube
test

bbop...@gmail.com

unread,
Mar 2, 2018, 1:56:27 PM3/2/18
to SonarQube
Hello,

Per your request, i have checked the SonarTS requirements and the results are as follows;

My Local Machine
Node v6.10.0
Typescript 2.0.10


Jenkins Instance
Node v7.9.0
Typescript 2.7.2

So, ironically, the requisites on my local machine do not meet the requirements while the ones on the Jenkins instance surpass them. 

In reference to the typescript notes;

In your project, make sure to have typescript as a project dependency or dev dependency. If it's not the case, add it : cd your-project-folder; npm install --only=dev typescript

  1. If you can't have typescript as a project dependency you can set your 'NODE_PATH' variable to point to your globally installed typescript, but this is generally discouraged in the node.js documentation.


I do have a dev dependency in the project. This is from my package.json;

"devDependencies": {
"@angular/cli": "^1.6.3",
"@angular/compiler-cli": "~5.0.0",
"@hes/bootstrap": "~2.0.0",
"@hes/core": "~2.0.3",
"@hes/shared": "~2.0.0",
"@types/jasmine": "~2.5.38",
"@types/jasminewd2": "~2.0.2",
"@types/jquery": "~2.0.41",
"@types/moment": "~2.13.0",
"@types/node": "~6.0.60",
"angular-in-memory-web-api": "^0.5.1",
"autoprefixer": "~6.5.3",
"bootstrap": "~3.3.7",
"codelyzer": "~3.2.0",
"css-loader": "~0.26.1",
"cssnano": "~3.10.0",
"exports-loader": "~0.6.3",
"file-loader": "~0.10.0",
"font-awesome": "~4.7.0",
"font-awesome-webpack": "~0.0.4",
"gulp": "~3.9.1",
"gulp-zip": "~4.0.0",
"istanbul-instrumenter-loader": "~2.0.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"json-loader": "~0.5.4",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "~1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "~0.2.2",
"karma-sourcemap-loader": "~0.3.7",
"less-loader": "~2.2.3",
"postcss-loader": "~0.13.0",
"postcss-url": "~5.1.2",
"protractor": "~5.1.2",
"raw-loader": "~0.5.1",
"sass-loader": "^4.1.1",
"script-loader": "~0.7.0",
"source-map-loader": "~0.1.5",
"style-loader": "~0.13.1",
"stylus-loader": "~2.4.0",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "~2.4.0",
"url-loader": "~0.5.7",
"webpack-dev-server": "~2.3.0"
}


In regards to your second bullet point, i did have the machine's memory upgraded to 16 GB. However, i am receiving the same exact error message. 



One thing that jumps out to me, is that in the log output i see the setting of the NODE_PATH variable even though the project contains the dependency. 


Thank you,

Brian







On Thursday, March 1, 2018 at 3:42:18 PM UTC-5, bbop...@gmail.com wrote:

Tibor Blenessy

unread,
Mar 5, 2018, 4:41:31 AM3/5/18
to bbop...@gmail.com, SonarQube
Hello Brian,

how much memory do you have available on your local machine and on jenkins worker? If possible try to increase available memory on the jenkins worker and try analysis again.

Regards,

Tibor

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/8f95fd6b-6b8c-4223-89d5-da6d5f6cbb51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Tibor Blenessy | SonarSource

Language Analyzer Developer

https://sonarsource.com 

bbop...@gmail.com

unread,
Mar 5, 2018, 10:01:48 AM3/5/18
to SonarQube
Good Morning,

Our Jenkins instance uses a WAR install running Pivotal TC Server on a Windows OS. It is currently configured with the following Java memory options;

wrapper.java.additional.8="-Xmx4096M"
wrapper.java.additional.9="-Xss512K"
wrapper.java.additional.10="-Xms2048M"
wrapper.java.additional.11="-XX:MaxPermSize=512m"

For the time being, while i await feedback i am going to double each one and try again. 

Thank you, 

Brian

bbop...@gmail.com

unread,
Mar 5, 2018, 10:31:36 AM3/5/18
to SonarQube
Hello Again,

As stated above, i doubled each number and still get the same issue....

wrapper.java.additional.8="-Xmx8192M"
wrapper.java.additional.9="-Xss1024K"
wrapper.java.additional.10="-Xms4096M"
wrapper.java.additional.11="-XX:MaxPermSize=1024m"

Thank you,

Brian

Tibor Blenessy

unread,
Mar 5, 2018, 12:00:15 PM3/5/18
to bbop...@gmail.com, SonarQube
Can you try to test locally with same Node and TypeScript version as you have on your Jenkins job?

Tibor

On Fri, Mar 2, 2018 at 7:56 PM <bbop...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/8f95fd6b-6b8c-4223-89d5-da6d5f6cbb51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bbop...@gmail.com

unread,
Mar 5, 2018, 3:07:40 PM3/5/18
to SonarQube
Hello Tibor,

I updated my local machine to maintain the same exact versions that are the Jenkins box;

Node - 7.9.0
Tsc - 2.7.2

I am still able to run the sonar-scanner successfully on my local but not on the Jenkins instance. 

Thanks, 

Brian

Tibor Blenessy

unread,
Mar 6, 2018, 3:55:08 AM3/6/18
to bbop...@gmail.com, SonarQube
Hello Brian,

you will need to check memory consumption by different processes on your Jenkins box during the build. From the logs I see that failing process is the NodeJS process which is started during the analysis of TypeScript files by sonar-scanner. So Jenkins Java memory settings you modified have no impact on this, in fact they can be counter-productive because Java process will not do garbage collection aggressively and will "occupy" more memory than necessary.

In our tests we are able to analyze quite big projects with 2G of heap for this NodeJS process, so if there is enough physical memory available in the system, this should just work. 

Tibor


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages