Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 984581

Summary: There is no notifier.log generation
Product: Red Hat Enterprise Virtualization Manager Reporter: Ilanit Stein <istein>
Component: ovirt-engine-notification-serviceAssignee: Yair Zaslavsky <yzaslavs>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, bazulay, cpelland, iheim, mperina, oourfali, pstehlik, Rhev-m-bugs
Target Milestone: ---Keywords: Regression, Triaged, ZStream
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: is8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 997426 (view as bug list) Environment:
Last Closed: 2014-01-21 22:12:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 989422, 997426    

Description Ilanit Stein 2013-07-15 13:47:28 UTC
Description of problem:
The event notification work, but there is no notifier.log generated.

Version-Release number of selected component (if applicable):
is5

How reproducible:
always

Steps to Reproduce:
1.Set notifier definitions in /etc/ovirt-engine/notifier.conf.d/10-jboss.conf
or 
/usr/share/ovirt-engine/conf/notifier.conf.defaults
2. Start notifier service:
service ovirt-engine-notifier start

Additional info on current notifier current status (by alonbl):

(04:17:15 PM) alonbl: Reproduced at rhel!
(04:17:16 PM) alonbl: All is working... but logging.
(04:17:18 PM) alonbl: Plain System.out.println() does show sequence and errors.
(04:17:19 PM) alonbl: I guess you did not set MAIL_SERVER and you cannot see the error because the log is not working.
(04:17:21 PM) alonbl: I extracted the following command:
(04:17:22 PM) alonbl: # su - ovirt -s /bin/sh
(04:17:24 PM) alonbl: $ ENGINE_NOTIFIER_VARS=/etc/ovirt-engine/notifier/notifier.conf ENGINE_NOTIFIER_DEFAULTS=/usr/share/ovirt-engine/conf/notifier.conf.defaults JAVA_MODULEPATH='/usr/share/ovirt-engine/modules:/usr/share/jbossas/modules' CLASSPATH='' /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java -Dlog4j.configuration=file:///etc/ovirt-engine/notifier/log4j.xml -Djboss.modules.write-indexes=false -jar /usr/share/jbossas/jboss-modules.jar -dependencies org.ovirt.
(04:17:25 PM) alonbl: engine.core.tools -class org.ovirt.engine.core.notifier.Notifier
(04:17:27 PM) alonbl: Using strace I don't see that /etc/ovirt-engine/notifier/log4j.xml is being accessed, however, I do see this property is OK when I print it within the jvm.
(04:17:28 PM) alonbl: So we need help of someone with log4j knowledge... as the exact same command with 's/jbossas/jboss-as/g' does work at fedora with same version of engine.

Comment 1 Yair Zaslavsky 2013-07-15 14:50:30 UTC
This works upstream, but does not work on downstream 3.3

-Dlog4j.configuration accepts a file in URL format, and should use it for configuration, unless the URL is malformed or represents a file not found, and in this case, it will look for the configuration at the classpath (and of course, the file does not exist at the classpath).

Comment 3 Martin Perina 2013-07-17 11:13:22 UTC
For some reason JBoss Log Manager on RHEL does not initialize log4j configuration from system property (-Dlog4j.configuration=...), but when I configure log4j using:

DOMConfigurator.configure("/etc/ovirt-engine/notifier/log4j.xml");

in Notifier.main() method, logging works fine and log files are created.
I will continue to investigate why this works on Fedora and not on RHEL

Comment 4 Martin Perina 2013-07-17 12:36:38 UTC
Well, the problem is, that RHEL JBoss contains its own reimplemented log4j classes known as log4j-jboss-logmanager. The org.apache.log4j.LogManager class originally reads system property and configures Logger instance. But this initialization is completely missing from log4j-jboss-logmanager reimplementation.

Comment 8 Jiri Belka 2013-11-04 11:51:11 UTC
ok is21, /etc/ovirt-engine/notifier/log4j.xml is accessed and its configuration is applied (I see DEBUG priority...).

Comment 9 Itamar Heim 2014-01-21 22:12:01 UTC
Closing - RHEV 3.3 Released