Hi,
I have installed Sonarqube as per the documentation on single server. The service is running fine but the Azure DevOps integration fails with the common error Invalid Azure URL or Personal Access Token
I reviewed other posts with similar error but couldn’t able to relate to the issue. Any assistance would be really helpful.
- Sonarqube Community Version 9.9
- Installed Sonarqube on single server
- Azure DevOps Server 2020 is installed which fails the integration with the PAT error.
- Verified the PAT and URL are correct
Following are the web.log in debug mode.
2023.02.14 10:52:29 DEBUG web[AYZN8OPEWmDA+/LFAAEb][o.s.a.c.a.AzureDevOpsHttpClient] check pat : [http://<azure-devops-servername>/tfs/OKCollection/_apis/projects?api-version=3.0]
2023.02.14 10:52:29 ERROR web[AYZN8OPEWmDA+/LFAAEb][o.s.a.c.a.AzureDevOpsHttpClient] Unable to contact Azure DevOps server for request [http://<azure-devops-servername>/tfs/OKCollection/_apis/projects?api-version=3.0]: Invalid personal access token
2023.02.14 10:52:29 DEBUG web[AYZN8OPEWmDA+/LFAAEb][o.i.c.TaskRunner] Q10002 scheduled after 0 µs: OkHttp ConnectionPool
2023.02.14 10:52:29 DEBUG web[][o.i.c.TaskRunner] Q10002 starting : OkHttp ConnectionPool
2023.02.14 10:52:29 DEBUG web[][o.i.c.TaskRunner] Q10002 run again after 300 s : OkHttp ConnectionPool
2023.02.14 10:52:29 DEBUG web[][o.i.c.TaskRunner] Q10002 finished run in 208 µs: OkHttp ConnectionPool
2023.02.14 10:52:34 DEBUG web[AYZN8OPEWmDA+/LFAAEd][o.a.h.i.n.c.MainClientExec] [exchange: 2751] start execution
2023.02.14 10:52:34 DEBUG web[AYZN8OPEWmDA+/LFAAEd][o.a.h.c.p.RequestAddCookies] CookieSpec selected: default
2023.02.14 10:52:34 DEBUG web[AYZN8OPEWmDA+/LFAAEd][o.a.h.c.p.RequestAuthCache] Re-using cached 'basic' auth scheme for http://127.0.0.1:9001
2023.02.14 10:52:34 DEBUG web[AYZN8OPEWmDA+/LFAAEd][o.a.h.c.p.RequestAuthCache] No credentials for preemptive authentication
2023.02.14 10:52:34 DEBUG web[AYZN8OPEWmDA+/LFAAEd][o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 2751] Request connection for {}->http://127.0.0.1:9001
2023.02.14 10:52:34 DEBUG web[AYZN8OPEWmDA+/LFAAEd][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection request: [route: {}->http://127.0.0.1:9001][total kept alive: 2; route allocated: 2 of 10; total allocated: 2 of 30]
2023.02.14 10:52:34 DEBUG web[AYZN8OPEWmDA+/LFAAEd][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection leased: [id: http-outgoing-1][route: {}->http://127.0.0.1:9001][total kept alive: 1; route allocated: 2 of 10; total allocated: 2 of 30]
2023.02.14 10:52:34 DEBUG web[AYZN8OPEWmDA+/LFAAEd][o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 2751] Connection allocated: CPoolProxy{http-outgoing-1 [ACTIVE]}
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.MainClientExec] [exchange: 2751] Attempt 1 to execute request
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.MainClientExec] [exchange: 2751] Target auth state: UNCHALLENGED
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.MainClientExec] [exchange: 2751] Proxy auth state: UNCHALLENGED
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 >> GET /_cluster/health?master_timeout=30s&level=cluster&timeout=30s HTTP/1.1
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 >> X-Elastic-Client-Meta: es=7.17.8,jv=17,t=7.17.8,hc=4.1.4,kt=1.6
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 >> Content-Length: 0
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 >> Host: 127.0.0.1:9001
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 >> Connection: Keep-Alive
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 >> User-Agent: elasticsearch-java/7.17.8 (Java/17.0.6)
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.MainClientExec] [exchange: 2751] Request completed
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 << HTTP/1.1 200 OK
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 << X-elastic-product: Elasticsearch
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 << content-type: application/json; charset=UTF-8
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 << content-length: 387
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.MainClientExec] [exchange: 2751] Response received HTTP/1.1 200 OK
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.MainClientExec] [exchange: 2751] Consume content
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 2751] Connection can be kept alive indefinitely
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.MainClientExec] [exchange: 2751] Response processed
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 2751] releasing connection
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Releasing connection: [id: http-outgoing-1][route: {}->http://127.0.0.1:9001][total kept alive: 1; route allocated: 2 of 10; total allocated: 2 of 30]
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection [id: http-outgoing-1][route: {}->http://127.0.0.1:9001] can be kept alive indefinitely
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection released: [id: http-outgoing-1][route: {}->http://127.0.0.1:9001][total kept alive: 2; route allocated: 2 of 10; total allocated: 2 of 30]
2023.02.14 10:52:34 DEBUG web[AYZN8OPEWmDA+/LFAAEd][o.a.h.i.n.c.MainClientExec] [exchange: 2752] start execution
2023.02.14 10:52:34 DEBUG web[AYZN8OPEWmDA+/LFAAEd][o.a.h.c.p.RequestAddCookies] CookieSpec selected: default
2023.02.14 10:52:34 DEBUG web[AYZN8OPEWmDA+/LFAAEd][o.a.h.c.p.RequestAuthCache] Re-using cached 'basic' auth scheme for http://127.0.0.1:9001
2023.02.14 10:52:34 DEBUG web[AYZN8OPEWmDA+/LFAAEd][o.a.h.c.p.RequestAuthCache] No credentials for preemptive authentication
2023.02.14 10:52:34 DEBUG web[AYZN8OPEWmDA+/LFAAEd][o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 2752] Request connection for {}->http://127.0.0.1:9001
2023.02.14 10:52:34 DEBUG web[AYZN8OPEWmDA+/LFAAEd][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection request: [route: {}->http://127.0.0.1:9001][total kept alive: 2; route allocated: 2 of 10; total allocated: 2 of 30]
2023.02.14 10:52:34 DEBUG web[AYZN8OPEWmDA+/LFAAEd][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection leased: [id: http-outgoing-1][route: {}->http://127.0.0.1:9001][total kept alive: 1; route allocated: 2 of 10; total allocated: 2 of 30]
2023.02.14 10:52:34 DEBUG web[AYZN8OPEWmDA+/LFAAEd][o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 2752] Connection allocated: CPoolProxy{http-outgoing-1 [ACTIVE]}
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.MainClientExec] [exchange: 2752] Attempt 1 to execute request
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.MainClientExec] [exchange: 2752] Target auth state: UNCHALLENGED
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.MainClientExec] [exchange: 2752] Proxy auth state: UNCHALLENGED
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 >> GET /_stats?level=shards HTTP/1.1
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 >> X-Elastic-Client-Meta: es=7.17.8,jv=17,t=7.17.8,hc=4.1.4,kt=1.6
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 >> Content-Length: 0
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 >> Host: 127.0.0.1:9001
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 >> Connection: Keep-Alive
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 >> User-Agent: elasticsearch-java/7.17.8 (Java/17.0.6)
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.MainClientExec] [exchange: 2752] Request completed
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 << HTTP/1.1 200 OK
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 << X-elastic-product: Elasticsearch
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 << content-type: application/json; charset=UTF-8
2023.02.14 10:52:34 DEBUG web[][o.a.http.headers] http-outgoing-1 << content-length: 106915
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.MainClientExec] [exchange: 2752] Response received HTTP/1.1 200 OK
2023.02.14 10:52:34 DEBUG web[][o.a.h.i.n.c.MainClientExec] [exchange: 2752] Consume content