wcc_monitor.sh failed with permission denied

Document ID : KB000099977
Last Modified Date : 19/06/2018
Show Technical Document Details
Issue:
Execution of wcc_monitor.sh fails with below errors
./wcc_monitor.sh -u ejmcommander -p <password> -d PA1
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: ../log/application/cli/wcc_monitor.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 org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
        at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207)
        at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
        at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
        at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
        at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
        at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:809)
        at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
        at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:395)
        at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:403)
        at com.ca.wcc.monitoring.cli.Main.main(Main.java:60)
Workload Control Center Monitoring Batch Interface

Initialization...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
 
Environment:
This problem can happen with any WCC release on Unix/Linux

 
Cause:
This IO error is due to wrong  operating system permissions on file wcc_monitor.log leading in error message:

java.io.FileNotFoundException: ../log/application/cli/wcc_monitor.log (Permission denied)

It can happen if previous wcc_monitor.sh command ran on behalf of another user
Resolution:
Either change the Operating System permissions to 777 on that file with "chmod 777 wcc_monitor.log" or rename/delete  the file
Additional Information: