Scm scanner step fails with locale error

I’m using SonarQube server 8.2 and sonarscanner dotnet commandline tool 4.10, running it in Gitlab pipeline. Some files in my project have russian names. They were scanned normally in previous (7.4) version of Sonarqube server because scm plugin was disabled. After upgrading to 8.2 I’ve got git support bundled and now scanner fails on end step:

INFO: SonarScanner 4.4.0.2170
INFO: Java 11.0.8 Debian (64-bit)
INFO: Linux 5.4.0-51-generic 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: ***/.sonarqube/out/sonar-project.properties
INFO: Analyzing on SonarQube server 8.2.0
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Load global settings
INFO: Load global settings (done) | time=147ms
INFO: Server id: E67A3FDF-AWc8CQEwAaHYi0F1k9kI
INFO: User cache: /root/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=43ms
INFO: Load/download plugins (done) | time=1431ms
INFO: Process project properties
INFO: Process project properties (done) | time=39ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=58ms
INFO: Project key: ***
INFO: Base dir: ***
INFO: Working dir: ***/.sonarqube/out/.sonar
INFO: Load project settings for component key: ***
INFO: Load project settings for component key: *** (done) | time=20ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=42ms
INFO: Detected Gitlab CI
INFO: Load active rules
INFO: Load active rules (done) | time=485ms
INFO: Indexing files...
INFO: Project configuration:
INFO:   Excluded sources: src/*.Migrations*/**/*, src/_db-scripts/**/*
INFO:   Excluded sources for coverage: .sonarqube/**/*, **/*.xml, tests/**/*
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 4.883s
INFO: Final Memory: 10M/44M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: src/_db-scripts/??????????????. ???????? ?? ???????????????????????? 1.psql

When starting it shows Default locale: "en_US".

But the problem is that real locale is set to ‘ru-RU.UTF-8’, and in same pipeline when i call locale it shows just fine and all the other pipeline steps uses this locale fine:

$ locale
LANG=ru_RU.UTF-8
LANGUAGE=
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=ru_RU.UTF-8

Hello.
Could you please run the scanner with debug enabled? You can add -X to the command.
Thanks.

Hi,

sorry for the delay

  • please give us the verbose output of the END step (please run SonarScanner.MSBuild.exe begin /k:"MyProject" /d:sonar.verbose=true as the BEGIN step, and please attach the output of END step)

to get the full stack trace

ouch, I already dropped any hopes for help on this topic.
We’re using it with scm disabled since then. I’ll try to reproduce it again and come back with logs then.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.