Unable to reserve port: Permission denied
Kurt Pfeifle
kpfeifle at danka.de
Sun Apr 1 03:22:26 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).
>
>
> Thanks for replying. However, when I execute the command to see which process is using port 631, it shows that cups is using it, as shown below:
>
> [root at prosper ~]# ps -ef | grep nscd
> root 4044 4019 0 07:33 pts/1 00:00:00 grep nscd
> [root at prosper ~]# lsof -i :631 | egrep -i '(UDP|LISTEN)'
> cupsd 2712 root 3u IPv4 9725 TCP localhost.localdomain:ipp (LISTEN)
> cupsd 2712 root 4u IPv6 9726 TCP prosper:ipp (LISTEN)
> cupsd 2712 root 6u IPv4 9729 UDP *:ipp
OK, then here comes my next guess: your cupsd.conf contains multiple statements which ask cupsd to bind to port 631. Once the first one succeeds, the next one fails, causing you the troube you are experiencing.
What is the result of these commands:
egrep '(Listen|Port)' /etc/cups/cupsd.conf
egrep '(127.0.0.1|localhost|prosper)' /etc/hosts
??
More information about the cups
mailing list