- - PR -
daemontoolでqmail-send/logが起動出来ません。
投稿者 | 投稿内容 | ||||
---|---|---|---|---|---|
|
投稿日時: 2004-06-28 13:38
> ログにはなにか出力されていませんか?
/var/log/messagesには何も表示されませんでしたが # tail -f /var/qmail/supervise/qmail-send/log/main/current | tai64nlocal 2004-06-28 12:18:12.287321500 Starting qmail(-send). 2004-06-28 12:18:12.294114500 alert: cannot start: qmail-send is already running がずらっと表示されてます。この時 # svstat /var/service/* /var/service/*/log /var/service/qmail-pop3d: up (pid 28829) 8 seconds /var/service/qmail-send: up (pid 28866) 0 seconds /var/service/qmail-smtpd: up (pid 28832) 8 seconds /var/service/qmail-pop3d/log: up (pid 28837) 7 seconds /var/service/qmail-send/log: up (pid 28827) 8 seconds /var/service/qmail-smtpd/log: up (pid 28836) 8 seconds # ps ax | grep qmail 19027 ? S 0:00 supervise qmail 22206 ? S 0:04 [qmail-send] 22207 ? S 0:00 qmail-lspawn ./Maildir/ 22208 ? S 0:00 [qmail-rspawn] 22209 ? S 0:01 [qmail-clean] 28821 pts/2 S 0:00 supervise qmail-send 28828 pts/2 S 0:00 supervise qmail-pop3d 28829 pts/2 S 0:00 /usr/local/bin/tcpserver -x /etc/tcpserver/pop3d_rules.cdb 0 pop-3 /var/qmail/bin/qmail-popup rh9.dyndns.net /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir 28831 pts/2 S 0:00 supervise qmail-smtpd 28880 pts/2 Z 0:00 [qmail-send <defunct>] 28885 pts/2 R 0:00 grep qmail となっています。 > また、 > # ps -ax | grep qmail の結果はどうなっていますか? 停止させてpsの結果を見てみますと # /usr/local/bin/svc -dx /var/qmail/supervise/* /var/qmail/supervise/*/log ;mv /var/service/qmail-send /var/service/.qmail-send ;mv /var/service/qmail-smtpd /var/service/.qmail-smtpd ;mv /var/service/qmail-pop3d /var/service/.qmail-pop3d # svstat /var/service/* /var/service/*/log /var/service/*: unable to chdir: file does not exist /var/service/*/log: unable to chdir: file does not exist # ps ax | grep qmail 19027 ? S 0:00 supervise qmail 22206 ? S 0:04 [qmail-send] 22207 ? S 0:00 qmail-lspawn ./Maildir/ 22208 ? S 0:00 [qmail-rspawn] 22209 ? S 0:01 [qmail-clean] 29217 pts/2 S 0:00 grep qmail となっています。 > qmail-send, qmail-lspawn, qmail-rspawn, qmail-clean はサービスしていますか? 上記の状態です。 > svstatは、/var/qmail/supervise/qmail-send/superviseの情報を > 参照するはずだったと思うのでその辺りおかしなところはありませんか? #l s -l /var/qmail/supervise/*/supervise /var/qmail/supervise/qmail-pop3d/supervise: 合計 4 prw------- 1 root root 0 6月 28 12:39 control| -rw------- 1 root root 0 6月 24 20:37 lock prw------- 1 root root 0 6月 24 20:37 ok| -rw-r--r-- 1 root root 18 6月 28 12:39 status /var/qmail/supervise/qmail-send/supervise: 合計 4 prw------- 1 root root 0 6月 28 12:39 control| -rw------- 1 root root 0 6月 24 20:37 lock prw------- 1 root root 0 6月 24 20:37 ok| -rw-r--r-- 1 root root 18 6月 28 12:39 status /var/qmail/supervise/qmail-smtpd/supervise: 合計 4 prw------- 1 root root 0 6月 28 12:39 control| -rw------- 1 root root 0 6月 26 23:30 lock prw------- 1 root root 0 6月 26 23:30 ok| -rw-r--r-- 1 root root 18 6月 28 12:39 status となっています。 > もし不審な点があるなら > > # cd /var/service/qmail-send > # rm -f /var/service/qmail-send > # svc -dx . log > # rm -rf supervise > # ln -s /var/qmail/supervise/qmail-send /var/service > > とやってみてもいいかもしれません。 ありがとうございます。早速試してみましたら、 # cd /var/service/qmail-send # pwd /var/service/qmail-send # rm -f /var/service/qmail-send # svc -dx . log # ls log/ run* supervise/ # rm -rf supervise # ln -s /var/qmail/supervise/qmail-send /var/service # ls log/ run* supervise/ # ls -l /var/service 合計 0 lrwxrwxrwx 1 root root 32 6月 24 17:20 qmail-pop3d -> /var/qmail/supervise/qmail-pop3d/ lrwxrwxrwx 1 root root 31 6月 28 12:54 qmail-send -> /var/qmail/supervise/qmail-send/ lrwxrwxrwx 1 root root 32 6月 26 23:30 qmail-smtpd -> /var/qmail/supervise/qmail-smtpd/ # svstat /var/service/* /var/service/*/log /var/service/qmail-pop3d: up (pid 30372) 105 seconds /var/service/qmail-send: up (pid 30688) 0 seconds /var/service/qmail-smtpd: up (pid 30376) 105 seconds /var/service/qmail-pop3d/log: up (pid 30374) 105 seconds /var/service/qmail-send/log: up (pid 30522) 34 seconds /var/service/qmail-smtpd/log: up (pid 30384) 105 seconds # tail -f /var/qmail/supervise/qmail-send/log/main/current | tai64nlocal 2004-06-28 12:55:35.630386500 Starting qmail(-send). 2004-06-28 12:55:35.636912500 alert: cannot start: qmail-send is already running # ls -l /var/qmail/supervise/*/ /var/qmail/supervise/qmail-pop3d/: 合計 12 drwxr-xr-x 4 qmaill nofiles 4096 6月 24 20:37 log/ -rwxr--r-- 1 root root 286 6月 26 15:08 run* drwx------ 2 root root 4096 6月 28 12:53 supervise/ /var/qmail/supervise/qmail-send/: 合計 12 drwxr-xr-x 4 qmails qmail 4096 6月 27 13:48 log/ -rwxr--r-- 1 root root 181 6月 26 14:24 run* drwx------ 2 root root 4096 6月 28 12:56 supervise/ /var/qmail/supervise/qmail-smtpd/: 合計 12 drwxr-xr-x 5 qmaill nofiles 4096 6月 24 20:42 log/ -rwxr--r-- 1 root root 439 6月 24 17:31 run* drwx------ 2 root root 4096 6月 28 12:53 supervise/ # ls -l /var/qmail/supervise/*/log /var/qmail/supervise/qmail-pop3d/log: 合計 12 drwxr-xr-x 2 qmaill nofiles 4096 6月 24 20:37 main/ -rwxr--r-- 1 root root 120 6月 24 17:35 run* -rw------- 1 root root 0 6月 24 20:37 status drwx------ 2 root root 4096 6月 28 12:53 supervise/ /var/qmail/supervise/qmail-send/log: 合計 20 drwxr-xr-x 2 qmails qmail 4096 6月 28 12:17 main/ -rwxr--r-- 1 root root 147 6月 27 13:47 run* -rw-r--r-- 1 qmails qmail 146 6月 24 17:34 run.org -rw------- 1 qmails qmail 1001 6月 26 13:55 status drwx------ 2 root root 4096 6月 28 12:54 supervise/ /var/qmail/supervise/qmail-smtpd/log: 合計 20 drwxr-xr-x 2 qmaill nofiles 4096 6月 26 23:30 main/ -rwxr--r-- 1 root root 363 6月 7 22:28 run* -rw------- 1 qmaill root 1001 6月 28 12:53 status drwx------ 2 root root 4096 6月 28 12:53 supervise/ drwx------ 2 qmaill root 4096 6月 26 23:30 tcp/ # ls -l /var/qmail/supervise/*/supervise /var/qmail/supervise/qmail-pop3d/supervise: 合計 4 prw------- 1 root root 0 6月 28 12:39 control| -rw------- 1 root root 0 6月 24 20:37 lock prw------- 1 root root 0 6月 24 20:37 ok| -rw-r--r-- 1 root root 18 6月 28 12:53 status /var/qmail/supervise/qmail-send/supervise: 合計 4 prw------- 1 root root 0 6月 28 12:54 control| -rw------- 1 root root 0 6月 28 12:54 lock prw------- 1 root root 0 6月 28 12:54 ok| -rw-r--r-- 1 root root 18 6月 28 12:57 status /var/qmail/supervise/qmail-smtpd/supervise: 合計 4 prw------- 1 root root 0 6月 28 12:39 control| -rw------- 1 root root 0 6月 26 23:30 lock prw------- 1 root root 0 6月 26 23:30 ok| -rw-r--r-- 1 root root 18 6月 28 12:53 status # ls -l /var/qmail/supervise/*/log/main /var/qmail/supervise/qmail-pop3d/log/main: 合計 4 -rw-r--r-- 1 qmaill nofiles 1632 6月 28 12:53 current -rw------- 1 qmaill nofiles 0 6月 24 20:37 lock -rw-r--r-- 1 qmaill nofiles 0 6月 24 20:37 state /var/qmail/supervise/qmail-send/log/main: 合計 960 -rwxr--r-- 1 qmails qmail 98028 6月 28 10:29 @4000000040df7499328693f4.s* -rwxr--r-- 1 qmails qmail 98028 6月 28 10:43 @4000000040df77bc25f84c7c.s* -rwxr--r-- 1 qmails qmail 98028 6月 28 10:56 @4000000040df7ae00848819c.s* -rwxr--r-- 1 qmails qmail 98028 6月 28 11:09 @4000000040df7e0320a74a84.s* -rwxr--r-- 1 qmails qmail 98028 6月 28 11:23 @4000000040df812407527d24.s* -rwxr--r-- 1 qmails qmail 98028 6月 28 11:36 @4000000040df8447152ef74c.s* -rwxr--r-- 1 qmails qmail 98028 6月 28 11:50 @4000000040df876a32a2b714.s* -rwxr--r-- 1 qmails qmail 98028 6月 28 12:03 @4000000040df8a8d36ce058c.s* -rwxr--r-- 1 qmails qmail 98028 6月 28 12:17 @4000000040df8db70d2e793c.s* -rw-r--r-- 1 qmails qmail 55692 6月 28 12:57 current -rw------- 1 qmails qmail 0 6月 24 17:33 lock -rw-r--r-- 1 qmails qmail 0 6月 28 00:41 state /var/qmail/supervise/qmail-smtpd/log/main: 合計 4 -rw-r--r-- 1 qmaill nofiles 2591 6月 28 12:53 current -rw------- 1 qmaill nofiles 0 6月 26 23:30 lock -rw-r--r-- 1 qmaill nofiles 0 6月 26 23:30 state # ps ax | grep qmail 19027 ? S 0:00 supervise qmail 22206 ? S 0:04 [qmail-send] 22207 ? S 0:00 qmail-lspawn ./Maildir/ 22208 ? S 0:00 [qmail-rspawn] 22209 ? S 0:01 [qmail-clean] 30371 pts/2 S 0:00 supervise qmail-pop3d 30372 pts/2 S 0:00 /usr/local/bin/tcpserver -x /etc/tcpserver/pop3d_rules.cdb 0 pop-3 /var/qmail/bin/qmail-popup rh9.dyndns.net /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir 30375 pts/2 S 0:00 supervise qmail-smtpd 30518 pts/2 S 0:00 supervise qmail-send 11012 pts/2 Z 0:00 [qmail-send <defunct>] 11017 pts/2 S 0:00 grep qmail となりましたが、 相変わらずqmail-sendが起動できていません。 「alert: cannot start: qmail-send is already running」も出ています。 | ||||
|
投稿日時: 2004-06-28 14:35
構築していく中で
/var/service/qmail -> /var/qmail/supervise/qmail-send のような シンボリックリンクの形で起動させたことはありませんか? pid 19027 がその時に起動されたプロセス(supervise qmail)だと思います。 そこからqmail-sendプロセスが上がっているのですでに起動していると 言われているのだと思います。 シンボリックリンクだけ削除しませんでしたか? そしてやりたいことは、以前起動してしまったプロセスをkillしたいので # svc -d /var/service/* /var/service/*/log とした上で 1. supervise qmail プロセスをkill (qmail-sendをkillしてもこのプロセスが監視しているのでqmail-sendは再起動する) 2. qmail-send をkill 3. 1.と関連したsupervise log をkill 4. 3.のmultilogをkill その後に # svc -u /var/service/* /var/service/*/log とすればいいと思います。 1. に関連したsupervise log のプロセスは supervise qmail のpidと近いものだと思いますが必ずしも起動しているかは 分からないのでそこはご自分で判別されて下さい。 また、一番簡単なのは再起動です。 そうすればシンボリックリンクが張られているものだけ起動しますので。 [ メッセージ編集済み 編集者: anights 編集日時 2004-06-28 17:53 ] | ||||
|
投稿日時: 2004-07-02 14:51
遅くなりましてすいません。
> 構築していく中で > /var/service/qmail -> /var/qmail/supervise/qmail-send のような > シンボリックリンクの形で起動させたことはありませんか? 有ったかもしれません。 > pid 19027 がその時に起動されたプロセス(supervise qmail)だと思います。 > そこからqmail-sendプロセスが上がっているのですでに起動していると > 言われているのだと思います。 > シンボリックリンクだけ削除しませんでしたか? 多分、したような記憶があります。 > # svc -d /var/service/* /var/service/*/log とした上で > 1. supervise qmail プロセスをkill (qmail-sendをkillしてもこのプロセスが監視 > しているのでqmail-sendは再起動する) > 2. qmail-send をkill > 3. 1.と関連したsupervise log をkill > 4. 3.のmultilogをkill # ps ax | grep qmail 4706 ? S 0:00 readproctitle service errors: ...ary failure?supervise: fatal: unable to acquire log/supervise/lock: temporary failure?supervise: fatal: unable to acquire qmail-smtpd/supervise/lock: temporary failure?supervise: fatal: unable to acquire log/supervise/lock: temporary failure?supervise: fatal: 24571 pts/1 S 0:00 grep qmail となればいいんですね。 > また、一番簡単なのは再起動です。 > そうすればシンボリックリンクが張られているものだけ起動しますので。 ありがとうございます。結局リブートしちゃいました。漸く、正常な起動が出来ました。 今現在は # ps ax | grep qmail 4706 ? S 0:00 readproctitle service errors: ...ary failure?supervise: fatal: unable to acquire log/supervise/lock: temporary failure?supervise: fatal: unable to acquire qmail-smtpd/supervise/lock: temporary failure?supervise: fatal: unable to acquire log/supervise/lock: temporary failure?supervise: fatal: 4711 ? S 0:00 supervise qmail-pop3d 4712 ? S 0:00 /usr/local/bin/tcpserver -x /etc/tcpserver/pop3d_rules.cdb 0 pop-3 /var/qmail/bin/qmail-popup rh9.dyndns.net /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir 4715 ? S 0:00 supervise qmail-smtpd 4719 ? S 0:00 supervise qmail-send 4720 ? S 0:03 [qmail-send] 4725 ? S 0:00 qmail-lspawn ./Maildir/ 4726 ? S 0:00 [qmail-rspawn] 4727 ? S 0:00 [qmail-clean] となっています。これでいいんですね。パーミッション等しっかり憶えておきます。 どうも有り難うございました。 | ||||
|
投稿日時: 2004-07-02 15:18
これってqmail-smtpdが重複してsuperviseされているメッセージなんですが。。。 作業されて出たのならいいのですけど。 FAQ:supervise がエラーを出しつづける http://www.unixuser.org/~euske/doc/daemontools/myfaq/faq-3.html | ||||
|
投稿日時: 2004-07-03 15:25
> これってqmail-smtpdが重複してsuperviseされているメッセージなんですが。。。
> 作業されて出たのならいいのですけど。 > FAQ:supervise がエラーを出しつづける > http://www.unixuser.org/~euske/doc/daemontools/myfaq/faq-3.html ご指摘有難うございます。 # ps ax | grep qmail 4706 ? S 0:00 readproctitle service errors: ...ry failure?supervise: fatal: unable to acquire log/supervise/lock: temporary failure?supervise: fatal: unable to acquire qmail-pop3d/supervise/lock: temporary failure?supervise: fatal: unable to acquire log/supervise/lock: temporary failure?supervise: fatal: u 24577 ? S 0:00 supervise qmail-send 24578 ? S 0:00 [qmail-send] 24579 ? S 0:00 qmail-lspawn ./Maildir/ 24580 ? S 0:00 [qmail-rspawn] 24581 ? S 0:00 [qmail-clean] 24584 ? S 0:00 supervise qmail-pop3d 24585 ? S 0:00 /usr/local/bin/tcpserver -x /etc/tcpserver/pop3d_rules.cdb 0 pop-3 /var/qmail/bin/qmail-popup rh9.dyndns.net /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir 24588 ? S 0:00 supervise qmail-smtpd 11824 pts/1 S 0:00 grep qmail # svc -dx /var/qmail/supervise/* /var/qmail/supervise/*/log;mv /var/service/qmail-send /var/service/.qmail-send;mv /var/service/qmail-smtpd /var/service /.qmail-smtpd;mv /var/service/qmail-pop3d /var/service/.qmail-pop3d # ps ax | grep qmail 4706 ? S 0:00 readproctitle service errors: ...ry failure?supervise: fatal: unable to acquire log/supervise/lock: temporary failure?supervise: fatal: unable to acquire qmail-pop3d/supervise/lock: temporary failure?supervise: fatal: unable to acquire log/supervise/lock: temporary failure?supervise: fatal: u 17008 pts/1 S 0:00 grep qmail # kill 4706 # ps ax | grep qmail 17012 pts/1 S 0:00 grep qmail # mv /var/service/.qmail-send /var/service/qmail-send;mv /var/service/.qmail-smtpd /var/service/qmail-smtpd;mv /var/service/.qmail-pop3d /var/service/qmail-pop3d;/bin/ sleep 5s;/usr/local/bin/svstat /var/service/* /var/service/*/log /var/service/qmail-pop3d: up (pid 17019) 3 seconds /var/service/qmail-send: up (pid 17036) 2 seconds /var/service/qmail-smtpd: up (pid 17023) 3 seconds /var/service/qmail-pop3d/log: up (pid 17021) 3 seconds /var/service/qmail-send/log: up (pid 17034) 2 seconds /var/service/qmail-smtpd/log: up (pid 17026) 2 seconds # ps ax | grep qmail 17018 ? S 0:00 supervise qmail-pop3d 17019 ? S 0:00 /usr/local/bin/tcpserver -x /etc/tcpserver/pop3d_rules.cdb 0 pop-3 /var/qmail/bin/qmail-popup rh9.dyndns.net /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir 17022 ? S 0:00 supervise qmail-smtpd 17027 ? S 0:00 supervise qmail-send 17036 ? S 0:00 [qmail-send] 17037 ? S 0:00 qmail-lspawn ./Maildir/ 17038 ? S 0:00 [qmail-rspawn] 17039 ? S 0:00 [qmail-clean] 17050 pts/1 S 0:00 grep qmail となりました。これでいいんですね。 | ||||
|
投稿日時: 2004-07-03 20:20
これってreadproctitleのプロセスkillしただけですね。 ただqmail-pop3d とかもでたようなので作業中に出たのかもしれませんね。 再起動して出てなければ問題ないと思います。 | ||||
|
投稿日時: 2004-07-10 16:39
大変お世話様です。m(_ _)m
> これってreadproctitleのプロセスkillしただけですね。 > ただqmail-pop3d とかもでたようなので作業中に出たのかもしれませんね。 > 再起動して出てなければ問題ないと思います。 有難うございます。 別マシン(rh9.dyndns.co.jp)でも同様の設定して運用しています。 [root@rh9.dyndns.co.jp]# head .qmail-* | grep -v ^# ==> .qmail-default <== &user33 ==> .qmail-mailer-daemon <== &user33 ==> .qmail-postmaster <== &user33 ==> .qmail-root <== &user33 [root@rh9.dyndns.co.jp]# cat /home/user33/.qmail | grep -v ^# &hoge@bb.isp.co.jp [root@rh9.dyndns.net]# head .qmail-* | grep -v ^# ==> .qmail-default <== &user33 ==> .qmail-mailer-daemon <== &user33 ==> .qmail-postmaster <== &user33 ==> .qmail-root <== &user33 [root@rh9.dyndns.net]# cat /home/user33/.qmail | grep -v ^# &hoge@bb.isp.co.jp 別マシン(rh9.dyndns.co.jp)ではリブートしても常に [root@rh9.dyndns.co.jp]# ps ax | grep qmail 3020 ? S 0:00 supervise qmail-pop3d 3022 ? S 0:00 supervise qmail-send 3024 ? S 0:00 supervise qmail-smtpd 3028 ? R 0:00 [qmail-send] 3029 ? S 0:00 /usr/local/bin/tcpserver -x /etc/tcpserver/pop3d_rules.cdb 0 pop-3 /var/qmail/bin/qmail-popup rh9.dyndns.co.jp /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir 3034 ? S 0:00 qmail-lspawn ./Maildir/ 3035 ? S 0:00 [qmail-rspawn] 3036 ? S 0:00 [qmail-clean] 14838 ? S 0:00 bin/qmail-inject -a -- user33 14839 ? S 0:00 [qmail-queue] 21780 pts/2 S 0:00 grep qmail [root@rh9.dyndns.co.jp]# svstat /var/service/* /var/service/*/log /var/service/qmail-pop3d: up (pid 3029) 116109 seconds /var/service/qmail-send: up (pid 3028) 116109 seconds /var/service/qmail-smtpd: up (pid 3031) 116109 seconds /var/service/qmail-pop3d/log: up (pid 3030) 116109 seconds /var/service/qmail-send/log: up (pid 3027) 116109 seconds /var/service/qmail-smtpd/log: up (pid 3026) 116109 seconds という風にプロセスが 14838 ? S 0:00 bin/qmail-inject -a -- user33 14839 ? S 0:00 [qmail-queue] の2つ分多いのです(rh9.dyndns.netでは無い)。 これは何の違いなんでしょうか??? | ||||
|
投稿日時: 2004-07-10 19:54
えーと、なにかメール送っているだけのようですが。。。 qmail-inject http://www.big.or.jp/~mio/ca/qm/ref/qm_ref_qmail-inject_8.html sendmailを置き換えたかどうかは分かりませんが cronかanacronあたりで何か処理のしているのではないでしょうか? もしキューにメールがたまっているようならば qmHandleあたりを入れると管理が便利かもしれません。 |