JNLP Remote Poller file logging broken because of Log4j2 version

Description

In some recent Remote Poller logging work, I backported some code to foundation-2016 that relies on log4j2 2.7+. However, foundation-2016 only includes log4j2 2.5 so the log file appenders fail to initialize.

To fix, we can either revert the change or bump log4j2 from 2.5 to 2.8.2 in foundation-2016.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Seth Leger November 29, 2017 at 8:04 PM

You can work around this by using the Java Console to view the logs if you're running in JNLP mode. It is fixed in Horizon 20 and higher (but I'm not going to backport the fix to Meridian 2016/2017 since there is a workaround).

Seth Leger November 29, 2017 at 12:20 AM

I just noticed that this only affects the Remote Poller when it is launched via JNLP. In this case, it uses the log4j2.xml that is embedded in the JAR file and this is the config that is incompatible with log4j2 2.5.

When using the NSIS EXE installer, a log4j2.xml file is written to C:\Program Files\OpenNMS Remote Poller\etc\log4j2.xml and this file does not use any scripting features from log4j2 2.7+ so it works fine with log4j2 2.5.

Seth Leger November 20, 2017 at 10:10 PM

Here's the PR that would have to be backported to upgrade to Log4j2 2.8.2:

https://github.com/OpenNMS/opennms/pull/1424

Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

PagerDuty

Created November 20, 2017 at 10:07 PM
Updated November 29, 2017 at 8:04 PM
Resolved November 29, 2017 at 8:04 PM