我们有一个Pentaho作业,在我们的本地环境中工作正常,但是在部署作业并使用水壶运行作业后,我们会在写入日志文件时出错。错误发生在具有“对每个输入行执行?”设置的作业中。检查。以下是如何配置日志记录设置,路径和名称是先前设置的变量。在此步骤之前,它能够正常登录到文件。Pentaho水壶 - 写入日志文件时出错
工作日志记录配置
这是错误的调试日志级别运行水壶,当我得到。在失败的工作里面,我们也在写日志,我不知道这是否是一种不好的做法。有没有人遇到过这个问题并且知道一个解决方案?
ProcessFiles - Log folder [file:////<ServerPath>/QA/PentahoLogs] exists.
ProcessFiles - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : Unable to open file appender for file [${LOGFOLDER}${LOGFILENAME}_20161005.txt] : org.pentaho.di.core.exception.KettleException:
ProcessFiles - There was an error while trying to open file 'file:////<ServerPath>/QA/PentahoLogs/PartImportLog_20161005.txt' for writing
ProcessFiles - Could not write to "file:////<ServerPath>/QA/PentahoLogs/PartImportLog_20161005.txt" because it is currently in use.
ProcessFiles - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : org.pentaho.di.core.exception.KettleException:
ProcessFiles - There was an error while trying to open file 'file:////<ServerPath>/QA/PentahoLogs/PartImportLog_20161005.txt' for writing
ProcessFiles - Could not write to "file:////<ServerPath>/QA/PentahoLogs/PartImportLog_20161005.txt" because it is currently in use.
ProcessFiles -
ProcessFiles - at org.pentaho.di.core.logging.LogChannelFileWriter.<init>(LogChannelFileWriter.java:78)
ProcessFiles - at org.pentaho.di.core.logging.LogChannelFileWriter.<init>(LogChannelFileWriter.java:96)
ProcessFiles - at org.pentaho.di.job.entries.job.JobEntryJob.execute(JobEntryJob.java:552)
ProcessFiles - at org.pentaho.di.job.Job.execute(Job.java:723)
ProcessFiles - at org.pentaho.di.job.Job.execute(Job.java:864)
ProcessFiles - at org.pentaho.di.job.Job.execute(Job.java:864)
ProcessFiles - at org.pentaho.di.job.Job.execute(Job.java:864)
ProcessFiles - at org.pentaho.di.job.Job.execute(Job.java:545)
ProcessFiles - at org.pentaho.di.job.Job.run(Job.java:435)
ProcessFiles - Caused by: org.apache.commons.vfs2.FileSystemException: Could not write to "file:////<ServerPath>/QA/PentahoLogs/PartImportLog_20161005.txt" because it is currently in use.
ProcessFiles - at org.apache.commons.vfs2.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:475)
ProcessFiles - at org.pentaho.di.core.vfs.KettleVFS.getOutputStream(KettleVFS.java:289)
ProcessFiles - at org.pentaho.di.core.logging.LogChannelFileWriter.<init>(LogChannelFileWriter.java:76)
ProcessFiles - ... 8 more
该文件不是由任何人打开的,并且该日志仅适用于该作业。这似乎是工作本身正在创建一个文件锁,我不知道为什么。我做了一些研究,似乎Pentaho在UNC路径上有问题,这很可能是失败的原因。当我们指向本地驱动器时,问题没有发生。 –
尝试使用$ {Internal.Job.Filename.Directory} $ {LOGFOLDER} $ {LOGFILENAME} – jipipayo