SonarCloud webhook failure to jenkins

Template for a good new topic, formatted with Markdown:

  • ALM used (GitHub, Bitbucket Cloud, Azure DevOps)
  • CI system used (Bitbucket Cloud, Azure DevOps, Travis CI, Circle CI
  • Scanner command used when applicable (private details masked)
  • Languages of the repository
  • Only if the SonarCloud project is public, the URL
    • And if you need help with pull request decoration, then the URL to the PR too
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
  • Steps to reproduce
  • Potential workaround

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

We have added a webhook in SonarQube for a Jenkins job. Most of the time, the webhook is unable to reach out to Jenkins to update the status of SonarQube task as shown in the below screenshot.

When we restart the Jenkins, it can send the status to Jenkins as shown in the below screenshot

image

But subsequent builds in Jenkins are aborted by waiting for the status as shown in the first screenshot. When we checked the status of webhook in SonarQube, we saw the status as shown in the below screenshot

As we have analyzed the issue with various documentations and knowledge base articles, The memory and cpu resources of Jenkins pod need to be increased so we have done that as well. But it is not resolving the issue. The webhook URL is resolving as shown in the screenshot below

Hi,

What sits on your network in front of your Jenkins instance? Is there a load balancer?

 
Thx,
Ann

Hi Ann,

Yes. There is a NLB and nginx ingress controller sits in front of jenkins instance. Jenkins running as a container in EKS (elastic kubernetes service)

Thanks,

Mani

Hi Mani,

Thanks for the details. I’ve flagged this for the team.

 
Ann

Hi @mraja,

Sorry for the wait and thanks for the details on your setup. Jenkins in EKS behind an NLB and nginx ingress is a configuration we’ve seen surface webhook issues before.

To investigate further, could you please share the following?

  1. Check the webhook delivery history
    Follow this documentation to get ealier delivery results of your webhook. Is the error always the same? Do you see patterns?

  2. nginx ingress logs during a failure window
    When the next failure occurs, grab the nginx ingress controller logs and look for entries matching the SonarCloud source IP or the Jenkins upstream around that timestamp. We’re
    specifically looking for 502, 504, or upstream connection errors.

  3. NLB access logs (or VPC Flow Logs) for the same window
    This tells us whether SonarCloud’s outbound request even reaches your NLB. If there’s no entry in the NLB logs during a known failure, the problem is upstream of your
    infrastructure.

  4. Your nginx ingress timeout configuration
    Please share your relevant annotations, particularly:

    And your NLB idle timeout setting (default is 350s).

  5. Jenkins version
    What version of Jenkins are you running? (visible at the bottom-right of the Jenkins UI or via jenkins --version)

  6. Is the failure consistent across all builds after restart, or only some?
    For example: does the first build after restart always succeed and the second always fail, or is it more random than that?

The restart-fixes-it-temporarily pattern you’re seeing is a known fingerprint of a connection reuse problem: a stale connection that looks open but is silently dead on the NLB side. The logs above should let us confirm or rule that out.

Thanks!