Webhooks that are used to contact a Cloudbees Jenkins are not working as they should

Hello

We are using EKS on AWS with :

  • Cloudbees Jenkins (latest version)
  • SonarQube Scanner for Jenkins (version 2.3)
  • SonarQube Enterprise (version 8.6) (using the docker image)

With Cloudbees, we have multiple Jenkins (provided by Cloudbees, aka. masters) assigned to different teams, so we need to add a webhook for each one.

We have made the analysis with Jenkins and it works fine.

But when calling the waitForQualityGate() function, it succeeds in getting the first response, then a listener is added for webhooks and finally the webhook is never reaching Jenkins.

On SonarQube’s side, the webhook is responding " Response: Server Unreachable " most of the time. But with some webhooks it works, in a unpredictable way…

On Kubernetes’ side, we tried to run a wget command on the webhook url, and it works, meaning it is not a network issue.

On Cloudbees’ side, each Jenkins master has a hibernated feature which puts them to sleep. Whenever a command is reaching a hibernated Jenkins, it goes out of sleep and then the command is executed.

We have found that if we restart our SonarQube pods, all webhooks are working well on the beginning. The issue might be because of a loss of connection with a webhook which results in a dysfunction for all webhooks.

1 Like

Well, it was odd to see this, as I assumed for a moment that I had written this and forgot about writing it. The underlying symptom we see is identical, although our architecture is a little different. We started to see “Server unreachable” from our SonarQube webhooks on the day last June that we forced requiring https connections to jenkins. We continued to see the symptom when we moved our SonarQube server from on-premise to Azure. We continue to have this problem today. No one in either of our SonarQube or Jenkins support teams has been able to find a solution. We’re using SonarQube Server 7.9.2 and Jenkins 2.235.1.

In contrast to your experience, I’m not aware of any successful webhook calls since this started, but I clearly have not checked every single call.

To deal with this, I added code to our Jenkinsfile pipeline code to manually poll for the task report file until the task is completed, so that waitForQualityGate doesn’t hang waiting for the webhook which will never occur. I can provide more details about that process if desired.

1 Like

Hi @David_Karr

Thank you for your feedback!
We’ve made a workaround on our Jenkinsfile as well.

But we wanted to see here if there was a solution on SonarQube side or if SonarSource will resolve this problem.