Error SonarQube server can not be reached and PKIX path building failed

I am getting the similar issue, I am trying to run sonarqube from Azure DevOps. I am able to run the prepare sonar step successfully. but on the Sonarqube post analyses report step it fails with the same error as above - Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I also tried doing a curl on agent –
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0* Trying 10.231.221.151:443…

  • TCP_NODELAY set
  • Connected to sonarqube.insim.biz (10.231.221.151) port 443 (#0)
  • ALPN, offering h2
  • ALPN, offering http/1.1
  • successfully set certificate verify locations:
  • CAfile: /etc/ssl/certs/ca-certificates.crt

It is able to connect to sonar successfully.

Please suggest