tickets #104974
openmailman uwsgi logs - nothing logged since last year??
90%
Description
I don't know if it even makes sense to log this, but never mind - I was looking at mailman and noticed a number of logfiles had not been touched since last year:
mailman3 (lists.o.o):/var/log/mailman # l *log
-rw-r----- 1 mailman mailman 175237 Jan 17 14:53 bounce.log
-rw------- 1 mailman mailman 0 Jan 31 2021 debug.log
-rw-r----- 1 mailman mailman 6887762 Jan 17 14:53 mailman.log
-rw------- 1 mailman mailman 0 Jan 31 2021 plugins.log
-rw-r----- 1 mailman mailman 830739 Jan 17 14:53 smtp.log
-rw------- 1 mailman mailman 0 Jan 31 2021 uwsgi-cron.log
-rw-r----- 1 mailman mailman 0 Dec 26 00:00 uwsgi-error.log
-rw-r----- 1 mailman mailman 0 Dec 26 00:00 uwsgi-qcluster.log
-rw-r----- 1 mailman mailman 0 Dec 26 00:00 uwsgi.log
I restarted mailman and killed uwsgi. Seems to have worked.
Updated by pjessen about 2 years ago
- Category set to Mailing lists
- Private changed from Yes to No
I wonder if this is a logrotate issue, logging stopped again, at midnight:
# ls -lrt
-rw-r----- 1 mailman mailman 0 Jan 18 00:00 uwsgi.log
-rw-r----- 1 mailman mailman 0 Jan 18 00:00 uwsgi-qcluster.log
-rw-r----- 1 mailman mailman 0 Jan 18 00:00 uwsgi-error.log
Like yesterday, I did a 'systemctl restart mailman_webui' which takes about 2 minutes to complete.
Updated by pjessen about 2 years ago
From /etc/logrotate.d/mailman which comes in 'python3-mailman':
/var/log/mailman/*.log {
su mailman mailman
compress
dateext
maxage 365
rotate 30
notifempty
daily
create 640 mailman mailman
missingok
sharedscripts
postrotate
/bin/kill -HUP $(</run/mailman/master.pid) 2>/dev/null || true
/usr/bin/mailman reopen >/dev/null 2>&1 || true
endscript
}
This is clearly inadequate as it does not restart the webui.
Updated by pjessen about 2 years ago
- Status changed from New to In Progress
- Assignee set to pjessen
I have added 'log-reopen = true' to /etc/mailman/uwsgi.ini.
I have added 'ExecReload=kill -HUP $MAINPID' to /etc/systemd/system/mailman_webui.service.d/override.conf
That ought to be sufficient to make 'systemctl reload mailman_webui' work in logrotate.
Updated by pjessen about 2 years ago
- Due date set to 2022-01-20
- % Done changed from 0 to 50
Updated by pjessen about 2 years ago
- Due date deleted (
2022-01-20) - % Done changed from 50 to 90
Yes it works, cool. I am leaving this ticket as 90% done, these changes still need salting.