clownAdam opened a new issue, #9889:
URL: https://github.com/apache/seatunnel/issues/9889

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   ClickhouseFile sink时报错
   
   ### SeaTunnel Version
   
   2.3.11
   
   ### SeaTunnel Config
   
   ```conf
   env {
        job.name = "mysql-to-clickhousefile"
        format = "hocon"
        job.mode = "BATCH"
   }
   
   source {
        Jdbc {
                url = 
"jdbc:mysql://xxxxx:3306/db_name?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8"
                driver = "com.mysql.cj.jdbc.Driver"
                connection_check_timeout_sec = 100
                user = "xxx"
                password = "xxx"
                query = "select * from xxx.xxx"
        }
   }
   
   transform {
   }
   
   sink {
        ClickhouseFile {
                host = "xxx:xxx"
                database = "test"
                table = "seatunnel_write_file"
                username = "default"
                password = "xxx"
                clickhouse_local_path = "/home/seatunnel/clickhouse/data"
                node_free_password = true
                node_pass = [{
                    node_address = "xxx"
                    password = "xxx"
             }]
        }
   }
   ```
   
   ### Running Command
   
   ```shell
   rest api
   ```
   
   ### Error Exception
   
   ```log
   Exception in thread "main" 
org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel 
job executed failed
           at 
org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:228)
           at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
           at 
org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:40)
   Caused by: org.apache.seatunnel.api.table.factory.FactoryException: 
ErrorCode:[API-06], ErrorDescription:[Factory initialize failed] - Unable to 
create a sink for identifier 'ClickhouseFile'.
           at 
org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSink(FactoryUtil.java:250)
           at 
org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.createSinkAction(MultipleTableJobConfigParser.java:669)
           at 
org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parseSink(MultipleTableJobConfigParser.java:592)
           at 
org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parse(MultipleTableJobConfigParser.java:240)
           at 
org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.getLogicalDag(ClientJobExecutionEnvironment.java:123)
           at 
org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.execute(ClientJobExecutionEnvironment.java:191)
           at 
org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:165)
           ... 2 more
   Caused by: java.lang.IllegalArgumentException: Json parsing exception, value 
'[{node_address=xxxxx, password=xxxxx}]', and expected type 
'org.apache.seatunnel.api.configuration.Options$OptionBuilder$13$1@7cca01a8'
           at 
org.apache.seatunnel.api.configuration.util.ConfigUtil.convertValue(ConfigUtil.java:78)
           at 
org.apache.seatunnel.api.configuration.ReadonlyConfig.getOptional(ReadonlyConfig.java:123)
           at 
org.apache.seatunnel.api.configuration.ReadonlyConfig.get(ReadonlyConfig.java:66)
           at 
org.apache.seatunnel.connectors.seatunnel.clickhouse.sink.file.ClickhouseFileSinkFactory.createSink(ClickhouseFileSinkFactory.java:142)
           at 
org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSink(FactoryUtil.java:247)
           ... 8 more
   Caused by: 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:
 Unrecognized field "node_address" (class 
org.apache.seatunnel.connectors.seatunnel.clickhouse.config.NodePassConfig), 
not marked as ignorable (2 known properties: "nodeAddress", "password"])
    at [Source: 
(String)"[{"node_address":"192.168.3.203","password":"behome"}]"; line: 1, 
column: 19] (through reference chain: 
java.util.ArrayList[0]->org.apache.seatunnel.connectors.seatunnel.clickhouse.config.NodePassConfig["node_address"])
           at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
           at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:1127)
           at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:2023)
           at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1700)
           at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1678)
           at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:319)
           at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:176)
           at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:355)
           at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244)
           at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
           at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
           at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4674)
           at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3629)
           at 
org.apache.seatunnel.shade.com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3612)
           at 
org.apache.seatunnel.api.configuration.util.ConfigUtil.convertValue(ConfigUtil.java:58)
           ... 12 more
   ```
   
   ### Zeta or Flink or Spark Version
   
   zeta
   
   ### Java or Scala Version
   
   java8
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to