OpenERP server stops logging

Bug #329111 reported by RD
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Undecided
Unassigned

Bug Description

OpenERP server 5.0.0-2 stops logging after a specific (but possibly common) chain of events. There may be related problems, as it seems to be caused by a bad interaction between command line options and serverrc options.

From a few experiments it seems to be a generic problem with options, but for completeness: I found this happening on a 64-bit Ubuntu 8.04 LTS server with up to date packages, with the OpenERP server set up as running under a dedicated user/group ID, started from a customised init script. The server is started using 'start-stop-daemon' which passes several options. (But the same thing seems to happen when starting the server from the commandline.)

This is what happens: the server starts logging correctly (to a logfile specified with --logfile, but the same seems to happen when using syslog). Then, when changing the database admin password, .openerp_serverrc is written (which - redundantly - specifies several options including logging options). So far the server still writes to the log. However, when the server is restarted, it doesn't write to the log anymore.

If the .openerp_serverrc is removed the server will start logging again on restart (but this obviously loses the database password). When .openerp_serverrc is created again, same problem will happen on server restart.

So far I have been able to fix this by adding --log-level=info to the command line options. Maybe this overrides a broken log_level specification in the .openerp_serverrc?

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

I tested and it seems to work fine on branches/5.0. Car you retest and, eventually provide another way to reproduce this problem.

Changed in openobject-server:
status: New → Incomplete
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

I put in fix released, as I noticed this bug earlier and can't reproduce now. Reopen if you discover this bug again with latests sources (branches/5) from LP.

Changed in openobject-server:
status: Incomplete → Fix Released
Revision history for this message
Tobias G. Pfeiffer (tgpfeiffer) wrote :

I have the same problem with OpenERP 6 (Debian packages); after some time, the server stops writing to the log file. Maybe this has to do with some timeout; if I look at the log file after some days of inactivity, the last log messages are from that day back then, and doing some action which should cause a log file entry (like WebDAV access) does not change the file.

Revision history for this message
Justin Warren (justin-eigenmagic) wrote :

I had the same problem with OpenERP 6 on Ubuntu (11.04), and figured out what was wrong using strace:

openerp-server is trying to roll over an old /var/log/openerp-server.log to something with the date in the name, like /var/log/openerp-server.log.2011-05-12. It can't do this if the user the server is running as doesn't have appropriate permissions on /var/log, which it probably doesn't if you're running as openerp.

To fix, create a directory in /var/log and set the ownership to the user you run openerp-server as, e.g.:

mkdir /var/log/openerp
chown openerp /var/log/openerp

Then, change the --logfile parameter in the openerp-server commandline to:

--logfile=/var/log/openerp/openerp-server.log

and restart openerp-server.

Revision history for this message
xrg (xrg) wrote : Re: [Bug 329111] Re: OpenERP server stops logging

On Monday 16 May 2011, you wrote:
> I had the same problem with OpenERP 6 on Ubuntu (11.04), and figured out
> what was wrong using strace:
>
> openerp-server is trying to roll over an old /var/log/openerp-server.log
> to something with the date in the name, like /var/log/openerp-
> server.log.2011-05-12. It can't do this if the user the server is
> running as doesn't have appropriate permissions on /var/log, which it
> probably doesn't if you're running as openerp.
>
There is another approach, done 2 years ago with commit:
http://git.hellug.gr/?p=xrg/openobject-server;a=commitdiff;h=deba425f4aa55449
(the commit is present on 6.0 branch)

setting "logrotate=False" in openerp-server.conf , will turn off that, and then
you can use system's 'logrotate'. That one is safer.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.