Bug 885446 - restart engine-notifierd service follow linux error.
restart engine-notifierd service follow linux error.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-notification-service (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity low
: ---
: 3.2.0
Assigned To: Greg Padgett
Ilanit Stein
infra
:
Depends On:
Blocks: 910603 915537
  Show dependency treegraph
 
Reported: 2012-12-09 09:46 EST by Ilanit Stein
Modified: 2016-06-12 19:16 EDT (History)
8 users (show)

See Also:
Fixed In Version: sf7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 910603 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 11821 None None None Never

  None (edit)
Description Ilanit Stein 2012-12-09 09:46:51 EST
Description of problem:

When moving to DEBUG mode in /etc/ovirt-engine/notifier/log4j.xml,
After notifier service restart, linux error appear:
"find: failed to restore initial working directory: Permission denied"


Log:
===
> [root@lilach-rhel ~]# vi /etc/ovirt-engine/notifier/log4j.xml (set mode to DEBUG)


> [root@lilach-rhel ~]# /etc/rc.d/init.d/engine-notifierd restart

Printed on cli screen as response to the restart:

> Stopping engine-notifier:                                  [  OK  ]
> Starting engine-notifier: at Tue Dec  4 16:59:46 IST 2012find: failed to
> restore initial working directory: Permission denied find: failed to
> restore initial working directory: Permission denied find: failed to
> restore initial working directory: Permission denied find: failed to
> restore initial working directory: Permission denied find: failed to
> restore initial working directory: Permission denied [  OK  ]


> [root@lilach-rhel ~]# DEBUG: JavaMail version 1.4.4-redhat-1
> DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
> DEBUG: Tables of loaded providers
> DEBUG: Providers Listed By Class Name:
> {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com
> .sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc],
> com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.
> mail.smtp.SMTPTransport,Sun Microsystems, Inc],
> com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail
> .imap.IMAPSSLStore,Sun Microsystems, Inc],
> com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail
> .pop3.POP3SSLStore,Sun Microsystems, Inc],
> com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.ima
> p.IMAPStore,Sun Microsystems, Inc],
> com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop
> 3.POP3Store,Sun Microsystems, Inc]} DEBUG: Providers Listed By Protocol:
> {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun
> Microsystems, Inc],
> imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun
> Microsystems, Inc],
> smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTranspor
> t,Sun Microsystems, Inc],
> pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
> Microsystems, Inc],
> pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun
> Microsystems, Inc],
> smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
> Microsystems, Inc]} DEBUG: successfully loaded resource:
> /META-INF/javamail.default.address.map
Comment 1 Yair Zaslavsky 2012-12-30 06:25:07 EST
Are you sure this relates to setting to debug? what happens when you set back to info?
Comment 2 Ilanit Stein 2012-12-31 07:26:27 EST
The linux error "find: failed to restore initial working directory: Permission denied" appear for all priority levels (DEBUG, INFO, ERROR).
for DEBUG level,

Messages "DEBUG: JavaMail version 1.4.4-redhat-1
> DEBUG: successfully loaded resource: /META-INF/javamail.default.providers ..."
from the above bug description appear only for DEBUG priority level.

Bug subject has been changed accordingly.
Comment 3 Barak 2013-01-02 09:22:19 EST
Is it a file permissions issue ?
What are the permissions of: 

/etc/ovirt-engine/notifier
/etc/ovirt-engine/notifier/log4j.xml
/etc/ovirt-engine/notifier/notifier.conf
Comment 4 Ilanit Stein 2013-01-16 04:38:35 EST
drwxr-xr-x. 2 root  root  4096 Jan  8 15:43 notifier
-rw-r-----. 1 ovirt ovirt 3106 Dec 26 15:59 notifier.conf
-rw-r--r--. 1 root  root  1320 Dec 26 15:59 log4j.xml
Comment 5 Greg Padgett 2013-02-06 12:59:02 EST
(In reply to comment #2)
> The linux error "find: failed to restore initial working directory:
> Permission denied" appear for all priority levels (DEBUG, INFO, ERROR).
> for DEBUG level,

I was able to reproduce this; it's due to the init script executing `find` as user ovirt from root's home directory.  I've submitted a simple fix to upstream, linked in the ovirt gerrit tracker.

> Messages "DEBUG: JavaMail version 1.4.4-redhat-1
> > DEBUG: successfully loaded resource: /META-INF/javamail.default.providers ..."
> from the above bug description appear only for DEBUG priority level.

Can you attach your /etc/ovirt-engine/notifier/log4j.xml file?
Comment 6 Ilanit Stein 2013-02-07 01:21:32 EST
/etc/ovirt-engine/notifier/log4j.xml 
(priority set by priority value="INFO","DEBUG", "ERROR"):
====================================================================
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">

    <!-- Log levels:DEBUG,INFO,WARN,ERROR,FATAL -->
    <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
        <param name="File" value="/var/log/ovirt-engine/notifier/notifier.log" />
        <param name="Append" value="true" />
        <param name="MaxFileSize" value="10000KB" />
        <param name="MaxBackupIndex" value="5" />

        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d %-5p [%c] %m%n" />
            <!--  <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n" /> -->

        </layout>
    </appender>

    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
        <param name="Target" value="System.out" />
        <layout class="org.apache.log4j.PatternLayout">
            <!-- The default pattern: Date Priority [Category] Message\n -->
            <param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n" />
        </layout>
    </appender>

    <root>
        <priority value="INFO" />
        <!-- appender-ref ref="CONSOLE" /-->
        <appender-ref ref="FILE" />
    </root>

</log4j:configuration>
Comment 7 Greg Padgett 2013-02-12 18:26:51 EST
New bug 910603 was cloned from this one to split up the 2 issues here:
this bug - "find" error printed to terminal upon notifier startup
bug 910603 - JavaMail debug output printed to terminal upon notifier startup
Comment 8 Greg Padgett 2013-02-12 18:33:29 EST
Merged change id: I83622cbb8b39ea5792907e6efc68d824ca4b02da
Comment 9 Itamar Heim 2013-06-11 05:09:54 EDT
3.2 has been released
Comment 10 Itamar Heim 2013-06-11 05:10:02 EDT
3.2 has been released
Comment 11 Itamar Heim 2013-06-11 05:37:47 EDT
3.2 has been released

Note You need to log in before you can comment on or make changes to this bug.