Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Qmail: users

I have a problem about svc

 

 

Qmail users RSS feed   Index | Next | Previous | View Threaded


maslak at ihlas

Nov 4, 2007, 2:08 PM

Post #1 of 7 (1069 views)
Permalink
I have a problem about svc

I use qmail-1.05 and vpopmail.

I use svc command to start or stop qmail's services.
I can start qmail's smtp and pop3 services with svc.
But I couldn't stop qmail-smtp service with svc. I don't get any error message.
What's wrong with it?


kyle-qmail at memoryhole

Nov 4, 2007, 7:17 PM

Post #2 of 7 (1005 views)
Permalink
Re: I have a problem about svc [In reply to]

On Monday, November 5 at 12:08 AM, quoth Halid Faith:
>I use qmail-1.05 and vpopmail.
>
>I use svc command to start or stop qmail's services.
>I can start qmail's smtp and pop3 services with svc.
>But I couldn't stop qmail-smtp service with svc. I don't get any error message.
>What's wrong with it?

You haven't given us much to work with. You may want to read this
page:
http://pyropus.ca/personal/writings/12-steps-to-qmail-list-bliss.html

~Kyle
--
You cannot reason a person out of a position he did not reason himself
into in the first place.
-- Jonathan Swift


jms1 at jms1

Nov 4, 2007, 7:58 PM

Post #3 of 7 (1009 views)
Permalink
Re: I have a problem about svc [In reply to]

On 2007-11-04, at 1708, Halid Faith wrote:
>
> I use svc command to start or stop qmail's services.
> I can start qmail's smtp and pop3 services with svc.
> But I couldn't stop qmail-smtp service with svc. I don't get any
> error message.
> What's wrong with it?

nothing.

when you run the "svc -d" command, all you're doing is sending a
SIGNAL to qmail-send, telling it to stop. qmail-send will continue to
run until all current deliveries are finished- it won't start any new
deliveries, but it will wait until all qmail-local and qmail-remote
processes are finished.

if you're really in a hurry and absolutely have to make it stop "right
now" for some reason, try "killall qmail-remote" after sending the
"svc -d" command, and wait a few seconds for qmail-send to recognize
those deliveries as "failed", and it will stop by itself.

DO NOT kill the qmail-send process unless there's something really
serious going on- serious meaning "the building is on fire". this is
an easy way to make qmail-send become very confused when it starts
back up. AT BEST you'll have messages delivered multiple times.

----------------------------------------------------------------
| John M. Simpson --- KG4ZOW --- Programmer At Large |
| http://www.jms1.net/ <jms1[at]jms1.net> |
----------------------------------------------------------------
| http://video.google.com/videoplay?docid=-1656880303867390173 |
----------------------------------------------------------------


maslak at ihlas

Nov 5, 2007, 12:13 PM

Post #4 of 7 (1000 views)
Permalink
Re: I have a problem about svc [In reply to]

However, the queue(/var/qmail/bin/qmail/qstat) is 0, svc is not able to
stop qmail-smtpd.

However I run "svc -d /var/qmail/supervise/qmail-smtpd" svc couldn't stop
it;

ps aux |grep tcp
vpopmail 67665 0.0 0.1 2444 1344 ?? I 10:04PM 0:00.00
/usr/local/bin/tcpserver -v -R -l 0 -x /var/qmail/vpopmail/etc/tcp

ee /var/qmail/supervise/qmail-smtp/run
#!/bin/sh
/usr/local/bin/tcpserver -v -R -l 0 -x
/var/qmail/vpopmail/etc/tcp.smtp.cdb -c 20 -u 89 -g 89 0 smtp
/var/qmail/bin/qmail-smtpd 2>&1

ee /var/qmail/supervise/qmail-smtp/log/run
#!/bin/sh
PATH=/var/qmail/bin:/usr/local/bin:/usr/bin:/bin
export PATH
exec setuidgid qmaill multilog t s1000000 n20 /var/log/qmail/qmail-smtpd
2>&1

ls -l /var/qmail/supervise
drwxr-xr-t 4 root qmail 512 Nov 4 14:34 qmail-pop3d
drwxr-xr-t 4 root qmail 512 Nov 4 14:34 qmail-send
drwxr-xr-t 4 root qmail 512 Nov 5 20:18 qmail-smtpd


ls -l /var/qmail/supervise/qmail-smtpd
drwxrwxrwx 3 root qmail 512 Nov 4 14:34 log
-rwxr-x--x 1 root qmail 705 Nov 5 20:23 run
drwxrwxrwx 2 root qmail 512 Nov 5 22:05 supervise

ls -l /var/qmail/supervise/qmail-smtpd/log
-rwxr-x--x 1 root qmail 149 Nov 4 23:06 run
drwxrwxrwx 2 root qmail 512 Nov 5 22:05 supervise

But I have no problem qmail-send and qmail-pop3d. svc can stop them.





----- Original Message -----
From: "John Simpson" <jms1[at]jms1.net>
To: <qmail[at]list.cr.yp.to>
Sent: Monday, November 05, 2007 5:58 AM
Subject: Re: I have a problem about svc


> On 2007-11-04, at 1708, Halid Faith wrote:
> >
> > I use svc command to start or stop qmail's services.
> > I can start qmail's smtp and pop3 services with svc.
> > But I couldn't stop qmail-smtp service with svc. I don't get any
> > error message.
> > What's wrong with it?
>
> nothing.
>
> when you run the "svc -d" command, all you're doing is sending a
> SIGNAL to qmail-send, telling it to stop. qmail-send will continue to
> run until all current deliveries are finished- it won't start any new
> deliveries, but it will wait until all qmail-local and qmail-remote
> processes are finished.
>
> if you're really in a hurry and absolutely have to make it stop "right
> now" for some reason, try "killall qmail-remote" after sending the
> "svc -d" command, and wait a few seconds for qmail-send to recognize
> those deliveries as "failed", and it will stop by itself.
>
> DO NOT kill the qmail-send process unless there's something really
> serious going on- serious meaning "the building is on fire". this is
> an easy way to make qmail-send become very confused when it starts
> back up. AT BEST you'll have messages delivered multiple times.
>
> ----------------------------------------------------------------
> | John M. Simpson --- KG4ZOW --- Programmer At Large |
> | http://www.jms1.net/ <jms1[at]jms1.net> |
> ----------------------------------------------------------------
> | http://video.google.com/videoplay?docid=-1656880303867390173 |
> ----------------------------------------------------------------
>
>
>
>


kyle-qmail at memoryhole

Nov 5, 2007, 12:31 PM

Post #5 of 7 (999 views)
Permalink
Re: I have a problem about svc [In reply to]

On Monday, November 5 at 10:13 PM, quoth Halid Faith:
> However, the queue(/var/qmail/bin/qmail/qstat) is 0, svc is not
> able to stop qmail-smtpd.
>
> However I run "svc -d /var/qmail/supervise/qmail-smtpd" svc
> couldn't stop it;

Hmmm...

> ps aux |grep tcp vpopmail 67665 0.0 0.1 2444 1344 ?? I
> 10:04PM 0:00.00 /usr/local/bin/tcpserver -v -R -l 0 -x
> /var/qmail/vpopmail/etc/tcp
>
> ee /var/qmail/supervise/qmail-smtp/run
> #!/bin/sh
> /usr/local/bin/tcpserver -v -R -l 0 -x
> /var/qmail/vpopmail/etc/tcp.smtp.cdb -c 20 -u 89 -g 89 0 smtp
> /var/qmail/bin/qmail-smtpd 2>&1

I'll assume that that's one long line in your run file, rather than
three separate lines (which would be bad).

Are you sure that that tcpserver instance was started by daemontools?
If you started it by hand, that would explain why daemontools refuses
to kill it. (You can test that by using `killall tcpserver` and then
`svc -u /var/qmail/supervise/qmail-smtpd`, and then trying to use svc
to bring it back down again.)

~Kyle
--
Democracy must be something more than two wolves and a sheep voting on
what to have for dinner.
-- James Bovard


josh at honorablemenschen

Nov 5, 2007, 1:08 PM

Post #6 of 7 (996 views)
Permalink
Re: I have a problem about svc [In reply to]

> ee /var/qmail/supervise/qmail-smtp/run
> #!/bin/sh
> /usr/local/bin/tcpserver -v -R -l 0 -x
> /var/qmail/vpopmail/etc/tcp.smtp.cdb -c 20 -u 89 -g 89 0 smtp
> /var/qmail/bin/qmail-smtpd 2>&1
>
> ee /var/qmail/supervise/qmail-smtp/log/run
> #!/bin/sh
> PATH=/var/qmail/bin:/usr/local/bin:/usr/bin:/bin
> export PATH
> exec setuidgid qmaill multilog t s1000000 n20 /var/log/qmail/qmail-smtpd
> 2>&1
>
Take a look at the 2 run files and you'll see the problem. You need to
exec tcpserver in your smtp run file so that it replaces the shell script.
svc is sending the signal to /bin/sh, not tcpserver, which is why it
isn't stopping properly. I got bit by this one many years ago, and have
since learned my lesson :)

Josh

Joshua Megerman
SJGames MIB #5273 - OGRE AI Testing Division
You can't win; You can't break even; You can't even quit the game.
- Layman's translation of the Laws of Thermodynamics
qmail[at]honorablemenschen.com


kyle-qmail at memoryhole

Nov 5, 2007, 1:40 PM

Post #7 of 7 (1004 views)
Permalink
Re: I have a problem about svc [In reply to]

On Monday, November 5 at 02:31 PM, quoth Kyle Wheeler:
> On Monday, November 5 at 10:13 PM, quoth Halid Faith:
>> However, the queue(/var/qmail/bin/qmail/qstat) is 0, svc is not able to
>> stop qmail-smtpd.
>>
>> However I run "svc -d /var/qmail/supervise/qmail-smtpd" svc couldn't stop
>> it;
>
> Hmmm...
>
>> ps aux |grep tcp vpopmail 67665 0.0 0.1 2444 1344 ?? I 10:04PM
>> 0:00.00 /usr/local/bin/tcpserver -v -R -l 0 -x /var/qmail/vpopmail/etc/tcp
>>
>> ee /var/qmail/supervise/qmail-smtp/run #!/bin/sh /usr/local/bin/tcpserver
>> -v -R -l 0 -x /var/qmail/vpopmail/etc/tcp.smtp.cdb -c 20 -u 89 -g 89 0 smtp
>> /var/qmail/bin/qmail-smtpd 2>&1

Ooop, Joshua saw it. You need to use exec in your run file. :)

~Kyle
--
I would rather have a mind opened by wonder than one closed by belief.
-- Gerry Spence

Qmail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.