LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-21-2004, 11:23 AM   #1
azul79
Member
 
Registered: Jul 2004
Location: Argentina
Distribution: slackware
Posts: 39

Rep: Reputation: 15
Question QMAIL ! multilog: fatal:


hi! I'm a new slackware user.. and I'm trying to run the qmail server....
I 've been running with some problems.. my actual problem is the following error message:

multilog: fatal: unable to lock directory /var/log/qmail/smtpd: temporary failure

the output of the qmail stat is this one :

root@azul:/service/qmail-smtpd/log# qmailctl stat
/service/qmail-send: up (pid 12917) 0 seconds
/service/qmail-send/log: up (pid 9224) 754 seconds
/service/qmail-smtpd: up (pid 9226) 754 seconds
/service/qmail-smtpd/log: up (pid 9228) 755 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0

and when I ask to see the process ..:

root@azul:/service/qmail-smtpd/log# ps -efa | grep qmail
root 25779 25777 0 12:14 ? 00:00:00 supervise qmail-send
root 25783 25777 0 12:14 ? 00:00:00 supervise qmail-smtpd
qmaill 9224 25782 0 13:08 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/send
qmaild 9226 25783 0 13:08 ? 00:00:00 [tcpserver]
qmaill 9228 25784 0 13:08 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/smtpd
qmails 13194 25779 0 13:22 ? 00:00:00 [qmail-send] <defunct>
root 13200 10296 0 13:22 pts/4 00:00:00 grep qmail

based on LWQ I should be getting another qmaild output line with the following instruction:

qmaild 13717 1185 0 17:33 ? 00:00:00 /var/qmail/bin/qmail-smtpd

this one is missing... and when I try to see where the problem is.. the above message error is what I got...
does anyone know what could be wrong?
thanks
 
Old 07-21-2004, 12:58 PM   #2
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
I think you should stop qmail with qmailctl stop. Now do qmailctl stat and verify that all the processes are stopped. Just for good measure, do svc -d /service/qmail-*. Now go to ps -ef and see if there are any qmail processes still trying to run. If that one is still showing <defunct> try to kill it with kill -9 pid where pid is the process ID of the defunct item. Now try to qmailctl start and see if everything is good.

You may also want to try doing a ps -ef | grep proc and see if there are any errors showing up on readproctile service errors. Normally they will just be dots, which is fine.

If you have been editing your control files through windows, you'll need to do a vi -b on each control file and delete the ^M characters you see at the end of each line.

If you're using Life with Qmail, as long as you're following everything to the letter (precision matters!) there should be no mistakes at all and everything should work fine right off the bat.
 
Old 07-22-2004, 07:49 AM   #3
azul79
Member
 
Registered: Jul 2004
Location: Argentina
Distribution: slackware
Posts: 39

Original Poster
Rep: Reputation: 15
hey! thanks 4 your help!!
I tried what u told me.. but .. when I kill the process.. he doesn't wanna die!!!
this is what i do after stopping qmail..

root@azul:/service/qmail-smtpd/log# qmailctl stat
/service/qmail-send: down 32 seconds, normally up
/service/qmail-send/log: down 33 seconds, normally up
/service/qmail-smtpd: down 33 seconds, normally up
/service/qmail-smtpd/log: down 33 seconds, normally up
messages in queue: 0
messages in queue but not yet preprocessed: 0
root@azul:/service/qmail-smtpd/log# svc -d /service/qmail*
root@azul:/service/qmail-smtpd/log# ps -efa | grep qmail
root 1970 1968 0 Jul21 ? 00:00:00 supervise qmail-send
root 1974 1968 0 Jul21 ? 00:00:00 supervise qmail-smtpd
root 8358 906 3 09:30 pts/3 00:00:00 grep qmail
root@azul:/service/qmail-smtpd/log# kill -9 1970
root@azul:/service/qmail-smtpd/log# kill -9 1974
root@azul:/service/qmail-smtpd/log# ps -efa | grep qmail
root 8359 1968 0 09:31 ? 00:00:00 supervise qmail-send
root 8385 1968 0 09:31 ? 00:00:00 supervise qmail-smtpd
qmaild 8386 8385 0 09:31 ? 00:00:00 [tcpserver]
qmails 8436 8359 0 09:31 ? 00:00:00 [qmail-send] <defunct>
root 8442 906 0 09:31 pts/3 00:00:00 grep qmail

root@azul:/service/qmail-smtpd/log# qmailctl stat
/service/qmail-send: up (pid 8868) 700 seconds, want down
/service/qmail-send/log: down 962 seconds, normally up
/service/qmail-smtpd: down 6 seconds, normally up
/service/qmail-smtpd/log: down 962 seconds, normally up


root@azul:/service/qmail-smtpd/log# ps -efa | grep qmail
root 8359 1968 0 09:31 ? 00:00:00 supervise qmail-send
root 8385 1968 0 09:31 ? 00:00:00 supervise qmail-smtpd
root 8901 906 0 09:45 pts/3 00:00:00 grep qmail
root@azul:/service/qmail-smtpd/log# kill -9 8359
root@azul:/service/qmail-smtpd/log# kill -9 8385
root@azul:/service/qmail-smtpd/log# ps -efa | grep qmail
root 8902 1968 0 09:45 ? 00:00:00 supervise qmail-send
qmails 8903 8902 0 09:45 ? 00:00:00 [qmail-send]
root 8905 8903 0 09:45 ? 00:00:00 qmail-lspawn ./newmode
qmailr 8906 8903 0 09:45 ? 00:00:00 [qmail-rspawn]
qmailq 8907 8903 0 09:45 ? 00:00:00 [qmail-clean]
root 8908 1968 0 09:45 ? 00:00:00 supervise qmail-smtpd
qmaild 8909 8908 3 09:45 ? 00:00:00 [tcpserver]
root 8915 906 0 09:45 pts/3 00:00:00 grep qmail


it seems as if the qmail-send.. can't die.. isn' it?

Last edited by azul79; 07-22-2004 at 07:50 AM.
 
Old 07-22-2004, 08:32 AM   #4
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Well the error you mentioned in your first post usually means supervise is already trying to run in that directory. You need to stop all qmail-related processes including svscan, supervises, anything running as "qmail" user, qmail-send, multilogs, etc. If you have trouble stopping svscan, try /etc/init.d/svscan stop. Try to kill -9 the other processes so that qmail is completely dead.

Next, you'll need to double-check directory names, owners, groups and the contents of your run scripts againt lifewithqmail. When you're satisfied that everything is in order, try starting qmail again with qmailctl start.

If after this you're still getting the error, try running... sh -x
/usr/local/sbin/qmail start
and copy/paste the output here.

One other thing that troubles me... one of your lines says this...

Quote:
root 8905 8903 0 09:45 ? 00:00:00 qmail-lspawn ./newmode
Where did you get "newmode"? I think you want Maildir or Mailbox instead. This would be controlled in your run script for qmail-pop3d. Maybe you intended for this because you're trying a custom setup, but it looked wrong to me because it sounded like you're trying to stay true to LWQ.
 
Old 07-22-2004, 09:08 AM   #5
azul79
Member
 
Registered: Jul 2004
Location: Argentina
Distribution: slackware
Posts: 39

Original Poster
Rep: Reputation: 15
thanks 4 your help!!
I checked LWQ & the owners and permissions seems to be ok..

I tried to stop svscan.. I dont have the /etc/init.d folder.. but i tried to kill it anyway.. and after i kill it it comes to life again alone!!

with qmailctl stop i get this when i ask to see the process..

root@azul:/service/qmail-smtpd/log# ps -efa

root 21826 1 0 11:09 ? 00:00:00 /bin/sh /command/svscanboot
root 21831 21826 0 11:09 ? 00:00:00 svscan /service
root 21832 21826 0 11:09 ? 00:00:00 readproctitle service errors: ..................
root 21836 21831 0 11:09 ? 00:00:00 supervise log
root 21837 21831 0 11:09 ? 00:00:00 supervise qmail-smtpd
root 21847 21831 0 11:09 ? 00:00:00 supervise qmail-send
root 21848 21831 0 11:09 ? 00:00:00 supervise log

and the output of the sh -x command is ..

root@azul:/etc# qmailctl start
Starting qmail
root@azul:/etc# sh -x /usr/local/sbin/qmailctl start
+ PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
+ export PATH
++ id -u qmaild
+ QMAILDUID=1003
++ id -g qmaild
+ NOFILESGID=102
+ echo 'Starting qmail'
Starting qmail
+ svok /service/qmail-send
+ svc -u /service/qmail-send /service/qmail-send/log
+ svok /service/qmail-smtpd
+ svc -u /service/qmail-smtpd /service/qmail-smtpd/log
+ '[' -d /var/lock/subsys ']'
+ touch /var/lock/subsys/qmail
+ exit 0


thanks again!
 
Old 07-22-2004, 09:14 AM   #6
azul79
Member
 
Registered: Jul 2004
Location: Argentina
Distribution: slackware
Posts: 39

Original Poster
Rep: Reputation: 15
and..also..
the ./newmode.. I dont know why it appears there!!
because.. I have Mailbox as my defaultdelivery
 
Old 07-22-2004, 10:28 AM   #7
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
If you kill svscan manually, like with kill -9 it will be respawned within about 2 or 3 seconds by svscanboot.

Sounds like svscan is located somewhere else on your machine... maybe /etc/rc.d/init.d/svscan? I think we may be having some communication troubles because I don't know slack very well and how everything is setup. You may want to use "find" or "locate" to see where this file is stored. Sounds like you probably need to know where these init scripts are located anyhow, becasue these are what programs are launched when the machine boots, and at some point, you will need to know where they are.

Once you find your svscan command, you may want to try stopping it like I described above with "svscan stop". If you still can't find svscan, maybe try kill `cat /var/run/svscan.pid` which should kill it the old fashioned way. Note doing this, you'll also need to run svc -dx /service/* and svc -dx /service/*/log to be sure everything dies.

If none of this seems to be working, you can go into /etc/inittab (I sure hope you have this!) and look for the line that calls svscan. Usually this is at the bottom of the inittab file and you can just put a # in front of the line to comment it out. Now do kill -1 1 (note, those are both one's, not L's) which will restart process #1 which is init. This causes the inittab file to be reloaded. Now kill the old svscan processes with kill -9. Also run svc -dx /service/* and also for /service/*/log to be sure everything is dead. Also do ps -ef and be sure all qmail processes are dead and are truly dead and being respawned. Hopefully they should all kill themselves by now. If you see any defunct, try killing those too with kill -9. This should leave you in a state where qmail is totally dead. Now uncomment the inittab line and "kill -1 1" again, and svscan should come back up. Now you should be able to run qmailctl start and qmail should launch normally. Now let me know what you get from ps -ef and qmailctl stat.

One other thing that comes to mind... you may want to check your symlinks located under /service and be sure there are no duplicates... like none that are pointing twice to the same target.

I'm afraid if you're still getting errors after this, you may want to step back through life with qmail another time from scratch. LWQ has been around for several years now and most all of the bugs have been worked out, so most everyone going through it should come off without any problems whatsoever because Dave has done a wonderful job of fixing the bugs in his instructions.

You may also want to consider the first link shown in my signature. This is a very very good mail server howto. It's a little more involved than LWQ, has a lot more instructinos, but also gives you a lot more features (bells and whistles mostly) for your qmail system. If you're serious about running a mail server for numerous users, I think you will find that LWQ all by itself just isn't enough, but works wonderfully for small mail servers with just a few domains hosted.
 
Old 07-22-2004, 11:53 AM   #8
azul79
Member
 
Registered: Jul 2004
Location: Argentina
Distribution: slackware
Posts: 39

Original Poster
Rep: Reputation: 15
I know my configuration scripts are in /etc/rc.d/ but there' s no svscan script in there o rin my /etc/ file..

i tried to stop it as u said.. i located it in :

root@azul:/var# locate svscan
/usr/local/bin/svscanboot
/usr/local/bin/svscan

but it didnt work..
so I did it with the inittab file..
the output of the qmailctl stat is this:

root@azul:/etc# qmailctl start
Starting qmail
root@azul:/etc# qmailctl stat
/service/qmail-send: up (pid 489) 1 seconds
/service/qmail-send/log: up (pid 344) 28 seconds
/service/qmail-smtpd: up (pid 345) 28 seconds
/service/qmail-smtpd/log: up (pid 349) 28 seconds
messages in queue: 1
messages in queue but not yet preprocessed: 1

the message in queue.. is just 1 i tried to send as testing the mail..

and the output of ps is:

root@azul:/etc# ps -efa | grep qmail
root 340 338 0 13:51 ? 00:00:00 supervise qmail-send
root 342 338 0 13:51 ? 00:00:00 supervise qmail-smtpd
qmaill 344 341 0 13:51 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/send
qmaild 345 342 0 13:51 ? 00:00:00 [tcpserver]
qmaill 349 347 0 13:51 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/smtpd
qmails 974 340 6 13:53 ? 00:00:00 [qmail-send] <defunct>


as u can see here.. i dont see. qmailr, qmailq and qmaild [/var/qmail/bin/qmail-smtp] and qmail-lspawn [./Mailbox] . up....

i checked the links on /service.. and they seem ok.. just 1 link each..
i followed LWQ. .. and i 've reread it many times and i still can not find the problem..
something strange is that the qmail-spawn... (./Mailbox).. sometimes when i ask for the proc.. is up.. and sometimes not..
it seems to me .. as if the qmail-send and qmail-smtpd are the problem..
i tried this .. and look what happens...

root@azul:/service/qmail-smtpd# svc -d
root@azul:/service/qmail-smtpd# ./run
tcpserver: fatal: unable to bind: address already used

and..

root@azul:/service/qmail-send# svc -d
root@azul:/service/qmail-send# ./run
alert: cannot start: unable to open mutex

thank u very very much 4 your help!!!
 
Old 07-22-2004, 12:12 PM   #9
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Quote:
root@azul:/service/qmail-smtpd# svc -d
You didn't specify anything to bring down. The svc is asking for "service" and the -d is telling it to bring something down. Likewise using a -u is bringing something up. So the only thing you missed is telling it what to bring down. So when you did /run manually, it couldn't start another instance of qmail because you already have one running on that port, so naturally it says you can't bind to the address because it's being used by another qmail process that is running.

Here's another way that worked for me.

Try this... I commented out the line in inittab as we discussed and then at the command line, run init q. This should reload the inittab file and kill all the children under svscan and should automatically kill qmail processes too. When I did that on mine, all of qmail was killed.

Now do the reverse and it should come back up by itself too.
 
Old 07-22-2004, 12:14 PM   #10
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
The correct syntax is...

svc -d /service/*
svc -d /service/*/log

Running qmailctl stat afterwards should show you what's up.
 
Old 07-22-2004, 12:27 PM   #11
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
By the way... I think we're getting to the poiint where you should post your run scripts. There may be something in there you've overlooked... like if you use the letter O instead of a zero it will croak. Did you try using the troubleshooting section of LWQ? There is a script in there that checks for obvious problems.
 
Old 07-22-2004, 12:34 PM   #12
azul79
Member
 
Registered: Jul 2004
Location: Argentina
Distribution: slackware
Posts: 39

Original Poster
Rep: Reputation: 15
hey!! thanks 4 answer so fast!
i did wat u told me..
this is the output of qmailctl stat

root@azul:/var/qmail# svc -d /service/*
root@azul:/var/qmail# svc -d /service/*/log
root@azul:/var/qmail# qmailctl stat
/service/qmail-send: down 17 seconds, normally up
/service/qmail-send/log: down 11 seconds, normally up
/service/qmail-smtpd: down 18 seconds, normally up
/service/qmail-smtpd/log: down 11 seconds, normally up
messages in queue: 1
messages in queue but not yet preprocessed: 1

and..

root@azul:/etc# ps -efa | grep qmail

root 12275 12273 0 14:34 ? 00:00:00 supervise qmail-send
root 12277 12273 0 14:34 ? 00:00:00 supervise qmail-smtpd
qmaill 12709 12276 1 14:39 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/send
qmaild 12712 12277 2 14:39 ? 00:00:00 [tcpserver]
qmaill 12714 12280 1 14:39 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/smtpd
root 12733 15453 0 14:39 pts/2 00:00:00 grep qmail
root 12734 12275 0 14:39 ? 00:00:00 [qmail-start]
root 12736 12734 0 14:39 ? 00:00:00 qmail-lspawn ./Mailbox

root@azul:/etc# ps -efa | grep qmail

root 12275 12273 0 14:34 ? 00:00:00 supervise qmail-send
root 12277 12273 0 14:34 ? 00:00:00 supervise qmail-smtpd
qmaill 12709 12276 0 14:39 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/send
qmaild 12712 12277 0 14:39 ? 00:00:00 [tcpserver]
qmaill 12714 12280 0 14:39 ? 00:00:00 /usr/local/bin/multilog t /var/log/qmail/smtpd
qmails 12844 12275 6 14:39 ? 00:00:00 [qmail-send] <defunct>

as u can see.. what bothers me.. is that.. some services of qmail (as qmailq , qmailr & qmaild) dont get up... and here u can see what i was telling u about the qmail-lspawn.. the first time it gets up.. but not the second one.. u see what i mean?
 
Old 07-22-2004, 12:44 PM   #13
azul79
Member
 
Registered: Jul 2004
Location: Argentina
Distribution: slackware
Posts: 39

Original Poster
Rep: Reputation: 15
yes! i tried the inst_check script
and i solved some..
but now..i thoght that when everything is ok.. it shiçould say sth,, but it doesnt..
it just gives me another #

root@azul:~/qmail# sh inst_check
root@azul:~/qmail#

just nothing..
 
Old 07-22-2004, 01:26 PM   #14
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
You say it "solved some"? What kind of stuff did it find?? Also, you should try looking at the ps output a little more if you have changed some stuff. There may be new errors showing in your error logs too.

Also, I'm a little confused about the two times you ran ps and posted the output. What I mean is... you ran the command then ran it again. Is that first one showing what it looks like with everything down and the second output is with everything running?

If you completely stop qmail then run your ps output again, you should see NO processes running as a qmail userid. You should see some processes running as root and that's fine. These will be mostly those things running supervised. The stuff running as qmail user id's are running as those ID"s because your run scripts tell them to run as that user. If you've got processes owned by qmail user ID's running when qmail is stopped, then something is hosed up.
 
Old 07-23-2004, 08:26 AM   #15
azul79
Member
 
Registered: Jul 2004
Location: Argentina
Distribution: slackware
Posts: 39

Original Poster
Rep: Reputation: 15
the problems i solved with the inst_check were.. a link i was missing.. and an owner file problem..
what im trying now is to install it again.. may i'm missing sth i dont realise..
I hope this time .. not having these problems!!
thank u very much 4 your help!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Webmail / Mailfront / smtpfront-qmail / qmail-smtpd Apollo77 Linux - Software 2 01-20-2009 03:33 AM
qmail Fatal Error ArenaJAG Linux - Software 1 01-24-2005 07:38 AM
qmail multilog error james2002 Linux - Newbie 4 09-22-2004 03:31 AM
HELP! fatal: unknown account qmail?setuidgid azul79 Linux - Networking 2 07-20-2004 08:22 AM
qmail +qmail-qfilter + qmail-scanner-queue+qmail-user-masq.pl problem countcobolt Linux - Networking 0 07-08-2004 11:29 AM


All times are GMT -5. The time now is 09:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration