Support Article
Unable to move file to working file listener directory
SA-5903
Summary
When placing a file in the file listener directory, it cannot be moved to the "working' file listener directory correctly.
Error Messages
2015-01-26 17:15:12,005 [ FILE-Thread-2243] [ STANDARD] [ ] [ <App>] ( services.file.FileListener) WARN File.<ListernName>Listener|process|A0B2372774936E266C827ADAEF76D0CE2 - Caught throwable processing test7.txt; see Log-Service-File for more detail.
java.io.FileNotFoundException: opt/pega/PEGA_DATA_DEV/work_CTMFileListener/test7.1422310511999000.txt (Permission denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at com.pega.pegarules.storage.fs.resadaptor.InputStreamWrapper.<init>(InputStreamWrapper.java:99)
at com.pega.pegarules.storage.fs.resadaptor.InputStreamWrapper.<init>(InputStreamWrapper.java:92)
at com.pega.pegarules.integration.engine.internal.services.file.FileListener.processOne(FileListener.java:1004)
at com.pega.pegarules.integration.engine.internal.services.file.FileListener.drainDirectory(FileListener.java:1258)
at com.pega.pegarules.integration.engine.internal.services.file.FileListener.run_(FileListener.java:1909)
at com.pega.pegarules.integration.engine.internal.services.listener.ServiceListenerBaseImpl.run(ServiceListenerBaseImpl.java:448)
at java.lang.Thread.run(Thread.java:745)
2015-01-26 17:15:12,009 [ FILE-Thread-2243] [ STANDARD] [ ] [ <App>] ( services.file.FileListener) INFO File.<ListenerName>Listener|process|A0B2372774936E266C827ADAEF76D0CE2 - No recovery requested, performing RENAME on errored file.
Steps to Reproduce
Place a file in the directory defined in the file listener configuration.
Root Cause
When using a file listener in a Unix environment, be careful with what users can start the PRPC JVM. The file listener will wake up and process files defined in the file listener directory. When working on a file, the processing will create a "working" directory and move the files to that directory. Once completed, the file will be moved to a "completed" directory. The file permissions on the working directory will be configured for the user currently running PRPC. If you switch users who run the PRPC process, the file listener may no longer have access to write or read files in the file listeners working directory.
Resolution
Ensure that the file listeners configured directory and process created directories have read and write permissions for the the user running PRPC.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.