Unauthorized error sent by SonarQube server (code 401), please provide a valid authentication token in Community Edition

Template for a good bug report, formatted with Markdown:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
  • error observed (wrap logs/code around triple quote ``` for proper formatting)
  • steps to reproduce
  • potential workaround

P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour

Hi Team,
we are using the Community Edition Version 8.1 (build 31237)LGPL v3.
in which we have auth token created for one job for authentication purpose. the jobs on every monday but from last 2 runs it got failed with an error "Unauthorized error sent by SonarQube server (code 401), please provide a valid authentication token "

after regenerating the token and running the job with it ,can able to connect to sonarqube.
can you please let us know is there any expiration period for auth tokens we have in soanrqube community edition. if yes, what are the ways through which we can prevent to the token expiration.

Hi,

Tokens don’t expire. I can’t tell what happened here. Maybe the value stored with the job accidentally got edited?

Anyway, there’s no mechanism on the SQ side to invalidate tokens after some interval.

 
Ann