简体   繁体   中英

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. 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. 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.

so it means other process is locking the txt file.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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