Portmapper using incorrect ports - how to prevent?
After suffering a power outage, I noticed spamassassin wouldn't start. I'd get: # /etc/init.d/spamassassin restart Restarting SpamAssassin Mail Filter Daemon: No spamd found running; none killed. Could not create INET socket: Address already in use IO::Socket::INET: Address already in use After a bit of checking my configuration, and googling for spamassassin problems, I tried: # lsof -i :783 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME ypserv 1025 root 5u IPv4 2855 TCP *:spamd (LISTEN) Apparently ypserv grabbed the spamassassin tcp port 783 before spamd started. I fixed the problem by re-arranging the startup sequences in /etc/rc5.d and restarting everything: # lsof -i | egrep "(ypserv|spamd)" spamd 10626 spamd 5u IPv4 44885 TCP localhost:spamd (LISTEN) ypserv 10641 root 4u IPv4 45184 UDP *:643 ypserv 10641 root 5u IPv4 45244 TCP *:646 (LISTEN) I'm wondering if there's a better fix? Is there a way to restrict which ports are used by portmapper? Should I simply change portmap and dependent services to start later/last in the init sequence? - Bob
participants (1)
-
Bob George