2016-10-05 44 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