SSL problems running azure-webapp-maven-plugin config

277 Views Asked by At

when running:

mvn com.microsoft.azure:azure-webapp-maven-plugin:1.14.0:config

I end up with

[ERROR] Failed to execute goal com.microsoft.azure:azure-webapp-maven-plugin:1.14.0:config (default-cli) on project storingen-api: Max retries 0 times exceeded. Error Details: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.microsoft.azure:azure-webapp-maven-plugin:1.14.0:config (default-cli) on project storingen-api: Max retries 0 times exceeded. Error Details: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Clearly this is a certificate problem that cannot be found. I have however no clue what certificate is needed nor in which keystore it needs to be. I suppose in the cacerts of my java distribution but it's not clear in any way.

Does anyone know which cert and where to put it ?

1

There are 1 best solutions below

0
On

I just running into the same problem following Azure Learn Java Azure

Basically, this error ocurred because Java is trying to connect with your Azure Subscription at Azure Console. I saw the origin of this problem executing Maven command with -X. The log trace can be visualized over here, like this:

mvn com.microsoft.azure:azure-webapp-maven-plugin:1.12.0:config -X

What I did to solve:

  1. I tried inserting Azure certifications inside Java cacerts - following the explanation here. But it didn't change or solved the problem.
  2. I searched for a new one version of azure-webapp-maven-plugin. Nowadays, the version is 2.3.0. You can check at Maven repository the last version. It fixed my problem and no more throws the error caused by Java.

before: mvn com.microsoft.azure:azure-webapp-maven-plugin:1.12.0:config

after (I think so, that version fixes the problem): mvn com.microsoft.azure:azure-webapp-maven-plugin:2.3.0:config

Thanks