Random "Not authorized. Please check the properties sonar.login and sonar.password." error in TeamCity plugin

  • versions used
    • SonarQube - Version 7.9.1 (build 27448)
    • Scanner -
    • Plugin - sonar-qube-scanner.
  • error observed
    SOMETIMES our builds fail with the following error message
[17:03:51]	[Step 1/4] ERROR: Error during SonarQube Scanner execution
[17:03:51]	[Step 1/4] ERROR: Not authorized. Please check the properties sonar.login and sonar.password.
  • steps to reproduce:
    • Unclear happens randomly… same build passes on same agent upon retry.
  • potential workaround:
    • Retry usually succeeds … but this is delaying critical workflows.
1 Like


Welcome to the community!

Since this happens randomly, I would look to the stuff on the network (e.g. proxy) between the analysis machine and the SonarQube server. You might also check the server logs, although I’ll say up front that I doubt you’ll find anything interesting / relevant.


Same issue, same symptoms. We are 100% sure credentials are correct and happens only randomly.
Believe it must me some random network issue which is false positively reported as a Not authorised error. Maybe it would be good in in sonar-scaner binary will be better handled network errors and it’s logging?

Hi @navrkald,

Welcome to the community and thanks for the suggestion! We don’t see this very often at all, but if the volume picks up enough to make the cause identifiable we’ll definitely consider it!