[cups] lpstat command hangs

Peter Klosky peterklosky at yahoo.com
Tue Dec 23 10:11:09 PST 2014


 
 Hello CUPS Help Mailing List People,
We are trying to run CUPS 1.7.5 on HP-UX Itanium and are having difficulty.  While the cupsd process does start and provide a web page, the lpstat command hangs from the user command line when used with certain options, but hangs with other options.  Below, I'll show what does work, and what does not, as well as cupsd.conf, printers.conf. 
Aside from lpstat not working, we are not able to print anything, with the exception of a printer self-test page, which cups is able to request.
Please advise best course of action.
Thank you,
Peter KloskyFairfax, Virginia, USA
Problem scenario log below.  User command was "lpstat -p", and the result is that cupsd accepts the connection, gets a request from the client, writes to the lpstat client, then hangs, waiting for a response from the client.  The client never responds.
D [23/Dec/2014:12:20:56 +0500] [Client 14] Accepted from localhost (Domain)
D [23/Dec/2014:12:20:56 +0500] [Client 14] Waiting for request.
D [23/Dec/2014:12:20:56 +0500] [Client 14] POST / HTTP/1.1
D [23/Dec/2014:12:20:56 +0500] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [23/Dec/2014:12:20:56 +0500] [Client 14] No authentication data provided.
D [23/Dec/2014:12:20:56 +0500] [Client 14] 2.0 CUPS-Get-Printers 1
D [23/Dec/2014:12:20:56 +0500] CUPS-Get-Printers
D [23/Dec/2014:12:20:56 +0500] [Client 14] Returning IPP successful-ok for CUPS-Get-Printers (no URI) from localhost
D [23/Dec/2014:12:20:56 +0500] [Client 14] Content-Length: 1263
D [23/Dec/2014:12:20:56 +0500] [Client 14] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGT
H, data_remaining=1263, response=402f2180(IPP_IDLE), pipe_pid=0, file=-1
D [23/Dec/2014:12:20:56 +0500] [Client 14] Writing IPP response, ipp_state=DATA, old wused=0, new wused=0
D [23/Dec/2014:12:20:56 +0500] [Client 14] bytes=0, http_state=0, data_remaining=0
D [23/Dec/2014:12:20:56 +0500] [Client 14] Waiting for request.
D [23/Dec/2014:12:20:56 +0500] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
Scenarios that work are shown below, first the commands, then the associated log.  The lpstat client creates EOF conditions, as expected.  This all seems correct.
# ./lpstat -r
scheduler is running
# ./lpstat -d
system default destination: kyocera
# ./lpstat -l
#
D [23/Dec/2014:12:18:26 +0500] cupsdSetBusyState: newbusy="Not busy", busy="Not busy"
D [23/Dec/2014:12:20:18 +0500] [Client 14] Accepted from localhost (Domain)
D [23/Dec/2014:12:20:18 +0500] [Client 14] Waiting for request.
D [23/Dec/2014:12:20:18 +0500] Report: clients=1
D [23/Dec/2014:12:20:18 +0500] Report: jobs=3
D [23/Dec/2014:12:20:18 +0500] Report: jobs-active=0
D [23/Dec/2014:12:20:18 +0500] Report: printers=1
D [23/Dec/2014:12:20:18 +0500] Report: stringpool-string-count=24019
D [23/Dec/2014:12:20:18 +0500] Report: stringpool-alloc-bytes=11448
D [23/Dec/2014:12:20:18 +0500] Report: stringpool-total-bytes=440792
D [23/Dec/2014:12:20:18 +0500] [Client 14] HTTP_STATE_WAITING Closing on EOF
D [23/Dec/2014:12:20:18 +0500] [Client 14] Closing connection.
D [23/Dec/2014:12:20:18 +0500] cupsdSetBusyState: newbusy="Not busy", busy="Not busy"
D [23/Dec/2014:12:20:22 +0500] [Client 14] Accepted from localhost (Domain)
D [23/Dec/2014:12:20:22 +0500] [Client 14] Waiting for request.
D [23/Dec/2014:12:20:22 +0500] [Client 14] POST / HTTP/1.1
D [23/Dec/2014:12:20:22 +0500] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [23/Dec/2014:12:20:22 +0500] [Client 14] No authentication data provided.
D [23/Dec/2014:12:20:22 +0500] [Client 14] 2.0 CUPS-Get-Default 1
D [23/Dec/2014:12:20:22 +0500] CUPS-Get-Default
D [23/Dec/2014:12:20:22 +0500] [Client 14] Returning IPP successful-ok for CUPS-Get-Default (no URI) from localhost
D [23/Dec/2014:12:20:22 +0500] [Client 14] Content-Length: 1263
D [23/Dec/2014:12:20:22 +0500] [Client 14] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=1263, response=402f2780(IPP_IDLE), pipe_pid=0, file=-1
D [23/Dec/2014:12:20:22 +0500] [Client 14] Writing IPP response, ipp_state=DATA, old wused=0, new wused=0
D [23/Dec/2014:12:20:22 +0500] [Client 14] bytes=0, http_state=0, data_remaining=0
D [23/Dec/2014:12:20:22 +0500] [Client 14] Waiting for request.
D [23/Dec/2014:12:20:22 +0500] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
D [23/Dec/2014:12:20:22 +0500] [Client 14] HTTP_STATE_WAITING Closing on EOF
D [23/Dec/2014:12:20:22 +0500] [Client 14] Closing connection.
D [23/Dec/2014:12:20:22 +0500] cupsdSetBusyState: newbusy="Not busy", busy="Not busy"
D [23/Dec/2014:12:20:28 +0500] [Client 14] Accepted from localhost (Domain)
D [23/Dec/2014:12:20:28 +0500] [Client 14] Waiting for request.
D [23/Dec/2014:12:20:28 +0500] [Client 14] POST / HTTP/1.1
D [23/Dec/2014:12:20:28 +0500] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [23/Dec/2014:12:20:28 +0500] [Client 14] No authentication data provided.
D [23/Dec/2014:12:20:28 +0500] [Client 14] 2.0 Get-Jobs 1
D [23/Dec/2014:12:20:28 +0500] Get-Jobs ipp://localhost/
D [23/Dec/2014:12:20:28 +0500] [Client 14] Returning IPP successful-ok for Get-Jobs (ipp://localhost/) from localhost
D [23/Dec/2014:12:20:28 +0500] [Client 14] Content-Length: 75
D [23/Dec/2014:12:20:28 +0500] [Client 14] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=75, response=402f1b40(IPP_IDLE), pipe_pid=0, file=-1
D [23/Dec/2014:12:20:28 +0500] [Client 14] Writing IPP response, ipp_state=DATA, old wused=0, new wused=0
D [23/Dec/2014:12:20:28 +0500] [Client 14] bytes=0, http_state=0, data_remaining=0
D [23/Dec/2014:12:20:28 +0500] [Client 14] Waiting for request.
D [23/Dec/2014:12:20:28 +0500] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
D [23/Dec/2014:12:20:28 +0500] [Client 14] HTTP_STATE_WAITING Closing on EOF
D [23/Dec/2014:12:20:28 +0500] [Client 14] Closing connection.
D [23/Dec/2014:12:20:28 +0500] cupsdSetBusyState: newbusy="Not busy", busy="Not busy"
Configuration:
# head -10000 printers.conf cupsd.conf
==> printers.conf <==
# Printer configuration file for CUPS v1.7.5
# Written by cupsd on 2014-12-23 12:05
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
<DefaultPrinter kyocera>
UUID urn:uuid:4955d218-079d-30c7-574a-9fb95c9603f6
Info pitt-printer
Location Pittsburgh
DeviceURI socket://192.168.23.90:9100
State Idle
StateTime 1419349354
Type 8433756
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
Attribute marker-colors none,none
Attribute marker-levels 6,-1
Attribute marker-names TK-717,Waste Toner Box
Attribute marker-types toner,waste-toner
Attribute marker-change-time 1419349354
</Printer>==> cupsd.conf <==
#
# "$Id: cupsd.conf.in 11025 2013-06-07 01:00:33Z msweet $"
#
# Sample configuration file for the CUPS scheduler.  See "man cupsd.conf" for a
# complete description of this file.
#
# Local mods made by Peter Klosky per Bill Erdely request 2014.# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
#LogLevel warn
LogLevel debug# Only listen for connections from the local machine.
Listen localhost:631
Listen dmldev4.dmlogic.info:631
Listen /usr/local/var/run/cups/cups.sock# Show shared printers on the local network.
Browsing On
BrowseLocalProtocols# Default authentication type, when authentication is required...
#DefaultAuthType Basic
DefaultAuthType None# Web interface setting...
WebInterface Yes# Restrict access to the server...
<Location />
  Order allow,deny
  Allow From All
</Location># Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
  Allow From All
</Location>#AuthType Default
#Require user @SYSTEM
#Order allow,deny# Restrict access to configuration files...
<Location /admin/conf>
  Order allow,deny
  Allow From All
</Location># Set the default printer/job policies...
<Policy default>
  # Job/subscription privacy...
  JobPrivateAccess default
  JobPrivateValues default
  SubscriptionPrivateAccess default
  SubscriptionPrivateValues default  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    Order allow,deny
    Allow From All
  </Limit>  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
    Order allow,deny
    Allow From All
  </Limit>  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType None
    Order allow,deny
    Allow From All
  </Limit>  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType None
    Order allow,deny
    Allow From All
  </Limit>  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType None
    Order allow,deny
    Allow From All
  </Limit>  <Limit All>
    AuthType None
    Order allow,deny
    Allow From All
  </Limit>
</Policy># Set the authenticated printer/job policies...
<Policy authenticated>
  # Job/subscription privacy...
  JobPrivateAccess default
  JobPrivateValues default
  SubscriptionPrivateAccess default
  SubscriptionPrivateValues default  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    AuthType Default
    Order deny,allow
  </Limit>  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>  <Limit All>
    Order deny,allow
  </Limit>
</Policy>#
# End of "$Id: cupsd.conf.in 11025 2013-06-07 01:00:33Z msweet $".
#
#





  


More information about the cups mailing list