apache / seatunnel

SeaTunnel is a next-generation super high-performance, distributed, massive data integration tool.
https://seatunnel.apache.org/
Apache License 2.0
7.99k stars 1.81k forks source link

[Bug] [connector-paimon] Mysql Sync Paimon PaimonCatalogLoader Error #7604

Closed LYL41011 closed 2 weeks ago

LYL41011 commented 1 month ago

Search before asking

What happened

I want to synchronize MySQL data to Paimon offline, but the program reports an error and fails to start the task. PaimonConnectorException: ErrorCode:[PAIMON-06], ErrorDescription:[Load catalog failed] - Failed to perform SecurityContext.runSecured

SeaTunnel Version

2.3.7

SeaTunnel Config

env {
  parallelism = 1
  job.mode = "BATCH"
  checkpoint.interval = 180000 
}
source{
    Jdbc {
        driver = "com.mysql.cj.jdbc.Driver"
        connection_check_timeout_sec = 100
        url = "xxxx"
        user = "xxx"
        password = "xxx"
        query = "xxx"
    }
}

sink {
  Paimon {
    catalog_name = "lakehouse_catalog"
    warehouse = "hdfs://xxx-cluster/user/hive/warehouse"
    database = "lake_ods"  
    table = "kafka_ods_xxx"
    hdfs_site_path = "/etc/hadoop/conf/hdfs-site.xml"
    paimon.hadoop.conf-path = "/etc/hadoop/conf"
  }
}

Running Command

bin/start-seatunnel-flink-13-connector-v2.sh --config config/task/batch/mysql2paimon -m yarn-cluster

Error Exception

Caused by: org.apache.seatunnel.connectors.seatunnel.paimon.exception.PaimonConnectorException: ErrorCode:[PAIMON-06], ErrorDescription:[Load catalog failed] - Failed to perform SecurityContext.runSecured
        at org.apache.seatunnel.connectors.seatunnel.paimon.catalog.PaimonCatalogLoader.loadCatalog(PaimonCatalogLoader.java:89)
        at org.apache.seatunnel.connectors.seatunnel.paimon.catalog.PaimonCatalog.open(PaimonCatalog.java:70)
        at org.apache.seatunnel.connectors.seatunnel.paimon.sink.PaimonSink.getSaveModeHandler(PaimonSink.java:147)
        at org.apache.seatunnel.core.starter.flink.execution.SinkExecuteProcessor.execute(SinkExecuteProcessor.java:130)
        at org.apache.seatunnel.core.starter.flink.execution.FlinkExecution.execute(FlinkExecution.java:116)
        at org.apache.seatunnel.core.starter.flink.command.FlinkTaskExecuteCommand.execute(FlinkTaskExecuteCommand.java:61)
        ... 19 more
Caused by: java.lang.RuntimeException: Unexpected error when trying to load service provider.
        at org.apache.paimon.factories.FactoryUtil.discoverFactories(FactoryUtil.java:118)
        at org.apache.paimon.factories.FactoryUtil.discoverFactory(FactoryUtil.java:38)
        at org.apache.paimon.catalog.CatalogFactory.createCatalog(CatalogFactory.java:73)
        at org.apache.paimon.catalog.CatalogFactory.createCatalog(CatalogFactory.java:66)
        at org.apache.seatunnel.connectors.seatunnel.paimon.catalog.PaimonCatalogLoader.lambda$loadCatalog$1(PaimonCatalogLoader.java:87)
        at org.apache.paimon.security.SecurityContext.runSecured(SecurityContext.java:67)
        at org.apache.seatunnel.connectors.seatunnel.paimon.catalog.PaimonCatalogLoader.loadCatalog(PaimonCatalogLoader.java:86)
        ... 24 more
Caused by: java.util.ServiceConfigurationError: org.apache.paimon.factories.Factory: Provider org.apache.paimon.flink.action.CompactActionFactory not a subtype
        at java.util.ServiceLoader.fail(ServiceLoader.java:239)
        at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
        at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:376)
        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
        at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
        at org.apache.paimon.factories.FactoryUtil.discoverFactories(FactoryUtil.java:109)
        ... 30 more

Zeta or Flink or Spark Version

Flink 1.18.0

Java or Scala Version

No response

Screenshots

No response

Are you willing to submit PR?

Code of Conduct

dailai commented 1 month ago

Why has this factory org.apache.paimon.flink.action.CompactActionFactory in classpath? Please remove this jar in flink lib.

github-actions[bot] commented 3 weeks ago

This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.

github-actions[bot] commented 2 weeks ago

This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.