Jenkins build Sonar Scanner Last Analysis issue

sonar-scanner-6.1.0.83647-net-framework.
I have a separate server for SonarQube. Whenever I run the build pipeline in Jenkins it kicks off SonarQube analysis as well. I have a Jenkins node (Windows agent) for .NET app and run the sonar scanner using MSBuild via Jenkinsfile. The problem I have is that “Last Analysis” date doesn’t change in the Sonar dashboard.
I enabled sonar.verbose in the jenkinsfile. This time I noticed the following the jenkins build output.

Downloading from http://xx.x.xx.108:9000/api/server/version

Response received from http://xx.x.xx.108:9000/api/server/version

Downloading from http://xx.x.xx.108:9000/api/server/version failed. Http status code is ServerUnavailable. An error occured while querying the server version! Please check if the server is running and if the address is correct.

Pre-processing failed. Exit code: 1

It looks like your Jenkins agent can’t access your SonarQube server.

What happens if you run a simple curl from your Jenkins agent?

curl http://xx.x.xx.108:9000/api/server/version

Do you get the same error?

No, I tried Test-NetConnection in the jenkins node via powershell, connection succeeded. I also browsed the http://xx.x.xx.108:9000/api/server/version, and it works.

In fact, I was able to run the sonar scan from the Jenkins slave machine via command line. The same task doesn’t work from the Jenkins pipeline even though the master dispatches the job the same slave machine.