Daily cron fails

Bug #442854 reported by Loïc Minier on 2009-10-05
68
This bug affects 13 people
Affects Status Importance Assigned to Milestone
couchdb (Ubuntu)
High
Unassigned
Lucid
Undecided
Unassigned

Bug Description

Binary package hint: couchdb

Hi

On two different boxes where I have Ubuntu Desktop and hence couchdb-bin, I get nightly emails about the couchdb cron having failed:
/etc/cron.daily/logrotate:
error: error accessing /var/log/couchdb/0.10.0~svn813472: No such file or
directory
error: couchdb:1 glob failed for /var/log/couchdb/0.10.0~svn813472/*.log
error: found error in /var/log/couchdb/0.10.0~svn813472/*.log , skipping

Note that the version doesn't match the version of the package; I suspect this conffile was dropped in some version, but wasn't rm_conffiled properly.

Thanks,

ProblemType: Bug
Architecture: amd64
Date: Mon Oct 5 08:39:48 2009
DistroRelease: Ubuntu 9.10
Package: couchdb-bin 0.10.0~svn818859-0ubuntu1
ProcEnviron:
 SHELL=/bin/zsh
 PATH=(custom, user)
 LANG=fr_FR.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-11.38-generic
SourcePackage: couchdb
Uname: Linux 2.6.31-11-generic x86_64

Loïc Minier (lool) wrote :
Lars Ljung (larslj) on 2009-10-05
Changed in couchdb (Ubuntu):
status: New → Confirmed
Peter Cooper (pcooper-gaitor) wrote :

Just to confirm, I have this one as well.

James Westby (james-w) wrote :

In addition to the rm_conffile issue (the file was moved to a different package which
might make fixing that tricky), it also fails in the same way with the couchdb package
installed.

The directory just doesn't exist here, so the glob fails even when couchdb is installed
and running.

Thanks,

James

Changed in couchdb (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
Eric Casteleijn (thisfred) wrote :

This does seems like it's an upgrade where the old logrotate entry was not overwritten correctly.

Mine (/etc/logrotate.d/couchdb) has:

/var/log/couchdb/0.10.0~svn818859/*.log {
       weekly
       rotate 10
       copytruncate
       delaycompress
       compress
       notifempty
       missingok
}

Which suggests that that particular svn snapshot did handle the upgrade correctly. I wonder if a subsequent upgrade will fix the issue, and if not, how we can solve this. (I have upgraded couchdb many times on this system, and never manually configured logrotate.)

Changed in couchdb (Ubuntu):
milestone: none → ubuntu-9.10
Heitzso (heitzso) wrote :

/etc/cron.daily/logrotate:
error: error accessing /var/log/couchdb/0.10.0: No such file or directory
error: couchdb:1 glob failed for /var/log/couchdb/0.10.0/*.log
error: found error in /var/log/couchdb/0.10.0/*.log , skipping

/var/log/couchdb# ls -lrt
drwxrwx--- 2 couchdb couchdb 4096 2009-09-13 07:57 0.10.0~svn809550
drwxrwx--- 2 couchdb couchdb 4096 2009-10-13 20:46 0.10.0~svn818859

mmalmeida (mmalmeida) wrote :

Just to confirm it also affects me.

Mail received has:

/etc/cron.daily/logrotate:
error: error accessing /var/log/couchdb/0.10.0~svn813472: No such file or directory
error: couchdb:1 glob failed for /var/log/couchdb/0.10.0~svn813472/*.log
error: found error in /var/log/couchdb/0.10.0~svn813472/*.log , skipping

I don't have any couchdb folder in my /var/log .

to be removed (liw) wrote :

I too have this problem. /var/log/couchdb exists, /var/log/couchdb/0.10.0 does not exist. Should the logrotate glob be changed to

/var/log/couchdb/*/*.log

?

I don't know what assumptions are at work here, and I don't understand why there are version-specific directories, so it would be good to have some input from someone who understands that.

to be removed (liw) wrote :

I tried this:

liw@gytha$ sudo /usr/sbin/logrotate /etc/logrotate.conf
[sudo] password for liw:
error: error accessing /var/log/couchdb/0.10.0: Tiedostoa tai hakemistoa ei ole
error: couchdb:1 glob failed for /var/log/couchdb/0.10.0/*.log
error: found error in /var/log/couchdb/0.10.0/*.log , skipping

Then I change the glob according to my previous message and re-ran:

liw@gytha$ sudo vi /etc/logrotate.d/couchdb
liw@gytha$ sudo /usr/sbin/logrotate /etc/logrotate.conf
liw@gytha$

So the glob really would seem to fix the problem.

mmalmeida (mmalmeida) wrote :

To prevent this error from happening I did two things:

1) created a /var/log/couchdb directory

2) As suggested by Lars in #7, I changed the line in /etc/logrotate.d/couchdb to

/var/log/couchdb/*/*.log

Seems like a trivial bug to fix...

Joe Edmonds (joee) wrote :

Thanks, wild_oscar. Your workaround worked for me too.

Reinhard Tartler (siretart) wrote :

while inspecting the couchdb_1.0.1-0ubuntu1_all.deb package from maverick, it seems to me that this issue has been fixed, at least in maverick.

contents of ./etc/logrotate.d/couchdb:

/var/log/couchdb/*.log {
       weekly
       rotate 10
       copytruncate
       delaycompress
       compress
       notifempty
       missingok
}

/var/log/couchdb is created via package postinst.

However, still unfixed in lucid!

Reinhard Tartler (siretart) wrote :

michahg, you did the last couchdb upload, could you please have a look at this?

Micah Gersten (micahg) wrote :

This appears fixed in Lucid and there's even a changelog entry from 0.10.0-1:
   * Put log files directly into /var/log/couchdb directory. There's no reason
     to have different log subdirectories for different couchdb versions.

Doesn't seem to be fixed on Maverick (upgraded from Lucid) for me:

andrew@andrew-laptop:~$ apt-cache policy couchdb-bin
couchdb-bin:
  Installed: 1.0.1-0ubuntu1
  Candidate: 1.0.1-0ubuntu1
  Version table:
 *** 1.0.1-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick/main i386 Packages
        100 /var/lib/dpkg/status
andrew@andrew-laptop:~$ cat /etc/logrotate.d/couchdb
/var/log/couchdb/0.10.0~svn813472/*.log {
       weekly
       rotate 10
       copytruncate
       delaycompress
       compress
       notifempty
       missingok
}
andrew@andrew-laptop:~$ logrotate /etc/logrotate.d/couchdb
error: error accessing /var/log/couchdb/0.10.0~svn813472: No such file or directory
error: /etc/logrotate.d/couchdb:1 glob failed for /var/log/couchdb/0.10.0~svn813472/*.log
error: found error in /var/log/couchdb/0.10.0~svn813472/*.log , skipping

Rolf Leggewie (r0lf) wrote :

lucid has seen the end of its life and is no longer receiving any updates. Marking the lucid task for this ticket as "Won't Fix".

Changed in couchdb (Ubuntu Lucid):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers