Skip to content

"Unable to connect" on slow restart (EL7) #249

@tequeter

Description

@tequeter

Given CentOS 7 with Puppet 6.12 and CUPS 1.6.3, and 20+ queues present.

When I apply the manifest

class { 'cups':
  service_ensure => 'running',
}
cups_queue { 'Office':
  ensure => 'printer',
}
include cups::workarounds::systemd_service_restart

In order to manage a CUPS queue.

Then I get the error message:

  Error: Could not prefetch cups_queue provider 'cups': IPP query 'ipptool -c ipp://localhost/ /dev/stdin' failed.
  EXITCODE: 1
  STDIN:
            {
              OPERATION CUPS-Get-Classes
              GROUP operation
              ATTR charset attributes-charset utf-8
              ATTR language attributes-natural-language en
              DISPLAY printer-name
              DISPLAY member-names
            }
  
  STDOUT:
  
  STDERR:
  ipptool: Unable to connect to localhost on port 631 - Transport endpoint is not connected
  Error: Failed to apply catalog: IPP query 'ipptool -c ipp://localhost/ /dev/stdin' failed.

In other words, issue #35 from last year was not really solved.

The workaround we added relies on cups.socket picking up connections until CUPS is ready, but the fix in bc45a96 just installs the systemd dropin without restarting the socket unit, so it does nothing. Also, the socket unit needs to be started before the service unit or it may fail to grab the socket.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions