[vchkpw] vpopmail via NFS
Hello All, I want to setup qmail with vpopmail that is mounted via NFS. As I tested, the mail message can sent to the new folder of user maildir correctly but I can not pop that message to mail client program. I did not find any error messages on my linux box. Could anyone please suggest me? Thanks for advance, Nitass
Re: [vchkpw] vpopmail via NFS
Nitass Sutaveephamochanon wrote: Hello All, I want to setup qmail with vpopmail that is mounted via NFS. As I tested, the mail message can sent to the new folder of user maildir correctly but I can not pop that message to mail client program. I did not find any error messages on my linux box. Could anyone please suggest me? Thanks for advance, Nitass Hi, Check the time on the two servers, make sure that they are the same. Regards, Rick
Re: [vchkpw] vpopmail via NFS
Hello Rick, I got it. Thank you very much. :-) If you do not mind, could you please advice me how the time is involved to this issue? Thanks and regards, Nitass - Original Message - From: Rick Macdougall [EMAIL PROTECTED] To: vchkpw@inter7.com Sent: Tuesday, November 15, 2005 8:29 PM Subject: Re: [vchkpw] vpopmail via NFS Nitass Sutaveephamochanon wrote: Hello All, I want to setup qmail with vpopmail that is mounted via NFS. As I tested, the mail message can sent to the new folder of user maildir correctly but I can not pop that message to mail client program. I did not find any error messages on my linux box. Could anyone please suggest me? Thanks for advance, Nitass Hi, Check the time on the two servers, make sure that they are the same. Regards, Rick
Re: [vchkpw] vpopmail via NFS
Nitass Sutaveephamochanon wrote: Hello Rick, I got it. Thank you very much. :-) If you do not mind, could you please advice me how the time is involved to this issue? Hi, A new message comes in. The message gets stored on the NFS server. The time on the pop server is 10 minutes behind the time on the NFS server, the pop server doesn't see the new message until 10 minutes is passed because the time stamp on the new message is 10 minutes in the future. Regards, Rick
Re: [vchkpw] vpopmail via NFS
Hi Rick, Thank you so much. Nice to meet you, Nitass - Original Message - From: Rick Macdougall [EMAIL PROTECTED] To: vchkpw@inter7.com Sent: Tuesday, November 15, 2005 9:24 PM Subject: Re: [vchkpw] vpopmail via NFS Nitass Sutaveephamochanon wrote: Hello Rick, I got it. Thank you very much. :-) If you do not mind, could you please advice me how the time is involved to this issue? Hi, A new message comes in. The message gets stored on the NFS server. The time on the pop server is 10 minutes behind the time on the NFS server, the pop server doesn't see the new message until 10 minutes is passed because the time stamp on the new message is 10 minutes in the future. Regards, Rick
RE: [vchkpw] vpopmail via NFS
try using ntp kenneth gf brown ceo shadowplay.net -Original Message- From: Rick Macdougall [mailto:[EMAIL PROTECTED] Sent: November 15, 2005 08:24 To: vchkpw@inter7.com Subject: Re: [vchkpw] vpopmail via NFS Nitass Sutaveephamochanon wrote: Hello Rick, I got it. Thank you very much. :-) If you do not mind, could you please advice me how the time is involved to this issue? Hi, A new message comes in. The message gets stored on the NFS server. The time on the pop server is 10 minutes behind the time on the NFS server, the pop server doesn't see the new message until 10 minutes is passed because the time stamp on the new message is 10 minutes in the future. Regards, Rick __ NOD32 1.1170 (20050715) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com
Re: [vchkpw] vpopmail via NFS
Hello, Thanks for advice. I will use it. I have one more question. Have anyone used vpopmail via SMB protocol? I mean the vpopmail is mounted from windows to linux box. I have tried but it did not work. The qmail-send log message has shown as delivery 16: failure: link_REALLY_failed. Thanks, Nitass - Original Message - From: shadowplay.net [EMAIL PROTECTED] To: vchkpw@inter7.com Sent: Tuesday, November 15, 2005 11:52 PM Subject: RE: [vchkpw] vpopmail via NFS try using ntp kenneth gf brown ceo shadowplay.net -Original Message- From: Rick Macdougall [mailto:[EMAIL PROTECTED] Sent: November 15, 2005 08:24 To: vchkpw@inter7.com Subject: Re: [vchkpw] vpopmail via NFS Nitass Sutaveephamochanon wrote: Hello Rick, I got it. Thank you very much. :-) If you do not mind, could you please advice me how the time is involved to this issue? Hi, A new message comes in. The message gets stored on the NFS server. The time on the pop server is 10 minutes behind the time on the NFS server, the pop server doesn't see the new message until 10 minutes is passed because the time stamp on the new message is 10 minutes in the future. Regards, Rick __ NOD32 1.1170 (20050715) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com
Re: [vchkpw] vpopmail via NFS
/var/qmail/queue must be mounted locally. Nitass Sutaveephamochanon wrote: Hello, Thanks for advice. I will use it. I have one more question. Have anyone used vpopmail via SMB protocol? I mean the vpopmail is mounted from windows to linux box. I have tried but it did not work. The qmail-send log message has shown as delivery 16: failure: link_REALLY_failed. Thanks, Nitass - Original Message - From: shadowplay.net [EMAIL PROTECTED] To: vchkpw@inter7.com Sent: Tuesday, November 15, 2005 11:52 PM Subject: RE: [vchkpw] vpopmail via NFS try using ntp kenneth gf brown ceo shadowplay.net -Original Message- From: Rick Macdougall [mailto:[EMAIL PROTECTED] Sent: November 15, 2005 08:24 To: vchkpw@inter7.com Subject: Re: [vchkpw] vpopmail via NFS Nitass Sutaveephamochanon wrote: Hello Rick, I got it. Thank you very much. :-) If you do not mind, could you please advice me how the time is involved to this issue? Hi, A new message comes in. The message gets stored on the NFS server. The time on the pop server is 10 minutes behind the time on the NFS server, the pop server doesn't see the new message until 10 minutes is passed because the time stamp on the new message is 10 minutes in the future. Regards, Rick __ NOD32 1.1170 (20050715) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com
Re: [vchkpw] vpopmail via NFS
Thanks for reply. Only the vpopmail directory was mounted from windows machine. Others were in the local file system. Any suggestions please let me know. Thanks, Nitass - Original Message - From: Ken Jones [EMAIL PROTECTED] To: vchkpw@inter7.com Sent: Wednesday, November 16, 2005 2:00 AM Subject: Re: [vchkpw] vpopmail via NFS /var/qmail/queue must be mounted locally. Nitass Sutaveephamochanon wrote: Hello, Thanks for advice. I will use it. I have one more question. Have anyone used vpopmail via SMB protocol? I mean the vpopmail is mounted from windows to linux box. I have tried but it did not work. The qmail-send log message has shown as delivery 16: failure: link_REALLY_failed. Thanks, Nitass - Original Message - From: shadowplay.net [EMAIL PROTECTED] To: vchkpw@inter7.com Sent: Tuesday, November 15, 2005 11:52 PM Subject: RE: [vchkpw] vpopmail via NFS try using ntp kenneth gf brown ceo shadowplay.net -Original Message- From: Rick Macdougall [mailto:[EMAIL PROTECTED] Sent: November 15, 2005 08:24 To: vchkpw@inter7.com Subject: Re: [vchkpw] vpopmail via NFS Nitass Sutaveephamochanon wrote: Hello Rick, I got it. Thank you very much. :-) If you do not mind, could you please advice me how the time is involved to this issue? Hi, A new message comes in. The message gets stored on the NFS server. The time on the pop server is 10 minutes behind the time on the NFS server, the pop server doesn't see the new message until 10 minutes is passed because the time stamp on the new message is 10 minutes in the future. Regards, Rick __ NOD32 1.1170 (20050715) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com
RE: [vchkpw] vpopmail via NFS
smb isn't meant for *nix to *nix connectivity :) Just stick with nfs. I've got 4 inbound smtp servers that deliver via nfs...works pretty well. Bill Shupp has a good flow chart of a good way to do a mail cluster via nfs. It's at http://shupp.org/maps/ispcluster.html Some people also deliver via smtproutes too...there was a discussion on the list about a month or so ago about that. Check the list archives. t. -Original Message- From: Nitass Sutaveephamochanon [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 15, 2005 10:05 AM To: vchkpw@inter7.com Subject: Re: [vchkpw] vpopmail via NFS Hello, Thanks for advice. I will use it. I have one more question. Have anyone used vpopmail via SMB protocol? I mean the vpopmail is mounted from windows to linux box. I have tried but it did not work. The qmail-send log message has shown as delivery 16: failure: link_REALLY_failed. Thanks, Nitass
[vchkpw] vpopmail via NFS
Has anyone tried to hold the vpopmail home as a NFS mount? I've gotten the mount setup properly, and the permissions are fine, however when adding a domain or a user I recieve the following error. minoru# ./bin/vadduser [EMAIL PROTECTED] Please enter password for [EMAIL PROTECTED]: enter password again: Failed while attempting to add user to auth backend Error: no auth connection If copy out all the files in the ~vpopmail mount, unmount, and copy the files into the now-local ~/vpopmail I do not have this problem. Has anyone done this, or know what the problem is? Thanks in advance. Jimmy McMillan -- James McMillan V.P. Of Information Technology www.TheNetMark.com 412 New Broadway Brooklawn, NJ 08030 888.767.8750 X106
RE: [vchkpw] vpopmail via NFS
I use NFS for my vpopmail directories, and haven't seen this.. I'm assuming you're using CDB files for auth; that means the DB files are all on NFS. If you don't have your root mapped properly, you won't be able to create files. Try using -maproot=0 (freebsd, others may be similar) in your exports on the NFS server, and re-mount the NFS mountpoint; see if that helps. Andre -Original Message- From: James McMillan [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 28, 2005 11:47 AM To: vchkpw@inter7.com Subject: [vchkpw] vpopmail via NFS Has anyone tried to hold the vpopmail home as a NFS mount? I've gotten the mount setup properly, and the permissions are fine, however when adding a domain or a user I recieve the following error. minoru# ./bin/vadduser [EMAIL PROTECTED] Please enter password for [EMAIL PROTECTED]: enter password again: Failed while attempting to add user to auth backend Error: no auth connection If copy out all the files in the ~vpopmail mount, unmount, and copy the files into the now-local ~/vpopmail I do not have this problem. Has anyone done this, or know what the problem is? Thanks in advance. Jimmy McMillan -- James McMillan V.P. Of Information Technology www.TheNetMark.com 412 New Broadway Brooklawn, NJ 08030 888.767.8750 X106
Re: [vchkpw] vpopmail via NFS
Hey thanks... Let me explain the scenario a bit better. NFS Server is a Slackware 10.1 box. NFS Client (and qmail/vpopmail server) is a FreeBSD 5.4 box. My server side client export file looks like this. /mnt/hd/mail_store/test minoru(no_root_squash,rw,sync) I believe the 'no_root_squash' flag is the equiv of the -maproot=0 for BSD/other OS's. I'm not having any issue at all creating files, chowning, or chmoding. It seems that it's a simple locking problem. [lockd] seems to be running on the NFS host, however I'm wondering if it's the difference in NFS standards. I've compiled vpopmail with the --disable-file-locking configure flag, and then everything seems to work fine, however it's not very multi-user-safe. Any other thoughts would be greatly appreciated. Jimmy Andre Fortin wrote: I use NFS for my vpopmail directories, and haven't seen this.. I'm assuming you're using CDB files for auth; that means the DB files are all on NFS. If you don't have your root mapped properly, you won't be able to create files. Try using -maproot=0 (freebsd, others may be similar) in your exports on the NFS server, and re-mount the NFS mountpoint; see if that helps. Andre -Original Message- From: James McMillan [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 28, 2005 11:47 AM To: vchkpw@inter7.com Subject: [vchkpw] vpopmail via NFS Has anyone tried to hold the vpopmail home as a NFS mount? I've gotten the mount setup properly, and the permissions are fine, however when adding a domain or a user I recieve the following error. minoru# ./bin/vadduser [EMAIL PROTECTED] Please enter password for [EMAIL PROTECTED]: enter password again: Failed while attempting to add user to auth backend Error: no auth connection If copy out all the files in the ~vpopmail mount, unmount, and copy the files into the now-local ~/vpopmail I do not have this problem. Has anyone done this, or know what the problem is? Thanks in advance. Jimmy McMillan -- James McMillan V.P. Of Information Technology www.TheNetMark.com 412 New Broadway Brooklawn, NJ 08030 888.767.8750 X106 -- James McMillan V.P. Of Information Technology www.TheNetMark.com 412 New Broadway Brooklawn, NJ 08030 888.767.8750 X106
RE: [vchkpw] vpopmail via NFS
I would reccomend having your slackware server running MySQL or some other type of database server. The installing the mysql client binaries and libraries on your frontend mail servers. Compile vpopmail for mysql (or the db backend of your choice) with replication. Designate your slackware server as your writing server, and the local boxes as your reading server. Then, on each local machine setup mysql replication from the frontend mail server(s) as slaves to the master slackware server on the backend. Then, mount your ~vpopmail/etc and ~vpopmail/domains, and possibly ~vpopmail/bin depending on how you want to set it up, via NFS from the slackware backend server to your bsd frontend servers. With a SQL server handling the authentication it will help you in a couple of ways. First is that you won't need to worry about file locking issues since the the SQL server will take care of all of that. Second would be improved performance, since you'll be querying a local database instead of having to travel across NFS to deliver the mail. And lastly, you could even apply the MySQL patch to tcpserver to do pop-before-smtp authentication out of the MySQL database in place of the cdb file. This would only be a problem if you were getting so many pop connections that it couldn't rebuild the cdb file fast enough. Another workaround for the whole rebuilding tcp.smtp.cdb file thing is to use the relay-ctrl program from untroubled.org for relay control. -Clayton -Original Message- From: James McMillan [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 28, 2005 10:39 AM To: vchkpw@inter7.com Subject: Re: [vchkpw] vpopmail via NFS Hey thanks... Let me explain the scenario a bit better. NFS Server is a Slackware 10.1 box. NFS Client (and qmail/vpopmail server) is a FreeBSD 5.4 box. My server side client export file looks like this. /mnt/hd/mail_store/test minoru(no_root_squash,rw,sync) I believe the 'no_root_squash' flag is the equiv of the -maproot=0 for BSD/other OS's. I'm not having any issue at all creating files, chowning, or chmoding. It seems that it's a simple locking problem. [lockd] seems to be running on the NFS host, however I'm wondering if it's the difference in NFS standards. I've compiled vpopmail with the --disable-file-locking configure flag, and then everything seems to work fine, however it's not very multi-user-safe. Any other thoughts would be greatly appreciated. Jimmy Andre Fortin wrote: I use NFS for my vpopmail directories, and haven't seen this.. I'm assuming you're using CDB files for auth; that means the DB files are all on NFS. If you don't have your root mapped properly, you won't be able to create files. Try using -maproot=0 (freebsd, others may be similar) in your exports on the NFS server, and re-mount the NFS mountpoint; see if that helps. Andre -Original Message- From: James McMillan [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 28, 2005 11:47 AM To: vchkpw@inter7.com Subject: [vchkpw] vpopmail via NFS Has anyone tried to hold the vpopmail home as a NFS mount? I've gotten the mount setup properly, and the permissions are fine, however when adding a domain or a user I recieve the following error. minoru# ./bin/vadduser [EMAIL PROTECTED] Please enter password for [EMAIL PROTECTED]: enter password again: Failed while attempting to add user to auth backend Error: no auth connection If copy out all the files in the ~vpopmail mount, unmount, and copy the files into the now-local ~/vpopmail I do not have this problem. Has anyone done this, or know what the problem is? Thanks in advance. Jimmy McMillan -- James McMillan V.P. Of Information Technology www.TheNetMark.com 412 New Broadway Brooklawn, NJ 08030 888.767.8750 X106 -- James McMillan V.P. Of Information Technology www.TheNetMark.com 412 New Broadway Brooklawn, NJ 08030 888.767.8750 X106
RE: [vchkpw] vpopmail via NFS
Slight correction on my verbage there: Second would be improved performance, since you'll be querying a local database instead of having to travel across NFS to deliver the mail. I meant to say that it won't have to travel across NFS to find if the user exists, only to deliver the mail.
Re: [vchkpw] vpopmail via NFS
Clayton, thanks... that's exactully what i did. Everything seems good now. Thanks a million for you input. Jimmy Clayton Weise wrote: Slight correction on my verbage there: Second would be improved performance, since you'll be querying a local database instead of having to travel across NFS to deliver the mail. I meant to say that it won't have to travel across NFS to find if the user exists, only to deliver the mail. -- James McMillan V.P. Of Information Technology www.TheNetMark.com 412 New Broadway Brooklawn, NJ 08030 888.767.8750 X106
RE: [vchkpw] vpopmail and nfs
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({2, 0}, {2, 0}) = 0 fcntl64(5, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = -1 ENOLCK (No locks available) write(2, File busy try again later!\n, 27) = 27 write(2, Failed while attempting to updat..., 57) = 57 chdir(/home/vpopmail) = 0 The problem is definitely acquiring the lock. Have you restarted nfs and nfs-locking on both sides post power outage? This is almost definitely a straight-forward NFS locking issue. Hope that helps, Nick I can't thank you enough, Nick. Nfslock was only running on the client, not the server. Further investigation showed nfslock failing to start on the server after the power outage. I reinstalled the nfslock rpms and restarted nfslock, everything is working correctly now. Thanks again, Grant
RE: [vchkpw] vpopmail and nfs
Tom Collins wrote: Try renaming the assign and cdb files, make a copy of the renamed assign file as 'assign' and set the correct ownership/permissions on it, and then try adding the domain. I renamed the assign and cdb files, copied them back to their original names, set ownership/permissions and tried to add the domain again, same error. Although I'm not 100% sure what the ownship/permissions should be. File busy try again later! Failed while attempting to update_file() the assign file Error. Failed to add domain to assign file Error: Could not update file -rw-rw-rw-1 vpopmail vchkpw 89 Jan 19 09:21 assign -rw-rw-rw-1 vpopmail vchkpw 89 Jan 18 12:30 assign.gs -rw-rw-rw-1 vpopmail vchkpw 0 Jan 19 2005 assign.lock -rw-rw-rw-1 vpopmail vchkpw 69 Jan 18 12:30 assign.rpmsave -rw-rw-rw-1 vpopmail vchkpw 2181 Jan 18 12:30 cdb.gs -rw-rw-rw-1 vpopmail vchkpw 2161 Jan 18 12:30 cdb.rpmsave
RE: [vchkpw] vpopmail and nfs
Tom Collins wrote: Try renaming the assign and cdb files, make a copy of the renamed assign file as 'assign' and set the correct ownership/permissions on it, and then try adding the domain. I renamed the assign and cdb files, copied them back to their original names, set ownership/permissions and tried to add the domain again, same error. Although I'm not 100% sure what the ownship/permissions should be. File busy try again later! Failed while attempting to update_file() the assign file Error. Failed to add domain to assign file Error: Could not update file Can you try running strace and paste the output? That error could be coming from several different places within update_file().
RE: [vchkpw] vpopmail and nfs
At 08:55 AM 1/19/2005, you wrote: File busy try again later! Failed while attempting to update_file() the assign file Error. Failed to add domain to assign file Error: Could not update file -rw-rw-rw-1 vpopmail vchkpw 89 Jan 19 09:21 assign -rw-rw-rw-1 vpopmail vchkpw 89 Jan 18 12:30 assign.gs -rw-rw-rw-1 vpopmail vchkpw 0 Jan 19 2005 assign.lock -rw-rw-rw-1 vpopmail vchkpw 69 Jan 18 12:30 assign.rpmsave -rw-rw-rw-1 vpopmail vchkpw 2181 Jan 18 12:30 cdb.gs -rw-rw-rw-1 vpopmail vchkpw 2161 Jan 18 12:30 cdb.rpmsave i'm not familiar with the OS you'd mentioned you're running, but at least under Solaris (inventors of NFS), if the NFS connection drops while there are active locks, files named .nfs.X - where X is the PID, as i recall - will be generated. you might run a find for such files.i think it may be possible to'flush' those, but i don't recall the mechanism (it's been years since i ran NFS). Paul Theodoropoulos http://www.anastrophe.com http://www.smileglobal.com
Re: [vchkpw] vpopmail and nfs
I assume CentOS is some kind of Linux? The email below is geared toward Linux. File busy try again later! Failed while attempting to update_file() the assign file Error. Failed to add domain to assign file Error: Could not update file Let's see if we can use the source to figure out what's wrong. In vpopmail.c, the code is trying to append a line to the assign file. To do this with FILE_LOCKING defined, the update_file routine needs to open and lock assign.lock. If it doesn't, it complains: Failed while attempting to update_file() the assign file The update_file routine calls get_write_lock to do its dirty work. Here's the routine in file_lock.c: int get_write_lock( FILE *fs ) { int try = 0; while(write_lock(fileno(fs), 0, SEEK_SET, 0) 0) { if (errno == EAGAIN || errno == EACCES || errno == ENOLCK ) { /* there might be other errors cases in which * you might try again. */ if (++try MAX_TRY_RLOCK) { (void) sleep(2); continue; } (void) fprintf(stderr,File busy try again later!\n); return(-1); } return(-2); } return(0); } The write_lock() routine is a wrapper for fcntl(). If you look at the fcntl(2) man page, it lists many reasons why it would fail. Based on your second email, it's not permissions. Some other program must have a lock on the file and is not letting go, or there's some other odd problem (NFS? extended attributes?). I have a few suggestions to help debugging: 1. Run strace -f /home/vpopmail/bin/vadddomain ...etc Look at the output right before the printf of the error messages for the return value from fcntl. 2. Run lsof assign.lock after it fails to see if there are any other processes that have the file open. This would be done on both the client and the server. 3. Add the following line before the line that has ++try MAX_TRY_RLOCK: (void) perror(Debug write_lock: ) Then recompile vpopmail, install it, and try it again (don't forget to make backups!). You'll hopefully get a reason for the locking failure printed when it happens again. 4. Restart the NFS client and the NFS server and try again (stale lock). Also, something you might need to do is make sure your NFS server doesn't clobber UID names. I noticed in one of your emails that assign.lock was owned by nfsnobody. The export options on the NFS server should use no_all_squash,no_root_squash,async,rw. On most distros, no_all_squash is the default option, but your distro might have it set the other way. Other NFS stuff: 1. The client needs to use NFS V3 for fcntl locking to work. See this article: http://www.quepublishing.com/articles/article.asp?p=23618seqNum=4 2. Is nfslockd running on the client? 3. Is the NFS client and NFS server running the same OS? If not, could there be some compatability issues? Hope this helps. -- Eric Ziegast PS: If all else fails, install vpopmail on the NFS server and run the administrative commands (vadddomain, vadduser, etc.) on the NFS server. Patient: Doctor, when I hit my hand to make it spin around, it hurts. Doctor: Stop doing that, and you'll be fine. That'll be $200.
RE: [vchkpw] vpopmail and nfs
Nick Harring wrote: Can you try running strace and paste the output? That error could be coming from several different places within update_file(). Thanks for the reply Nick. Below is the strace of running the vadddomain command. execve(/home/vpopmail/bin/vadddomain, [/home/vpopmail/bin/vadddomain, domain5.com, password], [/* 20 vars */]) = 0 uname({sys=Linux, node=manage.readyhosting.com, ...}) = 0 brk(0) = 0x835 open(/etc/ld.so.preload, O_RDONLY)= -1 ENOENT (No such file or directory) open(/etc/ld.so.cache, O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=18539, ...}) = 0 old_mmap(NULL, 18539, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb75f5000 close(3)= 0 open(/usr/lib/mysql/libmysqlclient.so.10, O_RDONLY) = 3 read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\201\0..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=221376, ...}) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75f4000 old_mmap(NULL, 224832, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x665000 old_mmap(0x683000, 102400, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1d000) = 0x683000 close(3)= 0 open(/usr/lib/libz.so.1, O_RDONLY)= 3 read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\31..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=52584, ...}) = 0 old_mmap(NULL, 55564, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x36c000 old_mmap(0x378000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xb000) = 0x378000 close(3)= 0 open(/lib/tls/libm.so.6, O_RDONLY)= 3 read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\3604\0..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=213396, ...}) = 0 old_mmap(NULL, 135616, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x968000 old_mmap(0x989000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x21000) = 0x989000 close(3)= 0 open(/lib/libcrypt.so.1, O_RDONLY)= 3 read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220\t\0..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=23364, ...}) = 0 old_mmap(NULL, 181308, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x56c000 old_mmap(0x571000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x4000) = 0x571000 old_mmap(0x572000, 156732, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x572000 close(3)= 0 open(/lib/tls/libc.so.6, O_RDONLY)= 3 read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200X\1..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1568904, ...}) = 0 old_mmap(NULL, 1276876, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x1be000 old_mmap(0x2f, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x131000) = 0x2f old_mmap(0x2f4000, 7116, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2f4000 close(3)= 0 open(/lib/libnsl.so.1, O_RDONLY) = 3 read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \0\000..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=90984, ...}) = 0 old_mmap(NULL, 84832, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xbb6000 old_mmap(0xbc8000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x11000) = 0xbc8000 old_mmap(0xbc9000, 7008, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xbc9000 close(3)= 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75f3000 set_thread_area({entry_number:-1 - 6, base_addr:0xb75f3500, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 munmap(0xb75f5000, 18539) = 0 brk(0) = 0x835 brk(0x8371000) = 0x8371000 brk(0) = 0x8371000 open(/var/qmail/users/cdb, O_RDONLY) = -1 ENOENT (No such file or directory) umask(077) = 022 getcwd(/var/qmail/users, 256) = 17 chdir(/home/vpopmail) = 0 chdir(domains)= 0 open(/home/vpopmail/etc/vpopmail.mysql, O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=38, ...}) = 0 mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75f8000 read(3, 10.1.4.10|0|vpopmail|ab13zxc|vpo..., 8192) = 38 read(3, , 8192) = 0 open(/etc/nsswitch.conf, O_RDONLY)= 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=1686, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75f7000 read(4, #\n# /etc/nsswitch.conf\n#\n# An ex..., 4096) = 1686 read(4, , 4096) = 0 close(4)= 0 munmap(0xb75f7000, 4096)= 0 open(/etc/ld.so.cache, O_RDONLY) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=18539, ...}) = 0
RE: [vchkpw] vpopmail and nfs
Can you try running strace and paste the output? That error could be coming from several different places within update_file(). Thanks for the reply Nick. Below is the strace of running the vadddomain command. execve(/home/vpopmail/bin/vadddomain, [/home/vpopmail/bin/vadddomain, domain5.com, password], [/* 20 vars */]) = 0 uname({sys=Linux, node=manage.readyhosting.com, ...}) = 0 brk(0) = 0x835 open(/etc/ld.so.preload, O_RDONLY)= -1 ENOENT (No such file or snip unimportant strace output rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({2, 0}, {2, 0}) = 0 fcntl64(5, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = -1 ENOLCK (No locks available) rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({2, 0}, {2, 0}) = 0 fcntl64(5, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = -1 ENOLCK (No locks available) rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({2, 0}, {2, 0}) = 0 fcntl64(5, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = -1 ENOLCK (No locks available) rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({2, 0}, {2, 0}) = 0 fcntl64(5, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = -1 ENOLCK (No locks available) rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({2, 0}, {2, 0}) = 0 fcntl64(5, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = -1 ENOLCK (No locks available) rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({2, 0}, {2, 0}) = 0 fcntl64(5, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = -1 ENOLCK (No locks available) write(2, File busy try again later!\n, 27) = 27 write(2, Failed while attempting to updat..., 57) = 57 chdir(/home/vpopmail) = 0 The problem is definitely acquiring the lock. Have you restarted nfs and nfs-locking on both sides post power outage? This is almost definitely a straight-forward NFS locking issue. Hope that helps, Nick
RE: [vchkpw] vpopmail and nfs
I assume CentOS is some kind of Linux? The email below is geared toward Linux. Yes, CentOS is a 100% compatible rebuild of Red Hat Enterprise Linux. The write_lock() routine is a wrapper for fcntl(). If you look at the fcntl(2) man page, it lists many reasons why it would fail. Running strace and reading the fcntl man page brings me to the following return value: ENOLCK Too many segment locks open, lock table is full, or a remote locking protocol failed (e.g. locking over NFS). To me it seems like a NFS locking problem, although I'm just guessing. 2. Run lsof assign.lock after it fails to see if there are any other processes that have the file open. This would be done on both the client and the server. Running lsof assign.lock after the vadddomain command fails on both the client and server had no output. 4. Restart the NFS client and the NFS server and try again (stale lock). Tried restarting NFS client and server, no luck. Also, something you might need to do is make sure your NFS server doesn't clobber UID names. I noticed in one of your emails that assign.lock was owned by nfsnobody. The export options on the NFS server should use no_all_squash,no_root_squash,async,rw. On most distros, no_all_squash is the default option, but your distro might have it set the other way. Previously, the folders were exported as (sync,rw). The thought was on data reliability in a harsh network environment. I've since changed the export options to (no_all_squash,no_root_squash,async,rw). This hasn't made any difference. The thing is, this used to work before the power outage, so I can't imagine it's a configuration issue. 1. The client needs to use NFS V3 for fcntl locking to work. I've since changed the mount options in fstab to rw,hard,intr,nfsvers=3 to force NFS v3, no luck. 2. Is nfslockd running on the client? I was able to confirm rpc.statd and lockd were running: rpcuser 13578 0.0 0.1 1664 740 ?S14:41 0:00 rpc.statd root 11464 0.0 0.0 00 ?SW Jan18 0:00 [lockd] 3. Is the NFS client and NFS server running the same OS? If not, could there be some compatability issues? Yes, the NFS cilent and NFS server are both running the same OS. Hope this helps. Thank you very much for your efforts! They have proven very helpful in troubleshooting this issue. I wouldn't have known where to begin otherwise. PS: If all else fails, install vpopmail on the NFS server and run the administrative commands (vadddomain, vadduser, etc.) on the NFS server. I'd love to except the NFS server is connected to a private network, only the management box is connected to the private network and the internet.
[vchkpw] vpopmail and nfs
I am running a cluster of 3 servers running CentOS 3.3 (2.4.21-20.0.1.ELsmp). One server provides MySQL, the other NFS and the last Qmail/Vpopmail. The Qmail server has /home/vpopmail, /var/qmail/control and /var/qmail/users mounted via NFS. The Qmail server is running the Qmail Toaster packages from www.qmailtoaster.com. Everything worked perfectly until we lost a power distribution unit at our datacenter. All 3 servers got shut down hard. Now, when I try to add a new domain, I get the following error: [EMAIL PROTECTED] users]# /home/vpopmail/bin/vadddomain -q 1073741824 -b Domain.com "password"File busy try again later!Failed while attempting to update_file() the assign fileError. Failed to add domain to assign fileError: Could not update file I thought the problem was related to permissions, although so far I haven't been able to determine the problem. Any help would be greatly appreciated. /var/qmail/users [EMAIL PROTECTED] users]# ls -ltotal 16-rw-rw-rw- 1 vpopmail vchkpw 89 Jan 18 12:30 assign-rw-rw-rw- 1 vpopmail vchkpw 0 Jan 18 12:32 assign.9550-rw-rw-rw- 1 vpopmail vchkpw 0 Jan 18 12:32 assign.9663-rw-rw-rw- 1 vpopmail vchkpw 0 Jan 18 12:32 assign.9984-rw-rw-rw- 1 vpopmail vchkpw 0 Jan 18 12:46 assign.lock-rw-rw-rw- 1 vpopmail vchkpw 69 Jan 18 12:30 assign.rpmsave-rw-rw-rw- 1 vpopmail vchkpw 2181 Jan 18 12:30 cdb-rw-rw-rw- 1 vpopmail vchkpw 2161 Jan 18 12:30 cdb.rpmsave /var/qmail/control[EMAIL PROTECTED] control]# ls -ltotal 152-rw-r--r-- 1 vpopmail vchkpw 17 Jan 18 12:30 badmailfrom-rw-r--r-- 1 vpopmail vchkpw 24 Jan 18 12:30 badmailto-rw-r--r-- 1 vpopmail vchkpw 57 Jan 18 12:30 blacklists-rw-r--r-- 1 vpopmail vchkpw 2259 Jan 18 12:30 clientcert.pem-rw-r--r-- 1 vpopmail vchkpw 4 Jan 18 12:30 concurrencyincoming-rw-r--r-- 1 vpopmail vchkpw 3 Jan 18 12:30 concurrencyremote-rw-r--r-- 1 vpopmail vchkpw 9 Jan 18 12:30 databytes-rw-r--r-- 1 vpopmail vchkpw 11 Jan 18 12:30 defaultdelivery-rw-r--r-- 1 vpopmail vchkpw 17 Jan 18 12:30 defaultdomain-rw-r--r-- 1 vpopmail vchkpw 17 Jan 18 12:30 defaultdomain.rpmsave-rw-r--r-- 1 vpopmail vchkpw 17 Jan 18 12:30 defaulthost-rw-r--r-- 1 vpopmail vchkpw 17 Jan 18 12:30 defaulthost.rpmsave-rw-r--r-- 1 vpopmail vchkpw 245 Jan 18 12:30 dh1024.pem-rw-r--r-- 1 vpopmail vchkpw 156 Jan 18 12:30 dh512.pem-rw-r--r-- 1 vpopmail vchkpw 34 Jan 18 12:30 locals-rw-r--r-- 1 vpopmail vchkpw 0 Jan 18 12:31 locals.lock-rw-r--r-- 1 vpopmail vchkpw 34 Jan 18 12:30 locals.rpmsave-rw-r--r-- 1 vpopmail vchkpw 24 Jan 18 12:30 me-rw-r--r-- 1 vpopmail vchkpw 24 Jan 18 12:30 me.rpmsave-rw-r--r-- 1 vpopmail vchkpw 2 Jan 18 12:30 mfcheck-rw-r--r-- 1 vpopmail vchkpw 6238 Jan 18 12:30 mysql.sql-rw-r--r-- 1 vpopmail vchkpw 17 Jan 18 12:30 plusdomain-rw-r--r-- 1 vpopmail vchkpw 17 Jan 18 12:30 plusdomain.rpmsave-rw-r--r-- 1 vpopmail vchkpw 24 Jan 18 12:30 rcpthosts-rw-r--r-- 1 vpopmail vchkpw 1 Jan 18 12:30 rcpthosts.lock-rw-r--r-- 1 vpopmail vchkpw 24 Jan 18 12:30 rcpthosts.rpmsave-rw-r--r-- 1 vpopmail vchkpw 497 Jan 18 12:30 rsa512.pem-rw-r--r-- 1 vpopmail vchkpw 2259 Jan 18 12:30 servercert.pem-rw-r--r-- 1 vpopmail vchkpw 1689 Jan 18 12:30 servercert.pem.rpmnew-rw-r--r-- 1 vpopmail vchkpw 2263 Jan 18 12:30 servercert.pem.rpmsave-rw-r--r-- 1 vpopmail vchkpw 432 Jan 18 12:30 signatures-rw-r--r-- 1 vpopmail vchkpw 46 Jan 18 12:30 smtpgreeting-rw-r--r-- 1 vpopmail vchkpw 0 Jan 18 12:31 smtproutes-rw-r--r-- 1 vpopmail vchkpw 95 Jan 18 12:30 sql-rw-r--r-- 1 vpopmail vchkpw 96 Jan 18 12:30 sql.bak-rw-r--r-- 1 vpopmail vchkpw 95 Jan 18 12:30 sql.rpmsave-rw-r--r-- 1 vpopmail vchkpw 3 Jan 18 12:30 tarpitcount-rw-r--r-- 1 vpopmail vchkpw 2 Jan 18 12:30 tarpitdelay-rw-r--r-- 1 vpopmail vchkpw 20 Jan 18 12:30 virtualdomains-rw-r--r-- 1 vpopmail vchkpw 0 Jan 18 12:31 virtualdomains.lock
Re: [vchkpw] vpopmail and nfs
On Jan 18, 2005, at 10:55 AM, Grant Supp wrote: [EMAIL PROTECTED] users]# /home/vpopmail/bin/vadddomain -q 1073741824 -b Domain.com password File busy try again later! Failed while attempting to update_file() the assign file Error. Failed to add domain to assign file Error: Could not update file I thought the problem was related to permissions, although so far I haven't been able to determine the problem. Any help would be greatly appreciated. /var/qmail/users [EMAIL PROTECTED] users]# ls -l total 16 -rw-rw-rw- 1 vpopmail vchkpw 89 Jan 18 12:30 assign -rw-rw-rw- 1 vpopmail vchkpw 0 Jan 18 12:32 assign.9550 -rw-rw-rw- 1 vpopmail vchkpw 0 Jan 18 12:32 assign.9663 -rw-rw-rw- 1 vpopmail vchkpw 0 Jan 18 12:32 assign.9984 -rw-rw-rw- 1 vpopmail vchkpw 0 Jan 18 12:46 assign.lock -rw-rw-rw- 1 vpopmail vchkpw 69 Jan 18 12:30 assign.rpmsave -rw-rw-rw- 1 vpopmail vchkpw 2181 Jan 18 12:30 cdb -rw-rw-rw- 1 vpopmail vchkpw 2161 Jan 18 12:30 cdb.rpmsave That assign file looks pretty small. I assume you're not hosting many domains on that server... I'd think that deleting assign.9* and assign.lock would take care of your problem. -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/
RE: [vchkpw] vpopmail and nfs
/var/qmail/users [EMAIL PROTECTED] users]# ls -l total 16 -rw-rw-rw- 1 vpopmail vchkpw 89 Jan 18 12:30 assign -rw-rw-rw- 1 vpopmail vchkpw 0 Jan 18 12:32 assign.9550 -rw-rw-rw- 1 vpopmail vchkpw 0 Jan 18 12:32 assign.9663 -rw-rw-rw- 1 vpopmail vchkpw 0 Jan 18 12:32 assign.9984 -rw-rw-rw- 1 vpopmail vchkpw 0 Jan 18 12:46 assign.lock -rw-rw-rw- 1 vpopmail vchkpw 69 Jan 18 12:30 assign.rpmsave -rw-rw-rw- 1 vpopmail vchkpw 2181 Jan 18 12:30 cdb -rw-rw-rw- 1 vpopmail vchkpw 2161 Jan 18 12:30 cdb.rpmsave That assign file looks pretty small. I assume you're not hosting many domains on that server... I'd think that deleting assign.9* and assign.lock would take care of your problem. -- Tom Collins - [EMAIL PROTECTED] Thanks for the reply Tom. You are correct, there is only 1 or 2 domains on the server. The server is not in production. I have tried deleting assign.lock and assign.9* as suggested but I'm still having the same error. [EMAIL PROTECTED] users]# /home/vpopmail/bin/vadddomain -q 1073741824 -b domain.com password File busy try again later! Failed while attempting to update_file() the assign file Error. Failed to add domain to assign file Error: Could not update file [EMAIL PROTECTED] users]# ls -l total 16 -rw-rw-rw-1 vpopmail vchkpw 89 Jan 18 12:30 assign -rw---1 nfsnobody nfsnobody0 Jan 18 2005 assign.lock -rw-rw-rw-1 vpopmail vchkpw 69 Jan 18 12:30 assign.rpmsave -rw-rw-rw-1 vpopmail vchkpw 2181 Jan 18 12:30 cdb -rw-rw-rw-1 vpopmail vchkpw 2161 Jan 18 12:30 cdb.rpmsave
Re: [vchkpw] vpopmail and nfs
On Jan 18, 2005, at 2:04 PM, Grant Supp wrote: [EMAIL PROTECTED] users]# /home/vpopmail/bin/vadddomain -q 1073741824 -b domain.com password File busy try again later! Failed while attempting to update_file() the assign file Error. Failed to add domain to assign file Error: Could not update file [EMAIL PROTECTED] users]# ls -l total 16 -rw-rw-rw-1 vpopmail vchkpw 89 Jan 18 12:30 assign -rw---1 nfsnobody nfsnobody0 Jan 18 2005 assign.lock -rw-rw-rw-1 vpopmail vchkpw 69 Jan 18 12:30 assign.rpmsave -rw-rw-rw-1 vpopmail vchkpw 2181 Jan 18 12:30 cdb -rw-rw-rw-1 vpopmail vchkpw 2161 Jan 18 12:30 cdb.rpmsave Try renaming the assign and cdb files, make a copy of the renamed assign file as 'assign' and set the correct ownership/permissions on it, and then try adding the domain. -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/