Unable to reserve port: Permission denied

Kurt Pfeifle kpfeifle at danka.de
Fri Mar 30 01:47:07 PDT 2007


> Hi,
>
> I used to be able to print via CUPS previously but recently after a recent automatic update by yum-updatesd, I cannot print anymore. Instead, when I look into the file /var/log/cups/error_log, I get the error message:
> Unable to reserve port: Permission denied. I try to delete and define the printer again but still it could not print.
>
> My printer is connected via parallet port to an SMC Barricade Broadband router which also acts as a LPD print server. I have another PC running windows and I have no problem problem printing to the printer from that PC via the same SMC Barricade router. There has been no change in any hardware or network settings.
>
> I am using Fedora Core 6 kernel 2.6.20-1.2933.
>
> The various CUPS RPM installed are:
> libgnomecups-0.2.2-8
> cups-1.2.7-1.8.fc6
> hal-cups-utils-0.6.5-1.fc6
> cups-libs-1.2.7-1.8.fc6
>
> Please help. Thanks.


This is not a CUPS bug.

Some other process is stealing port 631 (unless you configured CUPS to use a non-standard port) before cupsd can get it. 631 is a "well-known" port, reserved by IANA for IPP (Internet Printing Protocol).

To find out which process that is, try this command:

    lsof -i :631 | egrep -i '(UDP|LISTEN)'

The "name service caching daemon" nscd is known to sometimes behave like that on some systems.

A potential fix would be to change the order the daemons are started up on your system to make sure cupsd can get its port before any other service occupies it.

A quick'n' dirty workaround could be to give CUPS a different port (like 10631) on your local system; but this is only adviceable if your system is self-containing as far as printing is concerned (if it does not share out its printer to other workstations, and if it does not use an external print server ["printer browsing"] -- otherwise you'd have to change these systems as well).




More information about the cups-devel mailing list