简体   繁体   English

Pentaho Kettle - 写入日志文件时出错

[英]Pentaho Kettle - Error Writing to Log File

We have a Pentaho job which is working fine in our local environment but we get an error writing to the log file after deploying it and running the job using Kettle.我们有一个 Pentaho 作业,它在我们的本地环境中运行良好,但是在部署它并使用 Kettle 运行该作业后,我们在写入日志文件时出现错误。 The error occurs in a job which has the setting 'Execute for every input row?'该错误发生在具有“为每个输入行执行?”设置的作业中。 checked.检查。 Below is how the logging settings is configured the path and names are variables which are being set earlier.以下是日志设置的配置方式,路径和名称是之前设置的变量。 It is able to log to the file fine before this step.在此步骤之前,它可以很好地登录到文件。

Job Logging Configuration作业日志配置

在此处输入图片说明

This is error I get when running Kettle with log level of debug.这是我在以调试日志级别运行 Kettle 时遇到的错误。 Inside of the failing job we are also writing to the log which I don't know if that is a bad practice.在失败的工作中,我们也在写入日志,我不知道这是否是一种不好的做法。 Has anyone else come across this issue and know a resolution?有没有其他人遇到过这个问题并知道解决方案?

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

Read the log:阅读日志:

ProcessFiles - Could not write to "file://///QA/PentahoLogs/PartImportLog_20161005.txt" because it is currently in use. ProcessFiles - 无法写入“file://///QA/PentahoLogs/PartImportLog_20161005.txt”,因为它当前正在使用中。

so it means other process is locking the txt file.所以这意味着其他进程正在锁定txt文件。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM