Re: Relating to Domains..

From: N. <visionary_at_gmail.com>
Date: Wed, 28 Sep 2011 14:11:19 -0400

I'm having a very weird problem trying to get that port 8891 "free". I
keep trying to kill processes, and more spawn. And its from the
opendkim user.

Actually, I didn't have this error before and opendkim was starting
fine. But it just wasn't logging or signing email.

Also, with this instruction Murray:

"2) Start strace watching the child process. Use "ps laxww" to figure
out which one was the child."

Could you link me to the text that discusses the "child"? I assume
this is opendkim "child" yes? I used ps laxww but I saw a lot of
things I wasn't familiar with. How do I identify the "child" in that
output? (what text will I see)? Also, do you happen to have a command
for strace handy that I should use to have it running in the
background? I really appreciate it.

Here is the output for me trying to "free up" port 8891 so I can start
opendkim again properly:

[root_at_private ~]# kill -9 25382
[root_at_private ~]# lsof -i:8891
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
opendkim 25387 opendkim 4u IPv4 618656357 TCP
private.server.com:ddi-tcp-4 (LISTEN)
[root_at_private ~]# kill -9 25387
[root_at_private ~]# lsof -i:8891
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
opendkim 25391 opendkim 4u IPv4 618656392 TCP
private.server.com:ddi-tcp-4 (LISTEN)
[root_at_private ~]# lsof -i:8891
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
opendkim 25391 opendkim 4u IPv4 618656392 TCP
private.server.com:ddi-tcp-4 (LISTEN)
[root_at_private ~]# lsof -i:8891
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
opendkim 25391 opendkim 4u IPv4 618656392 TCP
private.server.com:ddi-tcp-4 (LISTEN)
[root_at_private ~]# lsof -i:8891
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
opendkim 25391 opendkim 4u IPv4 618656392 TCP
private.server.com:ddi-tcp-4 (LISTEN)
[root_at_private ~]# kill -9 25391
[root_at_private ~]# lsof -i:8891
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
opendkim 25403 opendkim 4u IPv4 618656490 TCP
private.server.com:ddi-tcp-4 (LISTEN)
[root_at_private ~]#




On Mon, Sep 26, 2011 at 1:57 AM, Murray S. Kucherawy <msk_at_cloudmark.com> wrote:
>> -----Original Message-----
>> From: N. [mailto:visionary_at_gmail.com]
>> Sent: Sunday, September 25, 2011 10:55 AM
>> To: Steve Jenkins
>> Cc: Murray S. Kucherawy; opendkim-users_at_lists.opendkim.org
>> Subject: Re: Relating to Domains..
>>
>> Please see my previous message which had strace output. Also, while
>> debugging a php script problem, we found this error which I am not
>> sure of - and it also has to do with opendkim - its in maillog ... not
>> sure if this is related to what was in strace or not:
>>
>> opendkim[12555]: OpenDKIM Filter: Unable to bind to port
>> inet:8891_at_localhost: Address already in use
>> Sep 25 11:26:38 private opendkim[12555]: OpenDKIM Filter: Unable to
>> create listening socket on conn inet:8891_at_localhost
>> Sep 25 11:26:38 private opendkim[12555]: smfi_opensocket() failed
>
> This means opendkim failed to start because something else is listening on the same socket you told it to use.  That would certainly explain why postfix isn't able to communicate with it, unless what's already using port 8891 is another opendkim.  But if something else is on that port, I would expect postfix to complain that it's not able to communicate with the filter properly.
>
> The strace output you used showed the parent starting up, but not the child.  The parent exited, which is the end of your output.  You also had perl invoked as soon as opendkim's parent exited, which creates a race condition where you might send your test message before the child has fully started operation.
>
> I suggest the following steps:
>
> 1) Start opendkim.  Ensure it has logged the "starting" line and no errors before continuing.
> 2) Start strace watching the child process.  Use "ps laxww" to figure out which one was the child.
> 3) Start watching your mail log.
> 4) Send your test message.
> 5) When the logs show postfix is done processing the message, stop watching the logs, terminate strace, and send its output.
>
> -MSK
>
>
>
Received on Wed Sep 28 2011 - 18:11:33 PST

This archive was generated by hypermail 2.3.0 : Mon Oct 29 2012 - 23:20:20 PST