Not authorized to run analysis Error

Guys, I’m using Sonar with Docker and when try the command
gradle clean build sonar -Dsonar.host.url=http://localhost:9001 I receiver this error on my java application:
image

My setup:
Sonar from Docker:

gradle.properties:
image

Thanks for help.

My first advice would be to not provide both sonar.login/sonar.password and sonar.token. Provide one or the other.

And make sure the token you’ve generated has access to both Execute Analysis and Create Projects if the project doesn’t already exist in SonarQube.