'Azure devops pipeline failure : The remote server returned an error 503

I made a build pipeline in azure devops which contains a sonar Qube tasks , the pipeline works sometimes and sometimes it returns this exception :

Failed to request and parse 'server url here': The remote server returned an error: (503) Server Unavailable.

enter image description here

BTW : The server url returns 503 in azure devops task , but I can access it via the browser and works normally.

Thank you in advance



Solution 1:[1]

The problem wasn't linked to the pipeline configuration or something. but it was a performance issue in the sonar server which is not always available.

Solution 2:[2]

The error code 503 indicates the service is unavailable when the task is running.

As it sometimes works, please add some delay before the task(or before the task access the service), so that the service will be ready to access.

You can add a powershell script task with command sleep 30 ahead as the delay.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Haytham
Solution 2 wade zhou - MSFT