Error output when performing the sonar scanner

    stage ('Sonar Analysis') {
    steps {
    withCredentials([string(credentialsId: 'adminsonarqube', variable: 'ADMIN_SONNARQUBE')]) {
        sh '''
        export PATH="$PATH:/root/.dotnet/tools"                
        dotnet sonarscanner begin /k:"${JOB_NAME}" /d:sonar.host.url="http://IP:PORT" /d:sonar.login="$ADMIN_SONNARQUBE" \
        /d:sonar.cs.opencover.reportsPaths="/output-coverage/coverage.xml" /d:sonar.coverage.exclusions="Project/**/*" \
        /d:sonar.exclusions="Project/**/*"
        dotnet build ./Gestor-Saude.sln --configuration Release                    
        dotnet sonarscanner end /d:sonar.login="$ADMIN_SONNARQUBE"
        '''
            }
        }
    }

Error output, below.

Time Elapsed 00:44:56.21
+ dotnet sonarscanner end /d:sonar.login=****
SonarScanner for MSBuild 4.10
Using the .NET Core version of the Scanner for MSBuild
Post-processing started.
WARNING: File '/root/.nuget/packages/microsoft.net.test.sdk/16.6.1/build/netcoreapp2.1/Microsoft.NET.Test.Sdk.Program.cs' is not located under the root directory '/var/lib/jenkins/workspace/cmmi-gestor-saude-qa' and will not be analyzed.
WARNING: File '/root/.nuget/packages/xunit.runner.visualstudio/2.4.2/build/netcoreapp2.1/xunit.runner.visualstudio.dotnetcore.testadapter.dll' is not located under the root directory '/var/lib/jenkins/workspace/cmmi-gestor-saude-qa' and will not be analyzed.
WARNING: File '/root/.nuget/packages/xunit.runner.visualstudio/2.4.2/build/netcoreapp2.1/xunit.runner.reporters.netcoreapp10.dll' is not located under the root directory '/var/lib/jenkins/workspace/cmmi-gestor-saude-qa' and will not be analyzed.
WARNING: File '/root/.nuget/packages/xunit.runner.visualstudio/2.4.2/build/netcoreapp2.1/xunit.runner.utility.netcoreapp10.dll' is not located under the root directory '/var/lib/jenkins/workspace/cmmi-gestor-saude-qa' and will not be analyzed.
WARNING: File '/root/.nuget/packages/microsoft.net.test.sdk/16.5.0/build/netcoreapp2.1/Microsoft.NET.Test.Sdk.Program.cs' is not located under the root directory '/var/lib/jenkins/workspace/cmmi-gestor-saude-qa' and will not be analyzed.
Calling the SonarQube Scanner...
INFO: Scanner configuration file: /root/.dotnet/tools/.store/dotnet-sonarscanner/4.10.0/dotnet-sonarscanner/4.10.0/tools/netcoreapp3.0/any/sonar-scanner-4.4.0.2170/conf/sonar-scanner.properties
INFO: Project root configuration file: /var/lib/jenkins/workspace/cmmi-gestor-saude-qa/.sonarqube/out/sonar-project.properties
INFO: SonarScanner 4.4.0.2170
INFO: Java 11.0.7 Debian (64-bit)
INFO: Linux 4.19.0-9-amd64 amd64
INFO: User cache: /root/.sonar/cache
INFO: Scanner configuration file: /root/.dotnet/tools/.store/dotnet-sonarscanner/4.10.0/dotnet-sonarscanner/4.10.0/tools/netcoreapp3.0/any/sonar-scanner-4.4.0.2170/conf/sonar-scanner.properties
INFO: Project root configuration file: /var/lib/jenkins/workspace/cmmi-gestor-saude-qa/.sonarqube/out/sonar-project.properties
INFO: Analyzing on SonarQube server 7.9.1
INFO: Default locale: "en_US", source code encoding: "US-ASCII" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=212ms
INFO: Server id: A7EE8CF2-AW1KsKmPOStVOx1bDNeB
INFO: User cache: /root/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=159ms
INFO: Load/download plugins (done) | time=5607ms
INFO: Process project properties
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 10.630s
INFO: Final Memory: 7M/37M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.ProjectLock
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:65)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:678)
	at org.sonar.core.platform.ComponentContainer.getComponentByType(ComponentContainer.java:281)
	at org.sonar.scanner.scan.ProjectScanContainer.doBeforeStart(ProjectScanContainer.java:153)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:134)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	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:189)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.api.batch.fs.internal.DefaultInputProject
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:65)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
	at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
	at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
	at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
	at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
	at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
	at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
	at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
	at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:63)
	... 22 more
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.api.batch.bootstrap.ProjectReactor
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:65)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
	at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
	at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
	at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
	at org.picocontainer.injectors.SingleMemberInjector.getMemberArguments(SingleMemberInjector.java:61)
	at org.picocontainer.injectors.MethodInjector.getMemberArguments(MethodInjector.java:100)
	at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:112)
	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
	at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)
	at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)
	at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)
	at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)
	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:63)
	... 36 more
Caused by: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /var/lib/jenkins/workspace/cmmi-gestor-saude-qa/Gestor-Saude/Migrations/20200709174737_altera??oProduto.Designer.cs
	at java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:145)
	at java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)
	at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)
	at java.base/java.nio.file.Path.of(Path.java:147)
	at java.base/java.nio.file.Paths.get(Paths.java:69)
	at org.sonar.scanner.scan.ProjectReactorBuilder.resolvePath(ProjectReactorBuilder.java:416)
	at org.sonar.scanner.scan.ProjectReactorBuilder.checkExistenceOfPaths(ProjectReactorBuilder.java:406)
	at org.sonar.scanner.scan.ProjectReactorBuilder.cleanAndCheckModuleProperties(ProjectReactorBuilder.java:389)
	at org.sonar.scanner.scan.ProjectReactorBuilder.cleanAndCheckProjectDefinitions(ProjectReactorBuilder.java:355)
	at org.sonar.scanner.scan.ProjectReactorBuilder.cleanAndCheckProjectDefinitions(ProjectReactorBuilder.java:361)
	at org.sonar.scanner.scan.ProjectReactorBuilder.execute(ProjectReactorBuilder.java:131)
	at org.sonar.scanner.scan.MutableProjectReactorProvider.provide(MutableProjectReactorProvider.java:30)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.picocontainer.injectors.MethodInjector.invokeMethod(MethodInjector.java:129)
	at org.picocontainer.injectors.MethodInjector.access$000(MethodInjector.java:39)
	at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:113)
	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
	at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)
	at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)
	at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)
	at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)
	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:63)
	... 51 more
ERROR: 
The SonarQube Scanner did not complete successfully
17:54:50.661  Post-processing failed. Exit code: 1
[Pipeline] }
[Pipeline] // withCredentials
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Quality Gate)
Stage "Quality Gate" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Create Artifact)
Stage "Create Artifact" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Declarative: Post Actions)
[Pipeline] archiveArtifacts
Arquivamento ignorado devido ao término do build sem sucesso
[Pipeline] emailext
Sending email to: rodrigo.sjhs@gmail.com
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
$ docker stop --time=1 fafe3bfb7724f416b94ab7b335eed09d70b3a6416ab837946f5df4051d0cb547
$ docker rm -f fafe3bfb7724f416b94ab7b335eed09d70b3a6416ab837946f5df4051d0cb547
[Pipeline] // withDockerContainer
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR:  returned exit code 1
Finished: FAILURE

hi @Rodrigo_Silva

sorry for the delay here, it went under our radar

to find out more about the root cause, we’d need the .sonarqube\conf\SonarQubeAnalysisConfig.xml and the .sonarqube\conf\sonar-project.properties files (the .sonarqube folder is generated by the Scanner for MSBuild in the folder where the analysis is done).