Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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
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.
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
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...
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.
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.
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
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..
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
tcpserver: fatal: unable to bind: address already used
root@azul:/service/qmail-send# svc -d
alert: cannot start: unable to open mutex
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.
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.
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
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?
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.
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!