couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell McOrmond <Russell.McOrm...@canadiana.ca>
Subject CouchDB sending duplicate log entries to stdout/stderr (stored in upstart logs on Ubuntu)
Date Fri, 15 Apr 2016 14:44:59 GMT
I didn't get any reply, and am surprised other people aren't having the
same issue.

I've since updated my Upstart script to throw away any stdout (running as
`exec su couchdb -c "/usr/bin/couchdb >/dev/null"` ) to avoid the worst of
the problem, but it does mean that the helpful startup message is also
missing.


Does anyone know if the dev team is looking into this issue?  I shouldn't
have to be tossing out stdout as logs should be going to the defined
logfile and not also to stdout.


---------- Forwarded message ----------
From: Russell McOrmond <Russell.McOrmond@canadiana.ca>
Date: Sat, Feb 27, 2016 at 8:09 AM
Subject: CouchDB sending duplicate log entries to stdout/stderr (stored in
upstart logs on Ubuntu)
To: user@couchdb.apache.org



We get our CouchDB from
https://launchpad.net/~couchdb/+archive/ubuntu/stable and are running
Ubuntu 14.04

We are using couchdb 1.6.1-0ubuntu5

We have noticed the following in email from Cron on many of our machines
nightly (we get many emails):

/etc/cron.daily/logrotate:
gzip: stdin: file size changed while zipping


The problem is with CouchDB stdout/stderr logging (Example output using -v)

considering log /var/log/upstart/couchdb.log
  log needs rotating
rotating log /var/log/upstart/couchdb.log, log->rotateCount is 7
dateext suffix '-20160227'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
renaming /var/log/upstart/couchdb.log.7.gz to
/var/log/upstart/couchdb.log.8.gz (rotatecount 7, logstart 1, i 7),
renaming /var/log/upstart/couchdb.log.6.gz to
/var/log/upstart/couchdb.log.7.gz (rotatecount 7, logstart 1, i 6),
renaming /var/log/upstart/couchdb.log.5.gz to
/var/log/upstart/couchdb.log.6.gz (rotatecount 7, logstart 1, i 5),
renaming /var/log/upstart/couchdb.log.4.gz to
/var/log/upstart/couchdb.log.5.gz (rotatecount 7, logstart 1, i 4),
renaming /var/log/upstart/couchdb.log.3.gz to
/var/log/upstart/couchdb.log.4.gz (rotatecount 7, logstart 1, i 3),
renaming /var/log/upstart/couchdb.log.2.gz to
/var/log/upstart/couchdb.log.3.gz (rotatecount 7, logstart 1, i 2),
renaming /var/log/upstart/couchdb.log.1.gz to
/var/log/upstart/couchdb.log.2.gz (rotatecount 7, logstart 1, i 1),
renaming /var/log/upstart/couchdb.log.0.gz to
/var/log/upstart/couchdb.log.1.gz (rotatecount 7, logstart 1, i 0),
old log /var/log/upstart/couchdb.log.0.gz does not exist
renaming /var/log/upstart/couchdb.log to /var/log/upstart/couchdb.log.1
compressing log with: /bin/gzip
switching uid to 0 and gid to 104
gzip: stdin: file size changed while zipping
removing old log /var/log/upstart/couchdb.log.8.gz
switching euid to 0 and egid to 0


Note that this is /var/log/upstart logs (logs of stdout, stderr from
CouchDB) and not the expected/desired logs in /var/log/couchdb/

What is being dumped in here is a duplicate of the same logs which are
being put in the logfile.

Searching I found a potential patch for this issue that I guess wasn't
accepted...
https://github.com/amatas/couchdb-centos/blob/master/couchdb-0011-Silence-redundant-logging-to-stdout-stderr.patch

And discussion in https://issues.apache.org/jira/browse/COUCHDB-2264
Note: I agree that using "-e" and "-o" to redirect stdout/stderr to
/dev/null isn't a good solution as there are things which should be going
to stdout/stderr, and a duplicate copy of logs going to /var/log/couchdb/*
isn't part of that.

I note there is discussion in this forum from 2010 about whether
"COUCHDB_STDOUT_FILE" should be set to /dev/null in /etc/defaults/couchdb ,
but that appears to be from before Upstart was used for startup.

Is there something we can do in our settings to correct this issue, or is
this a bug in CouchDB?  We don't want to have this duplication of logs, and
want to get CRON to stop spamming us each evening.

Is there at least a way to change the log level for that redundant
stdout/stderr logging separate from the output to the proper log files?


Thanks for any help.


-- 
System Administration and software developer,
Canadiana.org   http://www.canadiana.ca



-- 
System Administration and software developer,
Canadiana.org   http://www.canadiana.ca

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message