2016-10-05 58 views
1

我们有一个Pentaho作业,在我们的本地环境中工作正常,但是在部署作业并使用水壶运行作业后,我们会在写入日志文件时出错。错误发生在具有“对每个输入行执行?”设置的作业中。检查。以下是如何配置日志记录设置,路径和名称是先前设置的变量。在此步骤之前,它能够正常登录到文件。Pentaho水壶 - 写入日志文件时出错

工作日志记录配置

enter image description here

这是错误的调试日志级别运行水壶,当我得到。在失败的工作里面,我们也在写日志,我不知道这是否是一种不好的做法。有没有人遇到过这个问题并且知道一个解决方案?

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 

回答

1

读取日志:

ProcessFiles - 无法写入 “文件://///QA/PentahoLogs/PartImportLog_20161005.txt”,因为它正在使用中。

所以这意味着其他进程正在锁定txt文件。

+1

该文件不是由任何人打开的,并且该日志仅适用于该作业。这似乎是工作本身正在创建一个文件锁,我不知道为什么。我做了一些研究,似乎Pentaho在UNC路径上有问题,这很可能是失败的原因。当我们指向本地驱动器时,问题没有发生。 –

+0

尝试使用$ {Internal.Job.Filename.Directory} $ {LOGFOLDER} $ {LOGFILENAME} – jipipayo

1

确保日志路径/文件未被其他作业使用在同一存储库用户或其他用户中。

+0

设置相对于作业的路由感谢并为此感到抱歉。我会在下次开始处理它。 – Rahul