Unmaintained repository. Development moved to: https://github.com/nordic-institute/X-Road-development
19
stars
8
forks
source link
As a Security Server Administrator I want that unnecessary log entries are not written to log files so that they are not filled with irrelevant error messages #172
Problem
SystemProperties.java class in Common-util module tries to load center.ini and proxy.ini configuration files. In a case of center server proxy.ini is not installed and in a case of security server center.ini is not installed. However in both of these cases, an error message log entry is written to log file indicating error situation when loading ini file. In real world there is no error situation and hence false positive situation is logged into log file. This causes extra confusion to Security Server Admins and also fills the log files for nothing.
See below log files examples of unnecessary log entries.
Security Server, jetty.log:
2017-08-04 07:31:08,939 [main] WARN e.r.x.common.SystemPropertiesLoader - Error while loading /etc/xroad/conf.d/center.ini: {}
org.apache.commons.configuration.ConfigurationException: Cannot locate configuration source /etc/xroad/conf.d/center.ini
at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:259)
at org.apache.commons.configuration.AbstractHierarchicalFileConfiguration.load(AbstractHierarchicalFileConfiguration.java:189)
at ee.ria.xroad.common.SystemPropertiesLoader.load(SystemPropertiesLoader.java:302)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at ee.ria.xroad.common.SystemPropertiesLoader.load(SystemPropertiesLoader.java:242)
Central server, signer.log:
2017-08-04 07:30:50,955 WARN [main] e.r.x.common.SystemPropertiesLoader - Error while loading /etc/xroad/conf.d/proxy.ini: {}
org.apache.commons.configuration.ConfigurationException: Cannot locate configuration source /etc/xroad/conf.d/proxy.ini
at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:259)
at org.apache.commons.configuration.AbstractHierarchicalFileConfiguration.load(AbstractHierarchicalFileConfiguration.java:189)
at ee.ria.xroad.common.SystemPropertiesLoader.load(SystemPropertiesLoader.java:302)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at ee.ria.xroad.common.SystemPropertiesLoader.load(SystemPropertiesLoader.java:242)
at ee.ria.xroad.signer.SignerMain.(SignerMain.java:60)
Acceptance criteria
Unnecessary log entries are not written to log files (jetty.log and signer.log)
Affected components: Common-util Affected documentation: - Estimated delivery: Q3/2017 External reference: https://jira.csc.fi/browse/PVAYLADEV-861
Problem SystemProperties.java class in Common-util module tries to load center.ini and proxy.ini configuration files. In a case of center server proxy.ini is not installed and in a case of security server center.ini is not installed. However in both of these cases, an error message log entry is written to log file indicating error situation when loading ini file. In real world there is no error situation and hence false positive situation is logged into log file. This causes extra confusion to Security Server Admins and also fills the log files for nothing.
See below log files examples of unnecessary log entries.
Security Server, jetty.log:
2017-08-04 07:31:08,939 [main] WARN e.r.x.common.SystemPropertiesLoader - Error while loading /etc/xroad/conf.d/center.ini: {} org.apache.commons.configuration.ConfigurationException: Cannot locate configuration source /etc/xroad/conf.d/center.ini at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:259) at org.apache.commons.configuration.AbstractHierarchicalFileConfiguration.load(AbstractHierarchicalFileConfiguration.java:189) at ee.ria.xroad.common.SystemPropertiesLoader.load(SystemPropertiesLoader.java:302) at java.util.ArrayList.forEach(ArrayList.java:1249) at ee.ria.xroad.common.SystemPropertiesLoader.load(SystemPropertiesLoader.java:242)
Central server, signer.log:
2017-08-04 07:30:50,955 WARN [main] e.r.x.common.SystemPropertiesLoader - Error while loading /etc/xroad/conf.d/proxy.ini: {} org.apache.commons.configuration.ConfigurationException: Cannot locate configuration source /etc/xroad/conf.d/proxy.ini at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:259) at org.apache.commons.configuration.AbstractHierarchicalFileConfiguration.load(AbstractHierarchicalFileConfiguration.java:189) at ee.ria.xroad.common.SystemPropertiesLoader.load(SystemPropertiesLoader.java:302) at java.util.ArrayList.forEach(ArrayList.java:1249) at ee.ria.xroad.common.SystemPropertiesLoader.load(SystemPropertiesLoader.java:242) at ee.ria.xroad.signer.SignerMain.(SignerMain.java:60)
Acceptance criteria