Operating System - HP-UX
1820254 Members
2664 Online
109622 Solutions
New Discussion юеВ

Sendmail (daemon MTA: cannot bind: Address already in use)

 
frank_14
Occasional Advisor

Sendmail (daemon MTA: cannot bind: Address already in use)

I am getting these errors when booting the system, can anyone help
-----------------
Mar 14 12:02:26 tghcito1 sendmail[13093]: starting daemon (8.12.8): SMTP+queuein
g@00:30:00
Mar 14 12:02:26 tghcito1 sendmail[13093]: NOQUEUE: SYSERR(root): opendaemonsocke
t: daemon MTA: cannot bind: Address already in use
Mar 14 12:02:26 tghcito1 sendmail[13093]: daemon MTA: problem creating SMTP sock
et
Mar 14 12:03:16 tghcito1 sendmail[13093]: NOQUEUE: SYSERR(root): opendaemonsocke
t: daemon MTA: server SMTP socket wedged: exiting
Mar 14 12:03:16 tghcito1 sendmail[13093]: NOQUEUE: SYSERR(root): opendaemonsocke
t: daemon MTA: cannot bind: Address already in use
Mar 14 12:04:09 tghcito1 above message repeats 10 times
Mar 14 12:03:16 tghcito1 sendmail[13093]: daemon MTA: problem creating SMTP sock
et

I just update sendmail to the newest version,
and I have no problem with old version.
I tried to change options in sendmail.cf
O DaemonPortOptions=Port=578,
-->
O DaemonPortOptions=Port=smtp,
but it's no help.
Can someone give me a sample of sendmail.cf for HP-UX 11.0,
Thanks

 

 

P.S. This thread has been moved from HP-UX>System Administration to HP-UX > messaging. -HP Forum Moderator

14 REPLIES 14
T G Manikandan
Honored Contributor

Re: Sendmail (daemon MTA: cannot bind: Address already in use)

the port is already in use.

check the port 25.

Use lsof to check the process using 25.
Stop it and check it out.
Do check whether the sendmail is already running
Michael Tully
Honored Contributor

Re: Sendmail (daemon MTA: cannot bind: Address already in use)

you might already have more than one sendmail process running. Stop and restart sendmail.

# /sbin/init.d/sendmail stop
# ps -ef | grep sendmail | awk '{print $2}' | xargs kill -5
# /sbin/init.d/sendmail start
Anyone for a Mutiny ?
U.SivaKumar_2
Honored Contributor

Re: Sendmail (daemon MTA: cannot bind: Address already in use)

Hi,

Check whether any sendmail instance is already running.

#ps -ef | grep sendmail

Check whether the port 25 ( SMTP ) is already listening.

#netstat -an | grep LISTEN | grep 25


regards,

U.SivaKumar

Innovations are made when conventions are broken
frank_14
Occasional Advisor

Re: Sendmail (daemon MTA: cannot bind: Address already in use)

I'm sure sendmail is not already running.
and I did as you wrote again,but no change.
there is no port 25 used,I run netstat -a | grep smtp,I got the output,
# netstat -a | grep smtp
tcp 0 0 *.smtp *.* LISTEN
I found the same result on other server like this,but the sendmail can restart normally.
Are there some reasons with lan setting,I used two lan card with different ip in this server.
anything else for me,thanks
frank_14
Occasional Advisor

Re: Sendmail (daemon MTA: cannot bind: Address already in use)

I did this first,
# /sbin/init.d/sendmail stop
No sendmail server running

It's strange,I don't start sendmail,
but I found the message like below,
netstat -an | grep LISTEN | grep 25
tcp 0 0 *.25 *.* LISTEN
How can find PID and kill it.

thanks,
U.SivaKumar_2
Honored Contributor

Re: Sendmail (daemon MTA: cannot bind: Address already in use)

Clearly indicates some service is listening at port 25. get lsof tool and run find the service running at that port

regards,

U.SivaKumar
Innovations are made when conventions are broken
T G Manikandan
Honored Contributor

Re: Sendmail (daemon MTA: cannot bind: Address already in use)

I think you are running both IPv4 and IPv6 and this is conflicting in using the same port.

Just enabling IPv6 should be okay.

Just modify your sendmail.mc file to have some thing like

DAEMON_OPTIONS(`Port=smtp, Name=MTA, Family=inet6')

Thanks
Dusan Krasa
Advisor

Re: Sendmail (daemon MTA: cannot bind: Address already in use)

Donwload pro. lsof ( list open file ).

#lsof | grep TCP

Result will be, what daemon bound port 25.

Example:
... :smtp
David_246
Trusted Contributor

Re: Sendmail (daemon MTA: cannot bind: Address already in use)

am I reading it wrong ??

# SMTP daemon options
# The options are "option=value" pairs. The supported options are:

So shouldn't it be :
O DaemonPortOptions=578

At least the "," is not supposed as I can see throught the explanation.

Might be stuppid answers, but sometimes stuppid suggestions can help a lot :)

Regs David
@yourservice
frank_14
Occasional Advisor

Re: Sendmail (daemon MTA: cannot bind: Address already in use)

I am sorry I seldom came here in two days.
and thanks for any responses,good or bad.
I am tring now as your suggestions,I will report the result as fast as I can.
and I just check the sendmail.cf,there are
some options:

# SMTP daemon options
O DaemonPortOptions=Name=MTA
O DaemonPortOptions=Port=587, Name=MSA, M=E

# SMTP client options
O ClientPortOptions=Family=inet, Address=0.0.0.0

(I used the newest version)

frank_14
Occasional Advisor

Re: Sendmail (daemon MTA: cannot bind: Address already in use)

I found the files in my server,
/var/adm/sw/save/PHNE_17190/INETSVCS-RUN/sbin/init.d/sendmail
/var/adm/sw/save/PHNE_17190/INETSVCS-RUN/usr/sbin/sendmail

so I noticed smtp was started by inetd.
/sbin/init.d/inetd stop
then sendmail can start up.

I studied a lot from your responses.
thanks again.

Steven E. Protter
Exalted Contributor

Re: Sendmail (daemon MTA: cannot bind: Address already in use)

Notice to sendmailers.

If you are using sendmail.mc for macros and you change your network setup:

And you have the daemon setup to accept mail as follows:

DAEMON_OPTIONS(`Port=smtp,Addr=66.92.171.212, Name=MTA')

Note that if for some reason you change your network setup and the IP address stated above no longer exists on the local server.

The sendmail daemon will start run for a little while and generate the error message that started this call. This applies to HP-UX and Linux sendmail 8.11 and 8.12

The situation will not be intuitive and will be hard to diagnose.

The original owner of this call should have assigned points. If this call comes up in a search the documentation will be more complete.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jeff Schussele
Honored Contributor

Re: Sendmail (daemon MTA: cannot bind: Address already in use)

Hi frank,

Check the /etc/mail/sendmail.cf file for just *where* it's defining it's queue directory.
Default is /var/spool/mqueue - but will be wherever the file defines it.

Look for
O QueueDirectory=

IF that doesn't exist, that would explain the lead error msg.

My 2 cents,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Piotr Kierklo
Occasional Visitor

Re: Sendmail (daemon MTA: cannot bind: Address already in use)

I had this error messa, when (for some weird reasons) options in my sendmail.cf file were duplicated (so all of them appeared twice).

Cleaning duplicates and restarting sendmail, helped, no error anymore.

Piotr Kierklo, sysadmin