We have some Jenkins instances running on Azure Kubernetes behind traefik and we have the sonarqube plugin installed.
For some reason, we are getting errors with the sonarqube-webhook when using sonar-scanner and sonarcloud. The errors don’t occur when using gradle.
The plugin receives the webhook call in both cases but when using sonar-scanner, an error is thrown about “Cannot find current thread”.
Taking the request content and submitting a curl request throws a 500 internal server error - though sometimes, changing the taskId causes the same request to succeed, but this is inconsistent.
I can’t figure this out, it doesn’t seem to be network related as gradle based pipelines trigger the webhook fine. It seems to be specific to any pipeline using the sonar-scanner executable.
The scans run within the pipeline and connect to sonarcloud. We have webhooks setup in sonarcloud which get sent to an azure logic app then to a service bus queue and then on to jenkins. It’s a multi step process but I’ve been triggering calls locally on the AKS cluster using curl to bypass all the extra infra and the same errors occur.
The error in the attached log was thrown after I ran a curl request but it’s identical to what happens automatically from the pipeline.
We’ve just tested bypassing the logic app and service bus and sending webhook calls directly to jenkins and this seems to be working. Not sure what’s different about the other setup as the requests are the same.
Hello @endakelly,
Sorry for the delay, we looked more into the issue but we cannot reproduce or find why this error would happen. It seems to be a low-level issue with Jenkins.
Please let us know if you can identify what is different between the direct webhook calls or when it’s going through the logic app.