Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

BIX set-up fails: log4j:ERROR setFile

SA-47799

Summary



BIX set up fails while executing the script from the UNIX box. Log files are not generated to a specific directory.


Error Messages



Error in the log:

Current "user.dir" (default directory) is: /export/home/hotony-adm
Found spec for PegaRULES logging configuration using System property: file:///export/home/hotony-adm/config/prlogging.xml
Located PegaRULES logging configuration: pegajdbc://1010856212:0/prresources.jar!//prlogging.xml
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /PegaRULES-SecurityEvent-2017-Nov-15.log (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
at com.pega.apache.log4j.FileAppender.setFile(FileAppender.java:298)
at com.pega.pegarules.priv.util.DailySizeRollingFileAppenderPega.setFile(DailySizeRollingFileAppenderPega.java:106)
at com.pega.pegarules.priv.util.AbstractFileAppenderPega.activateOptions(AbstractFileAppenderPega.java:177)



Steps to Reproduce



Execute BIX script from the UNIX box.


Root Cause



An issue in the custom application code or rules.

The out-of-the-box version of the file was used from the prlogging.xml file sent. This set the location for the Pega* log files to be generated in the web.tmpdir directory. Since this variable was not set in a specific environment, the script attempted to insert the logs to the root directory and failed. <param name="FileNamePattern" value="'@{web.tmpdir}/PegaRULES-'yyyy-MMM-dd'.log'"/>


Resolution



Perform either of the following local-changes:
  • Set the environment variable
  • Update the path for each of the FileAppender element in the prlogging.xml file to a location that the user running the extraction has permission to write the logs to.

Remove reference to web.tmpdir, such that it is not defined, from the FileNamePattern and the files are generated to the same directory from which the extraction is run.

<param name="FileNamePattern" value="'PegaRULES-'yyyy-MMM-dd'.log'"/>

Or

Set the location as a relative path such that it need not be modified in other envirionments,
For example, create a logs directory and set the value as below.


<param name="FileNamePattern" value="../logs/'PegaRULES-'yyyy-MMM-dd'.log'"/>


Suggest Edit

Published March 27, 2018 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us