4.68. Why do I get [Errno 2] No such file or directory: referring to a qfiles .pck (or .bak) file in my error log.
From a recent post to mailman-users:
I keep receiving this error and cannot determine why. Can someone help me?
Traceback (most recent call last): File "/usr/local/mailman/bin/qrunner", line 270, in ? main() File "/usr/local/mailman/bin/qrunner", line 230, in main qrunner.run() File "/usr/local/mailman/Mailman/Queue/Runner.py", line 70, in run filecnt = self._oneloop() File "/usr/local/mailman/Mailman/Queue/Runner.py", line 99, in _oneloop msg, msgdata = self._switchboard.dequeue(filebase) File "/usr/local/mailman/Mailman/Queue/Switchboard.py", line 143, in dequeue fp = open(filename) IOError: [Errno 2] No such file or directory: '/usr/local/mailman/qfiles/bounces/1142960439.447984+fc08b5ba5bce8de3f6f63c1227ee942197f02e0d.pck'
A somewhat different log entry referring to a .bak file and with no traceback can also occur from the same underlying cause. This error can look like
Failed to unlink/preserve backup file: /usr/local/mailman/qfiles/bounces/1142960439.447984+fc08b5ba5bce8de3f6f63c1227ee942197f02e0d.bak [Errno 2] No such file or directory: '/usr/local/mailman/qfiles/bounces/1142960439.447984+fc08b5ba5bce8de3f6f63c1227ee942197f02e0d.bak'
Or, prior to Mailman 2.1.16, only the first line of the above.
The most likely cause of this is more than one qrunner processing the same slice of the same queue. This usually results from someone or some script doing
bin/mailmanctl -s start
when Mailman is already running.
You need to stop all Mailman processes and then start Mailman once only.
First, as root, do
bin/mailmanctl stop
or if you use an init.d script, do
service mailman stop
Then wait a minute or two for the running processes to wrap up (OutgoingRunner in particular can take some time if it is in the process of delivering a message to a large number of recipients). Then do
ps -fAww |grep python
or however you spell that for your system to see what Mailman processes are still running. If you see a mailmanctl process, send it SIGTERM with
kill -TERM <pid>
where <pid> is its pid from the ps output. Do this until there are no more mailmanctl processes. At this point, if there are any qrunner processes left, do the same for them until there are no Mailman processes running at all. Then do
bin/mailmanctl start
or with an init.d script, do
service mailman start
Converted from the Mailman FAQ Wizard
This is one of many Frequently Asked Questions.