在OpenJDK 8上使用google-cloud-dlp 0.44.0-beta的OpenSSL异常

时间:2018-04-22 20:49:06

标签: google-cloud-platform google-cloud-dlp

我通过Google Cloud Java客户端库使用Google DLP,当我升级到最新版本0.44.0-beta时,我开始获得如下所示的CertificateException。当我使用Oracle JDK 8在我的Mac上运行它时运行正常,但是当在Docker实例中的OpenJDK 8中运行时,我看到了异常。我必须在OpenJDK上运行它。我猜测证书是由OpenJDK未知的CA签名的。什么是最简单的解决方案?我是否必须为OpenJDK安装自定义CA?有趣的是,OverOps快照包含对此方法的调用:

public io.grpc.netty.shaded.io.netty.handler.ssl.util.SelfSignedCertificate(String fqdn, SecureRandom random, int bits, Date notBefore, Date notAfter)

并且fqdn参数实际上设置为example.com。堆栈跟踪如下:

CertificateException: Issuer class type invalid.
at sun.security.x509.X509CertInfo.setIssuer(Object)
at sun.security.x509.X509CertInfo.set(String, Object)
at io.grpc.netty.shaded.io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator.generate(String, KeyPair, SecureRandom, Date, Date)
at io.grpc.netty.shaded.io.netty.handler.ssl.util.SelfSignedCertificate.<init>(String, SecureRandom, int, Date, Date)
at io.grpc.netty.shaded.io.netty.handler.ssl.util.SelfSignedCertificate.<init>(String, Date, Date)
at io.grpc.netty.shaded.io.netty.handler.ssl.util.SelfSignedCertificate.<init>(Date, Date)
at io.grpc.netty.shaded.io.netty.handler.ssl.util.SelfSignedCertificate.<init>()
at io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.<clinit>()
at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.defaultSslProvider()
at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.configure(SslContextBuilder)
at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.forClient()
at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder$NettyTransportFactory$DefaultNettyTransportCreationParamsFilterFactory.<init>(NettyChannelBuilder$NettyTransportFactory, SslContext)
at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder$NettyTransportFactory$DefaultNettyTransportCreationParamsFilterFactory.<init>(NettyChannelBuilder$NettyTransportFactory, SslContext, NettyChannelBuilder$1)
at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder$NettyTransportFactory.<init>(NettyChannelBuilder$TransportCreationParamsFilterFactory, Class, Map, NegotiationType, SslContext, EventLoopGroup, int, int, int, long, long, boolean, TransportTracer)
at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder.buildTransportFactory()
at io.grpc.internal.AbstractManagedChannelImplBuilder.build()
at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel()
at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createChannel()
at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.getTransportChannel()
at com.google.api.gax.rpc.ClientContext.create(StubSettings)
at com.google.cloud.dlp.v2beta1.stub.GrpcDlpServiceStub.create(DlpServiceStubSettings)
at com.google.cloud.dlp.v2beta1.stub.DlpServiceStubSettings.createStub()
at com.google.cloud.dlp.v2beta1.DlpServiceClient.<init>(DlpServiceSettings)
at com.google.cloud.dlp.v2beta1.DlpServiceClient.create(DlpServiceSettings)
at XXXXXXXX.redactContent(Collection, String, Likelihood, List)
at XXXXXXXX.lambda$redact$0(Collection, String, Likelihood, List)
at java.util.concurrent.CompletableFuture$AsyncSupply.run()
at java.lang.Thread.run()

1 个答案:

答案 0 :(得分:1)

要获得正确的眼球,请在此处提出错误https://github.com/GoogleCloudPlatform/google-cloud-java/issues