SYMPTOM
From time to time you have different deliveries executed via startdelivery script that fail with an error like this :
java.io.FileNotFoundException: log\com.indy.engine.%port.scheduler.log (Accès refusé) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.(FileOutputStream.java:221) at java.io.FileOutputStream.(FileOutputStream.java:142) 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.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:295) at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176) at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:191) at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:523) at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:436) at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:1004) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:872) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:778) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526) at org.apache.log4j.LogManager.(LogManager.java:127) at org.apache.log4j.Logger.getLogger(Logger.java:104) at com.indy.engine.Global.InitRessources(SourceFile:269) at com.indy.engine.StartDelivery.main(SourceFile:294) com.indy.engine.common.exceptions.EngineExceptionI: Exception in getLstParametersInRepository at com.indy.engine.Global.InitRessources(SourceFile:366) at com.indy.engine.StartDelivery.main(SourceFile:294) Caused by: java.lang.NullPointerException at com.indy.engine.Global.getFileAppenderNewFileName(SourceFile:1494) at com.indy.engine.Global.InitRessources(SourceFile:334) ... 1 more
SOLUTION
This can happen when there are multiple deliveries executed at the same time via startdelivery script.
To workaround this issue you have to modify the file log4j.xml that you will find in stambiaRuntime/properties folder.
You will need to remove %port mask from all the log file names (make sure to make a copy of the original file in case you need to reverse the changes), for example :
Before :
<param name="file" value="log/com.indy.engine.%port.scheduler.log"/>
After :
<param name="file" value="log/com.indy.engine.global.scheduler.log"/>
After this is done for all the file names in the log4j.xml, save the file and restart your runtime.
In the log folder of your runtime you should see that runtime is now writing to the new files without the runtime's port number in the name.