You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/05/07 13:11:39 UTC
[GitHub] [servicecomb-java-chassis] alphasuwei opened a new issue #2370: 启用TLS抛出CertificateParsingException
alphasuwei opened a new issue #2370:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2370
本地开发环境启动正常,服务器环境启动报CertificateParsingException,异常信息如下:
2021-05-07 21:02:12.990 [vert.x-eventloop-thread-2] ERROR - [VertxUtils.java:lambda$blockDeploy$0:107] - [] - deploy vertx failed, cause
io.vertx.core.VertxException: java.security.cert.CertificateParsingException: java.io.EOFException
at io.vertx.core.net.impl.SSLHelper.getContext(SSLHelper.java:509)
at io.vertx.core.net.impl.SSLHelper.validate(SSLHelper.java:536)
at io.vertx.core.http.impl.HttpServerImpl.listen(HttpServerImpl.java:284)
at io.vertx.core.http.impl.HttpServerImpl.listen(HttpServerImpl.java:205)
at org.apache.servicecomb.transport.rest.vertx.RestServerVerticle.startListen(RestServerVerticle.java:216)
at org.apache.servicecomb.transport.rest.vertx.RestServerVerticle.start(RestServerVerticle.java:115)
at io.vertx.core.impl.DeploymentManager.lambda$doDeploy$9(DeploymentManager.java:556)
at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:366)
at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.security.cert.CertificateParsingException: java.io.EOFException
at sun.security.x509.X509CertInfo.<init>(X509CertInfo.java:169)
at sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1855)
at sun.security.x509.X509CertImpl.<init>(X509CertImpl.java:195)
at sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:102)
at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:339)
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:724)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:57)
at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224)
at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:71)
at java.security.KeyStore.load(KeyStore.java:1445)
at io.vertx.core.net.impl.KeyStoreHelper.loadJKSOrPKCS12(KeyStoreHelper.java:284)
at io.vertx.core.net.impl.KeyStoreHelper.create(KeyStoreHelper.java:84)
at io.vertx.core.net.impl.KeyStoreHelper.create(KeyStoreHelper.java:116)
at io.vertx.core.net.TrustOptions.getTrustManagerFactory(TrustOptions.java:53)
at io.vertx.core.net.impl.SSLHelper.getTrustMgrFactory(SSLHelper.java:361)
at io.vertx.core.net.impl.SSLHelper.getContext(SSLHelper.java:507)
... 15 common frames omitted
Caused by: java.io.EOFException: null
at sun.misc.IOUtils.readExactlyNBytes(IOUtils.java:76)
at sun.security.util.DerValue.init(DerValue.java:412)
at sun.security.util.DerValue.<init>(DerValue.java:332)
at sun.security.util.DerInputStream.readVector(DerInputStream.java:430)
at sun.security.util.DerInputStream.getSequence(DerInputStream.java:337)
at sun.security.x509.CertificateValidity.construct(CertificateValidity.java:84)
at sun.security.x509.CertificateValidity.<init>(CertificateValidity.java:131)
at sun.security.x509.X509CertInfo.parse(X509CertInfo.java:656)
at sun.security.x509.X509CertInfo.<init>(X509CertInfo.java:167)
... 30 common frames omitted
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2370: 启用TLS抛出CertificateParsingException
Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #2370:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2370#issuecomment-835137558
结合异常看是证书错误,估计得调试看看。 比如是不是文件权限等导致不可读。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] alphasuwei commented on issue #2370: 启用TLS抛出CertificateParsingException
Posted by GitBox <gi...@apache.org>.
alphasuwei commented on issue #2370:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2370#issuecomment-834945557
下面是服务器的配置:
cse:
rest:
address: 0.0.0.0:8081?sslEnabled=true
filter:
# hmacAuthServerFilter:
# enabled: true
# urlPattern: /id/v1/*
# httpMethod: POST
interfaceLogFilter:
enabled: true
urlPattern: /*
httpMethod: POST
executor:
default:
thread-per-group: 10
ssl:
protocols: TLSv1.2
authPeer: false
trustStore: /opt/app/release/payment/sm-dp-plus/20210507085947/service/config/certs/trust.jks
trustStoreType: JKS
trustStoreValue: 123456
keyStore: /opt/app/release/payment/sm-dp-plus/20210507085947/service/config/certs/CERT_S_SM_DP42_TLS_NIST.jks
keyStoreType: JKS
keyStoreValue: 123456
ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] alphasuwei closed issue #2370: 启用TLS抛出CertificateParsingException
Posted by GitBox <gi...@apache.org>.
alphasuwei closed issue #2370:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2370
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2370: 启用TLS抛出CertificateParsingException
Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #2370:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2370#issuecomment-834917256
你是否配置了证书?在服务器环境证书没有放到对应的目录。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] alphasuwei commented on issue #2370: 启用TLS抛出CertificateParsingException
Posted by GitBox <gi...@apache.org>.
alphasuwei commented on issue #2370:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2370#issuecomment-834947276
> 你是否配置了证书?在服务器环境证书没有放到对应的目录。
下面是服务器配置,证书路径为绝对路径
cse:
rest:
address: 0.0.0.0:8081?sslEnabled=true
filter:
interfaceLogFilter:
enabled: true
urlPattern: /*
httpMethod: POST
executor:
default:
thread-per-group: 10
ssl:
protocols: TLSv1.2
authPeer: false
trustStore: /opt/app/release/payment/sm-dp-plus/20210507085947/service/config/certs/trust.jks
trustStoreType: JKS
trustStoreValue: 123456
keyStore: /opt/app/release/payment/sm-dp-plus/20210507085947/service/config/certs/CERT_S_SM_DP42_TLS_NIST.jks
keyStoreType: JKS
keyStoreValue: 123456
ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] alphasuwei removed a comment on issue #2370: 启用TLS抛出CertificateParsingException
Posted by GitBox <gi...@apache.org>.
alphasuwei removed a comment on issue #2370:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2370#issuecomment-834945557
下面是服务器的配置:
cse:
rest:
address: 0.0.0.0:8081?sslEnabled=true
filter:
interfaceLogFilter:
enabled: true
urlPattern: /*
httpMethod: POST
executor:
default:
thread-per-group: 10
ssl:
protocols: TLSv1.2
authPeer: false
trustStore: /opt/app/release/payment/sm-dp-plus/20210507085947/service/config/certs/trust.jks
trustStoreType: JKS
trustStoreValue: 123456
keyStore: /opt/app/release/payment/sm-dp-plus/20210507085947/service/config/certs/CERT_S_SM_DP42_TLS_NIST.jks
keyStoreType: JKS
keyStoreValue: 123456
ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] alphasuwei edited a comment on issue #2370: 启用TLS抛出CertificateParsingException
Posted by GitBox <gi...@apache.org>.
alphasuwei edited a comment on issue #2370:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2370#issuecomment-834945557
下面是服务器的配置:
cse:
rest:
address: 0.0.0.0:8081?sslEnabled=true
filter:
interfaceLogFilter:
enabled: true
urlPattern: /*
httpMethod: POST
executor:
default:
thread-per-group: 10
ssl:
protocols: TLSv1.2
authPeer: false
trustStore: /opt/app/release/payment/sm-dp-plus/20210507085947/service/config/certs/trust.jks
trustStoreType: JKS
trustStoreValue: 123456
keyStore: /opt/app/release/payment/sm-dp-plus/20210507085947/service/config/certs/CERT_S_SM_DP42_TLS_NIST.jks
keyStoreType: JKS
keyStoreValue: 123456
ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] alphasuwei edited a comment on issue #2370: 启用TLS抛出CertificateParsingException
Posted by GitBox <gi...@apache.org>.
alphasuwei edited a comment on issue #2370:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2370#issuecomment-834947276
> 你是否配置了证书?在服务器环境证书没有放到对应的目录。
下面是服务器配置,证书路径为绝对路径
```
cse:
rest:
address: 0.0.0.0:8081?sslEnabled=true
filter:
interfaceLogFilter:
enabled: true
urlPattern: /*
httpMethod: POST
executor:
default:
thread-per-group: 10
ssl:
protocols: TLSv1.2
authPeer: false
trustStore: /opt/app/release/payment/sm-dp-plus/20210507085947/service/config/certs/trust.jks
trustStoreType: JKS
trustStoreValue:
keyStore: /opt/app/release/payment/sm-dp-plus/20210507085947/service/config/certs/CERT_S_SM_DP42_TLS_NIST.jks
keyStoreType: JKS
keyStoreValue:
ciphers: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org