Class path initialization error: no alternative DNS names matching .gradle.org services were found. & # 8594; when running grails 3.0.1 application

I created and launched the grails 3.0.1 application at work, but was unable to run it on my personal computer. I followed the same installation method for grails 3.0.1 (via gvm). The problem seems to be related to gradle, as the grails create-app is working fine. I can also compile the application using gradle, but I can not start the application. I am using gradle 2.3.

The full error is as follows:

Error Error initializing classpath: No subject alternative DNS name matching services.gradle.org found. java.security.cert.CertificateException: No subject alternative DNS name matching services.gradle.org found. at sun.security.util.HostnameChecker.matchDNS(HostnameChecker.java:191) at sun.security.util.HostnameChecker.match(HostnameChecker.java:93) at sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:347) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:203) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1428) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:209) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:901) at sun.security.ssl.Handshaker.process_record(Handshaker.java:837) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1023) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343) at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254) at org.gradle.wrapper.Download.downloadInternal(Download.java:58) at org.gradle.wrapper.Download.download(Download.java:44) at org.gradle.tooling.internal.consumer.DistributionFactory$ProgressReportingDownload.download(DistributionFactory.java:177) at org.gradle.wrapper.Install$1.call(Install.java:59) at org.gradle.wrapper.Install$1.call(Install.java:46) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) at org.gradle.wrapper.Install.createDist(Install.java:46) at org.gradle.tooling.internal.consumer.DistributionFactory$ZippedDistribution$1.call(DistributionFactory.java:122) at org.gradle.tooling.internal.consumer.DistributionFactory$ZippedDistribution$1.call(DistributionFactory.java:116) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 
+5
source share
2 answers

The https://services.gradle.org/ certificate seems to be confused .

As a temporary temporary, you can download the gradle shell via http instead of https. To do this, you need to change the configuration of the Grails shell. I edited build.gradle

 task wrapper(type: Wrapper) { gradleVersion = gradleWrapperVersion distributionUrl = 'http://services.gradle.org/distributions/gradle-2.3-bin.zip' } 

Then generated it by running the command: gradle wrapper

After that, grails run-app should work.

+6
source

gradle/wrapper/gradle-wrapper.properties Change this:

-from: distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-all.zip

-to: distributionUrl=http://services.gradle.org/distributions/gradle-2.3-all.zip

+6
source

All Articles