Bug 227888 - random port selection for daemons causes other daemons to fail
Summary: random port selection for daemons causes other daemons to fail
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 11.1-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2018-05-01 08:55 UTC by Martin Birgmeier
Modified: 2018-05-02 00:21 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2018-05-01 08:55:31 UTC
The issue described here has caused problems for me for a long time.

Scenario:
- Small home server running lots of services: amd, apache24, ataidle, cupsd, dbus, delegate, dhcpd, dhcpd6, firewall, gateway, hald, hylafax, inetd, ipv6_gateway, kdm4, moused, mpd, mysql, named, nfs_client, nfs_server, nis_client, nis_server, nis_yppasswdd, ntpd, openvpn, postgresql, powerd, rpc_lockd, rpc_statd, rpcbind, rtadvd, rtsold, rwhod, samba_server, sendmail, squid, sshd, syslogd, winbindd, zfs

Result:
- Rather often (estimated 10% of all reboots) one of the daemons using random port numbers chooses one which is later on required by another daemon which needs a well-known port number to operate
- Example today: mountd listens on port 631 which is required by cups, therefore cups does not work
- Example from a few days ago: ypbind listens on 873 which is required by inetd configured to spawn rsync

Expected result:
- Ports should be chosen so as not to cause conflicts

Proposed mitigation measure: Revert to using well-known port numbers for standard system daemons like it was done ages ago.

-- Martin