You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/06/03 08:20:10 UTC

[GitHub] [flink] whitecloud6688 opened a new pull request, #19872: Release 1.14 通过 flink写有https加密和证书认证的 elasticsearch 7 失败

whitecloud6688 opened a new pull request, #19872:
URL: https://github.com/apache/flink/pull/19872

   ## What is the purpose of the change
   通过 flink写有https加密和证书认证的 elasticsearch 7 失败,日志如下,请问需要加什么参数?或者是配置什么呢?
   
   建表语句:
   CREATE TABLE orders_es (
      order_id INT COMMENT '订单id',
      order_date TIMESTAMP(0) COMMENT '下单时间',
      customer_name STRING COMMENT '客户名称',
      price DECIMAL(10, 5) COMMENT '价格',
      product_id INT COMMENT '产品id',
      order_status BOOLEAN COMMENT '订单状态',
      PRIMARY KEY (order_id) NOT ENFORCED
    ) WITH (
      'connector' = 'elasticsearch-7',
      'hosts' = 'https://host1:9200',
      'index' = 'orders',
      'document-id.key-delimiter' = 'order_id',
      'username' = 'username',
      'password' = 'password'
    );
   
   CREATE TABLE orders (
      order_id INT COMMENT '订单id',
      order_date TIMESTAMP(0) COMMENT '下单时间',
      customer_name STRING COMMENT '客户名称',
      price DECIMAL(10, 5) COMMENT '价格',
      product_id INT COMMENT '产品id',
      order_status BOOLEAN COMMENT '订单状态',
      PRIMARY KEY (order_id) NOT ENFORCED
    ) WITH (
      'connector' = 'mysql-cdc',
      'hostname' = 'host2',
      'port' = '3306',
      'username' = 'username',
      'password' = 'password',
      'database-name' = 'test',
      'table-name' = 'orders'
    );
   
   插入语句:
   insert into orders_es select * from orders;
   
   失败日志:
   2022-06-03 16:04:32
   javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
   	at org.apache.flink.elasticsearch7.shaded.org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:818)
   	at org.apache.flink.elasticsearch7.shaded.org.elasticsearch.client.RestClient.performRequest(RestClient.java:248)
   	at org.apache.flink.elasticsearch7.shaded.org.elasticsearch.client.RestClient.performRequest(RestClient.java:235)
   	at org.apache.flink.elasticsearch7.shaded.org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1514)
   	at org.apache.flink.elasticsearch7.shaded.org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1499)
   	at org.apache.flink.elasticsearch7.shaded.org.elasticsearch.client.RestHighLevelClient.ping(RestHighLevelClient.java:720)
   	at org.apache.flink.streaming.connectors.elasticsearch7.Elasticsearch7ApiCallBridge.verifyClientConnection(Elasticsearch7ApiCallBridge.java:138)
   	at org.apache.flink.streaming.connectors.elasticsearch7.Elasticsearch7ApiCallBridge.verifyClientConnection(Elasticsearch7ApiCallBridge.java:46)
   	at org.apache.flink.streaming.connectors.elasticsearch.ElasticsearchSinkBase.open(ElasticsearchSinkBase.java:318)
   	at org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:34)
   	at org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(AbstractUdfStreamOperator.java:100)
   	at org.apache.flink.table.runtime.operators.sink.SinkOperator.open(SinkOperator.java:58)
   	at org.apache.flink.streaming.runtime.tasks.RegularOperatorChain.initializeStateAndOpenOperators(RegularOperatorChain.java:110)
   	at org.apache.flink.streaming.runtime.tasks.StreamTask.restoreGates(StreamTask.java:711)
   	at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$1.call(StreamTaskActionExecutor.java:55)
   	at org.apache.flink.streaming.runtime.tasks.StreamTask.restoreInternal(StreamTask.java:687)
   	at org.apache.flink.streaming.runtime.tasks.StreamTask.restore(StreamTask.java:654)
   	at org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:958)
   	at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:927)
   	at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:766)
   	at org.apache.flink.runtime.taskmanager.Task.run(Task.java:575)
   	at java.lang.Thread.run(Thread.java:748)
   Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
   	at sun.security.ssl.Alert.createSSLException(Alert.java:131)
   	at sun.security.ssl.TransportContext.fatal(TransportContext.java:370)
   	at sun.security.ssl.TransportContext.fatal(TransportContext.java:313)
   	at sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
   	at sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:652)
   	at sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:471)
   	at sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:367)
   	at sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:376)
   	at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:479)
   	at sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:990)
   	at sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:977)
   	at java.security.AccessController.doPrivileged(Native Method)
   	at sun.security.ssl.SSLEngineImpl$DelegatedTask.run(SSLEngineImpl.java:924)
   	at org.apache.flink.elasticsearch7.shaded.org.apache.http.nio.reactor.ssl.SSLIOSession.doRunTask(SSLIOSession.java:285)
   	at org.apache.flink.elasticsearch7.shaded.org.apache.http.nio.reactor.ssl.SSLIOSession.doHandshake(SSLIOSession.java:345)
   	at org.apache.flink.elasticsearch7.shaded.org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:523)
   	at org.apache.flink.elasticsearch7.shaded.org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:120)
   	at org.apache.flink.elasticsearch7.shaded.org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162)
   	at org.apache.flink.elasticsearch7.shaded.org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337)
   	at org.apache.flink.elasticsearch7.shaded.org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315)
   	at org.apache.flink.elasticsearch7.shaded.org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276)
   	at org.apache.flink.elasticsearch7.shaded.org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
   	at org.apache.flink.elasticsearch7.shaded.org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:591)
   	... 1 more
   Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
   	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:439)
   	at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:306)
   	at sun.security.validator.Validator.validate(Validator.java:271)
   	at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:312)
   	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:275)
   	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:140)
   	at sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:630)
   	... 19 more
   Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
   	at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
   	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
   	at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
   	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:434)
   	... 25 more
   
   
   ## Brief change log
   通过 flink写有https加密和证书认证的 elasticsearch 7 失败
   
   
   
   ## Verifying this change
   通过flink-sql语句写入有https加密和证书认证的 elasticsearch 7
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / **no** / don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (**yes** / no)
     - If yes, how is the feature documented? (not applicable / **docs** / JavaDocs / not documented)
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] flinkbot commented on pull request #19872: Release 1.14 通过 flink写有https加密和证书认证的 elasticsearch 7 失败

Posted by GitBox <gi...@apache.org>.
flinkbot commented on PR #19872:
URL: https://github.com/apache/flink/pull/19872#issuecomment-1145722323

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "e14b0ad4b01cebc06340f00d52fd56948a26ff05",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "e14b0ad4b01cebc06340f00d52fd56948a26ff05",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * e14b0ad4b01cebc06340f00d52fd56948a26ff05 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] MartijnVisser closed pull request #19872: Release 1.14 通过 flink写有https加密和证书认证的 elasticsearch 7 失败

Posted by GitBox <gi...@apache.org>.
MartijnVisser closed pull request #19872: Release 1.14 通过 flink写有https加密和证书认证的 elasticsearch 7 失败
URL: https://github.com/apache/flink/pull/19872


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] MartijnVisser commented on pull request #19872: Release 1.14 通过 flink写有https加密和证书认证的 elasticsearch 7 失败

Posted by GitBox <gi...@apache.org>.
MartijnVisser commented on PR #19872:
URL: https://github.com/apache/flink/pull/19872#issuecomment-1151467099

   @whitecloud6688 Please follow Flinks Code Contribution guide at https://flink.apache.org/contributing/contribute-code.html


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org