Add to Favourites Add to Favourites    Print this Article Print this Article

socket bind() to port 25 for address (any IPv6) failed: Address already in use: waiting 30s before trying again (5 more tries)

If exim won't start up, and you get the following message in your /var/log/exim/mainlog:

socket bind() to port 25 for address (any IPv6) failed: Address already in use: waiting 30s before trying again (5 more tries)

Type the following to see what is bound to port 25:

netstat -lnp | grep :25

The far right value of the output will likely show the name of the process that is bound to port 25, eg:

tcp        0      0 0.0.0.0:25            0.0.0.0:*                   LISTEN      24736/postfix
tcp        0      0 :::25                 :::*                        LISTEN      24736/postfix

in this example, it's postfix.  Since we want exim to be on 25, and not postfix, we'd need to stop it, eg:

/etc/init.d/postfix stop

or if that doesn't work, we can note the PID number, to the left of postfix, eg: 24736/postfix, so to kill it, use

kill -9 24736

where you'd replace 24736 with the PID number that shows up in the output.



Note, on FreeBSD, the command to view what bound to port 25 is:

sockstat -l | grep :25


Was this answer helpful?

Also Read