justloginalready opened a new issue, #6948: URL: https://github.com/apache/seatunnel/issues/6948
### 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 while trying to put new xml to ftp, job failing with exception: org.apache.hadoop.fs.ftp.FTPException: Client not connected it's happening only while file_format_type is "xml" to Sink. ``` file_format_type = "xml" xml_root_tag = "newroot" xml_row_tag = "newrow" xml_use_attr_format = false ``` if i would change file_format_type to "text", everything works: ``` FtpFile { host = "192.168.87.168" port = 21 user = ftpuser password = test path = "/home/ftpuser" tmp_path = "/home/ftpuser/tmp" file_format_type = "text" field_delimiter = "#" sink_columns = ["id","card", "new_name"] } ``` ### SeaTunnel Version 2.3.5 ### SeaTunnel Config ```conf env { parallelism = 2 job.mode = "BATCH" checkpoint.interval = 10000 } source { FtpFile { path = "/home/ftpuser/test.xml" host = "192.168.87.168" port = 21 user = ftpuser password = test file_format_type = xml xml_row_tag = row xml_use_attr_format = false schema = { fields { id = string card = string name = string } } } } transform { FieldMapper { field_mapper = { id = id card = card name = new_name } } } sink { FtpFile { host = "192.168.87.168" port = 21 user = ftpuser password = test path = "/home/ftpuser" tmp_path = "/home/ftpuser/tmp" file_format_type = "xml" xml_root_tag = "newroot" xml_row_tag = "newrow" xml_use_attr_format = false } } ``` ### Running Command ```shell ./bin/seatunnel.sh --config ./config/v2.batch.config.ftp.xml.template -e local ``` ### Error Exception ```log 2024-06-05 10:55:10,324 ERROR [o.a.s.c.s.SeaTunnel ] [main] - =============================================================================== 2024-06-05 10:55:10,324 ERROR [o.a.s.c.s.SeaTunnel ] [main] - Fatal Error, 2024-06-05 10:55:10,324 ERROR [o.a.s.c.s.SeaTunnel ] [main] - Please submit bug report in https://github.com/apache/seatunnel/issues 2024-06-05 10:55:10,324 ERROR [o.a.s.c.s.SeaTunnel ] [main] - Reason:SeaTunnel job executed failed 2024-06-05 10:55:10,325 ERROR [o.a.s.c.s.SeaTunnel ] [main] - Exception StackTrace:org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:202) at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40) at org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:34) Caused by: org.apache.seatunnel.engine.common.exception.SeaTunnelEngineException: java.lang.RuntimeException: org.apache.hadoop.fs.ftp.FTPException: Client not connected at org.apache.seatunnel.engine.server.task.flow.SinkFlowLifeCycle.received(SinkFlowLifeCycle.java:262) at org.apache.seatunnel.engine.server.task.flow.SinkFlowLifeCycle.received(SinkFlowLifeCycle.java:68) at org.apache.seatunnel.engine.server.task.SeaTunnelTransformCollector.collect(SeaTunnelTransformCollector.java:39) at org.apache.seatunnel.engine.server.task.SeaTunnelTransformCollector.collect(SeaTunnelTransformCollector.java:27) at org.apache.seatunnel.engine.server.task.group.queue.IntermediateBlockingQueue.handleRecord(IntermediateBlockingQueue.java:70) at org.apache.seatunnel.engine.server.task.group.queue.IntermediateBlockingQueue.collect(IntermediateBlockingQueue.java:50) at org.apache.seatunnel.engine.server.task.flow.IntermediateQueueFlowLifeCycle.collect(IntermediateQueueFlowLifeCycle.java:51) at org.apache.seatunnel.engine.server.task.TransformSeaTunnelTask.collect(TransformSeaTunnelTask.java:73) at org.apache.seatunnel.engine.server.task.SeaTunnelTask.stateProcess(SeaTunnelTask.java:168) at org.apache.seatunnel.engine.server.task.TransformSeaTunnelTask.call(TransformSeaTunnelTask.java:78) at org.apache.seatunnel.engine.server.TaskExecutionService$BlockingWorker.run(TaskExecutionService.java:703) at org.apache.seatunnel.engine.server.TaskExecutionService$NamedTaskWrapper.run(TaskExecutionService.java:1004) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: org.apache.hadoop.fs.ftp.FTPException: Client not connected at org.apache.seatunnel.connectors.seatunnel.file.ftp.system.SeaTunnelFTPFileSystem$1.close(SeaTunnelFTPFileSystem.java:302) at org.apache.seatunnel.connectors.seatunnel.file.sink.writer.XmlWriteStrategy.lambda$finishAndCloseFile$0(XmlWriteStrategy.java:64) at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) at org.apache.seatunnel.connectors.seatunnel.file.sink.writer.XmlWriteStrategy.finishAndCloseFile(XmlWriteStrategy.java:57) at org.apache.seatunnel.connectors.seatunnel.file.sink.writer.AbstractWriteStrategy.prepareCommit(AbstractWriteStrategy.java:247) at org.apache.seatunnel.connectors.seatunnel.file.sink.BaseFileSinkWriter.prepareCommit(BaseFileSinkWriter.java:142) at org.apache.seatunnel.engine.server.task.flow.SinkFlowLifeCycle.received(SinkFlowLifeCycle.java:191) ... 16 more at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:194) ... 2 more ``` ### Zeta or Flink or Spark Version Zeta ### Java or Scala Version jre1.8.0_411 ### 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]
