Re: [SLUG] Who / what is using port 25?

From: Kwan Lowe (kwan@digitalhermit.com)
Date: Mon Dec 22 2003 - 10:39:59 EST


> I am having trouble starting postfix. It claims something else is using port
> 25 and nmap agrees. Netstat | grep 25 is inconclusive as is netstat | grep
> smtp.

Try:
   fuser -n tcp 25

This will list the PID that's binding to the port.

>
> /var/log/maillog shows:
> Dec 21 23:03:06 genesis postfix/postfix-script: starting the Postfix mail
> system
> Dec 21 23:03:06 genesis postfix/master[6154]: fatal: bind 127.0.0.1 port 25:
> Address already in use
>
> It's not another copy of Postfix that has 25 locked up or it would not error
> out when I try to stop it:
>
> [root@genesis log]# postfix stop
> postfix/postfix-script: fatal: the Postfix mail system is not
>
> [root@genesis log]# netstat | grep postfix (no results)
> [root@genesis log]# netstat | grep smtp (no results)
> [root@genesis log]# netstat | grep smtpd (no results)
> [root@genesis log]# netstat | grep 25

Try running:
   netstat -tlnw

Check if port 25 is listed
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN

A couple other possibilities include:
 There's an old PID/Lockfile some in /var/run that exists. Postfix may be
seeing the lock file and assuming that it has already started, even if the
original process is dead. This could also cause it not to stop because it may
look at the PIDfile to determine which process to stop.

Sendmail is running....

-- 
* The Digital Hermit   http://www.digitalhermit.com
* Unix and Linux Solutions   kwan@digitalhermit.com
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:55:04 EDT