前提・実現したいこと
embulkを利用しFTPでファイルを取得し、取得したファイルをFTPで出力したいと考えております。
ログの内容からファイル出力完了後のtmpファイル削除処理に失敗していると考えているのですが、改善の方法がわからず、お気づきの点があれば教えていただけ教えていただけますと幸いです。
ファイル取得には「embulk-input-ftp」、ファイル出力には「embulk-output-ftp」のプラグインを利用しています。
実行環境の情報は以下になります。
OS : WindowsServer 2008 R2
java : openjdk version "1.8.0_212"
embulk : embulk 0.9.17
embulk-input-ftp : embulk-input-ftp-0.2.0
embulk-output-ftp : embulk-output-ftp-0.2.1
不足情報等あればお気軽に教えていただけますと助かります。
発生している問題・エラーメッセージ
エラーメッセージの全文は以下になります。
org.embulk.exec.PartialExecutionException: org.embulk.config.ConfigException: Co uldn't delete local file C:\Users\ADMINI~1\AppData\Local\Temp\2\embulk\2019-07-1 2 06-16-09.234 UTC\test000.00.csv3105253771120283850.tmp at org.embulk.exec.BulkLoader$LoaderState.buildPartialExecuteException(B ulkLoader.java:340) at org.embulk.exec.BulkLoader.doRun(BulkLoader.java:566) at org.embulk.exec.BulkLoader.access$000(BulkLoader.java:35) at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:353) at org.embulk.exec.BulkLoader$1.run(BulkLoader.java:350) at org.embulk.spi.Exec.doWith(Exec.java:22) at org.embulk.exec.BulkLoader.run(BulkLoader.java:350) at org.embulk.EmbulkEmbed.run(EmbulkEmbed.java:178) at org.embulk.EmbulkRunner.runInternal(EmbulkRunner.java:292) at org.embulk.EmbulkRunner.run(EmbulkRunner.java:156) at org.embulk.cli.EmbulkRun.runSubcommand(EmbulkRun.java:433) at org.embulk.cli.EmbulkRun.run(EmbulkRun.java:90) at org.embulk.cli.Main.main(Main.java:64) Caused by: org.embulk.config.ConfigException: Couldn't delete local file C:\User s\ADMINI~1\AppData\Local\Temp\2\embulk\2019-07-12 06-16-09.234 UTC\test000.00.cs v3105253771120283850.tmp at org.embulk.output.ftp.FtpFileOutputPlugin$FtpFileOutput$1.call(FtpFil eOutputPlugin.java:269) at org.embulk.output.ftp.FtpFileOutputPlugin$FtpFileOutput$1.call(FtpFil eOutputPlugin.java:245) at org.embulk.spi.util.RetryExecutor.run(RetryExecutor.java:81) at org.embulk.spi.util.RetryExecutor.runInterruptible(RetryExecutor.java :62) at org.embulk.output.ftp.FtpFileOutputPlugin$FtpFileOutput.uploadFile(Ft pFileOutputPlugin.java:245) at org.embulk.output.ftp.FtpFileOutputPlugin$FtpFileOutput.finish(FtpFil eOutputPlugin.java:233) at org.embulk.spi.util.FileOutputOutputStream.close(FileOutputOutputStre am.java:94) at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:320) at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:149) at java.io.OutputStreamWriter.close(OutputStreamWriter.java:233) at java.io.BufferedWriter.close(BufferedWriter.java:266) at org.embulk.spi.util.LineEncoder.finish(LineEncoder.java:90) at org.embulk.standards.CsvFormatterPlugin$1.finish(CsvFormatterPlugin.j ava:194) at org.embulk.spi.FileOutputRunner$DelegateTransactionalPageOutput.finis h(FileOutputRunner.java:154) at org.embulk.spi.PageBuilder.finish(PageBuilder.java:228) at org.embulk.standards.CsvParserPlugin.run(CsvParserPlugin.java:377) at org.embulk.spi.FileInputRunner.run(FileInputRunner.java:140) at org.embulk.spi.util.Executors.process(Executors.java:62) at org.embulk.spi.util.Executors.process(Executors.java:38) at org.embulk.exec.LocalExecutorPlugin$DirectExecutor$1.call(LocalExecut orPlugin.java:170) at org.embulk.exec.LocalExecutorPlugin$DirectExecutor$1.call(LocalExecut orPlugin.java:167) 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:748) Suppressed: org.embulk.config.ConfigException: Couldn't delete local fil e C:\Users\ADMINI~1\AppData\Local\Temp\2\embulk\2019-07-12 06-16-09.234 UTC\test 001.00.csv6718041067910710146.tmp ... 25 more Suppressed: org.embulk.config.ConfigException: Couldn't delete local fil e C:\Users\ADMINI~1\AppData\Local\Temp\2\embulk\2019-07-12 06-16-09.234 UTC\test 002.00.csv9129426862521090912.tmp ... 25 more Error: org.embulk.config.ConfigException: Couldn't delete local file C:\Users\AD MINI~1\AppData\Local\Temp\2\embulk\2019-07-12 06-16-09.234 UTC\test000.00.csv310 5253771120283850.tmp
該当のソースコード
embulk設定ファイルの内容は以下になります。
yml.liquid
1in: 2 type: ftp 3 host: xxxxxx 4 port: 21 5 user: xxxxxx 6 password: xxxxxx 7 path_prefix: /purchase_log 8 parser: 9 charset: UTF-8 10 newline: CRLF 11 type: csv 12 delimiter: ',' 13 quote: '"' 14 escape: '"' 15 trim_if_not_quoted: false 16 skip_header_lines: 1 17 allow_extra_columns: false 18 allow_optional_columns: false 19 columns: 20 - {name: time, type: timestamp, format: '%Y-%m-%d %H:%M:%S.%N %z'} 21 - {name: member_id, type: string} 22 - {name: name, type: string} 23 - {name: password, type: string} 24 - {name: goods_id, type: string} 25 - {name: ship_date, type: timestamp, format: '%Y-%m-%d %H:%M:%S.%N %z'} 26 - {name: ammount, type: string} 27out: 28 type: ftp 29 host: xxxxxx 30 port: 21 31 user: xxxxxx 32 password: xxxxxx 33 path_prefix: test 34 file_ext: csv 35 formatter: 36 type: csv 37 header_line: true
参考情報
・tmpフォルダが出力されるフォルダへEveryone - フルコントロールの権限を付与して試してみましたが、同様の事象が発生しました。
・出力プラグインに別プラグインを利用するとエラーが発生せず出力できたため、「embulk-output-ftp」の設定方法が誤っていると考えております。
・Linux環境下ではエラーが出力されずに実行が完了します。
・別プラグインですが、類似事象が発生していることは確認しております。
回答2件
あなたの回答
tips
プレビュー