0

我不能使用通过 sdkman 安装的 grail 和lazybones。我有致命的错误。

操作系统:Ubuntu 16.04

$ java -版本

openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)

$sdk 版本

SDKMAN 5.7.2+323

$ sdk 安装 grails

$ grails-版本

| Grails Version: 3.3.8
| Groovy Version: 2.4.15
| JVM Version: 9-internal

$ sdk 安装懒骨头

$ 懒骨头-版本

懒骨头 0.8.3 版

$ grails create-app --stacktrace helloworld

Resolving dependencies..
| Error Error occurred running Grails CLI: Received fatal alert: handshake_failure (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
    at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:436)
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
    at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
    at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:137)
    at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:287)
    at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:243)
    at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:59)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
    at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:320)
    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:217)
    at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:535)
    at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:519)
    at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:409)
    at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)
    at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:351)
    at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:254)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:341)
    at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:318)
    at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:300)
    at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:292)
    at org.grails.cli.boot.GrailsDependencyVersions.<init>(GrailsDependencyVersions.groovy:54)
    at org.grails.cli.boot.GrailsDependencyVersions.<init>(GrailsDependencyVersions.groovy:50)
    at org.grails.cli.profile.repository.MavenProfileRepository.<init>(MavenProfileRepository.groovy:53)
    at org.grails.cli.GrailsCli.createMavenProfileRepository(GrailsCli.groovy:334)
    at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:235)
    at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
| Error Error occurred running Grails CLI: Received fatal alert: handshake_failure

$ lazybones list
Can't connect to pledbrook/lazybones-templates: Unable to make member of class sun.net.www.protocol.https.HttpsURLConnectionImpl accessible:  module java.base does not export sun.net.www.protocol.https to unnamed module @75f65e45
4

1 回答 1

0

对我来说,当 grails 为创建应用程序执行一些初始化工作时,这看起来像是 SSL 握手错误。它可能试图拉下一些所需的 jar 文件等。

显示什么sdk list grailswhich grailswhich java返回什么?

我没有使用过 jdk 9 堆,所以可能值得研究改变它。我想你会发现切换到 jdk8 会有更好的结果。每个 jdk 都附带一个它信任的标准根证书颁发机构列表。也许最近的安全问题,比如围绕 Symantec CAs jdk9 的问题可能已经删除了这些,但连接到的服务器 grails 可能仍在使用一个。

编辑:我认为您可能也一直在使用 Java 9 jdk 的内部开发构建版本。正如您报告的使用 build 9-internal+0-2016-04-14-195246.buildd 尝试使用 jdk 8 或安装更新版本的 Java 9。

于 2018-09-16T11:29:54.110 回答