Running "lp*" commands in RHEL results in "Connection refused," "Transport endpoint not connected," or "Bad file descriptor"
Issue
-
Running the
lpadmincommand to try and add a printer results in the following:# lpadmin -h localhost -p laser -v lpd://10.1.2.3/xerox_printer lpadmin: Unable to connect to server: Connection refused -
In RHEL 8, Running
lpadminto list the printers on a remote CUPS server results in the following:$ lpstat -h rhel810-master -a lpstat: Bad file descriptorThis also occurs if "
ServerName rhel810-master" is added to/etc/cups/client.confor the environment variableSERVER_NAMEis set torhel810-master. -
Running
lpinforesults in the error "Transport endpoint is not connected":[root@lnx001 ~]# lpinfo -m lpinfo: Transport endpoint is not connected -
Running any CUPS command (
lpadmin,lpstat,lp) results in "Connection refused"
Environment
- Red Hat Enterprise Linux (RHEL), all versions
- Common Unix Printing System (CUPS), all versions
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.