After upgrading java to 11 facing issue ##[error]ERROR: SonarCloud server [] can not be reached


I am using Azure Devops private agent for pipeline. I am deploying this agent on containers with java 8 it’s working fine. But once I upgrade openjdk to 11. I am getting following error:

INFO: Scanner configuration file: /vsts/agent/_work/_tasks/SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1/1.12.0/sonar-scanner/conf/
INFO: Project root configuration file: /vsts/agent/_work/1/s/
INFO: SonarScanner
INFO: Java 11.0.5 Ubuntu (64-bit)
INFO: Linux 4.15.0-1082-azure amd64
INFO: User cache: /root/.sonar/cache
##[error]ERROR: SonarCloud server [] can not be reached
ERROR: SonarCloud server [] can not be reached

Can you please help me to resolve this?

Fyi, I am using openjdk. When I revert java version to 8 it’s working fine.

Hi @Harsh_Patel and welcome to the community !

As you are using a private agent, i suggest that you look at either the certificate store (which may not be the same between Java 8 and 11) or any kind of proxy/net configuration that you may have which may not behave the same between both version.


Issue seems resolved there is issue with openjdk 11.For a reference Just need to add following commands

/usr/bin/printf '\xfe\xed\xfe\xed\x00\x00\x00\x02\x00\x00\x00\x00\xe2\x68\x6e\x45\xfb\x43\xdf\xa4\xd9\x92\xdd\x41\xce\xb6\xb2\x1c\x63\x30\xd7\x92' > /etc/ssl/certs/java/cacerts
/var/lib/dpkg/info/ca-certificates-java.postinst configure

Thanks @mickaelcaro It already resolved :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.