Re: fetchmail: lock creation failed
Jan Minar wrote:
On Mon, Jan 05, 2004 at 09:41:55AM -0500, Thomas H. George wrote:
With no fetchmail to feed mail to mutt and so no threading I have lost
the thread and must re-post.
If you want to read the thread, look among the headers of any mail on
this list, for `List-Archive:'.
As advised I re-copied /oldhome/tom to /home/tom with tar. This did not
solve the problem.
It wasn't supposed to, really.
There is no .fetchmail.pid file in /oldhome/tom or anywhere else.
Ooops. I thought ~/.fetchmail.pid was _the_ lockfile. Did you mean
running fetchmail as user tom, or a sitewide fetchmail started at
bootup? Or a fetchmail run by another user maybe?
When it was working I alway ran it as user tom from my home directory.
I tried dpkg -- purge fetchmail followed by apt-get -f install
fetchmail. This did not solve the problem.
Should be ``dpkg --purge'' (without the space after `--').
The space was a typo in the email, I did the purge correctly.
Any more suggestions?
Yes: strace(1). Look especially for the open(), and anything from the
stat() family (man 2 stat).
Final two lines of strace fetchmail run from /home/tom:
open("/home/tom/.fetchmail.pid", O_WRONLY|O_CREAT|O_EXCL|O_SYNC,
0666) = -1 EACCESS (Permission Denied)
write (2, "fetchmail: lock creation failed. ..., 33) = 33
I tried creating a file .fetchmail.pid with chown tom and chmod 666.
This gave the same result with (File Exists) instead of (Permission Denied).
I also found and read /usr/share/doc/fetchmail/README.Debian.gz which
notes the program wont run if there is no /etc/fetchmailrc file. I
copied /usr/share/doc/fetchmail/examples/fetchmailrc.exampe to
/etc/fetchmailrc and edited the last lines to read
poll mail.spininternet.com with protocol pop3
user 'xyz' there with password * is 'tom' here
and changed the file to be chmod 0600, chown fetchmail. This is
apparently not enough as /etc/init.d/fetchmail debug-run does nothing so
/etc/init.d/fetchmail debug-run strace -o /tmp/strace.out as suggested
in README.Debian.gz produces no output. However, strace -o
/tmp/strace.out fetchmail run from /home/tom works/
There is clearly a mis-connect somewhere. whereis fetchmail reports one
/usr/bin/fetchmail and the man file.
Does any of this provide a clue as to what is going on?
Tom
HTH.
Reply to: