"lpstat" Hangs When CUPS is Disabled in RHEL

Solution Verified - Updated -

Issue

The command "lpstat -p" hangs. The output of strace on that command shows the following looping over and over:

sendto(4, "POST / HTTP/1.1\r\nContent-Length:"..., 134, 0, NULL, 0) = 134
sendto(4, "\1\1@\2\0\0\0\1\1G\0\22attributes-charset\0\5"..., 416, 0, NULL, 0) = 416
poll([{fd=4, events=POLLIN}], 1, 1000)  = 1 ([{fd=4, revents=POLLIN}])
recvfrom(4, "", 2048, 0, NULL, NULL)    = 0
close(4)                                = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 4
setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
connect(4, {sa_family=AF_INET, sin_port=htons(631), sin_addr=inet_addr("127.0.0.1")}, 16) = 0

After starting CUPS, the "lpstat -p" command returns "lpstat: No destinations added." as expected, since no printers are configured. However, we need to disable CUPS for security purposes.

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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content