AnsweredAssumed Answered

Mac Queue Pausing in Yosemite

Question asked by Rachel Peters on Mar 23, 2015
Latest reply on May 7, 2015 by Rachel Peters

Hi, all,

 

We've run into a really interesting problem lately and I would love any help anyone has with this issues. On our campus, we use a custom script to add our two print queues to some public access iMac stations in our library. Because the stations must allow guest access as well as the ability to print, we have a shortcut to our script that allows anyone using the station to add the queues tied to their username.

 

Lately, we've been seeing an issue in which suddenly the print queues on the iMacs will enter a paused state. They cannot be resumed manually, and will cause the paused state to persist even after the queues are removed, CUPS cleared, machines rebooted. This randomly happens to random machines, and somehow clears itself minutes to 24 hours later. Once the queue enters the paused state, jobs are no longer sent to the print server. We haven't managed to find any patterns in how this happens. It might be related to the 10.10.1 or 10.10.2 updates, but we're not sure, this is just assumption based off of the fact that OS X updates have broken things previously.

 

We've been working with Pharos support but haven't figured out a solution yet.

 

Here's the script:

try

try

  if printerName = "UCMGlobal" and printerName2 = "UCMColor" then

  do shell script "lpadmin -x UCMGlobal"

 

  do shell script "lpadmin -x UCMColor"

 

  do shell script "sudo chown -R root:wheel /Library/Printers"

 

  do shell script "sudo chown -R root:wheel /usr/libexec/cups"

 

  delay 1

  do shell script "sudo chmod -R 755 /Library/Printers"

 

  do shell script "sudo chmod -R 755 /usr/libexec/cups"

 

  end if

on error

  delay 1

end try

try

 

  set tuser to the text returned of (display dialog "Enter your UCMNet ID:" default answer "For Example: jdoe" default button 2 with title "UC Merced Campus Printer Utility")

  set pass to the text returned of (display dialog "Enter your Password:" default answer "" default button 2 with title "UC Merced Campus Printer Utility" with hidden answer)

 

  set tpass to do shell script "printf \"<?php echo rawurlencode('%s');?>\" " & quoted form of pass & " | php"

  set printerName to "UCMGlobal"

  set ServerName to "ucmprint.ucmerced.edu/ucmglobal?waitjob=false"

  set printerURI to "smb://" & tuser & ":" & tpass & "@" & ServerName

 

  set printerName2 to "UCMColor"

  set ServerName2 to "ucmprint.ucmerced.edu/ucmcolor?waitjob=false"

  set printerURI2 to "smb://" & tuser & ":" & tpass & "@" & ServerName2

 

  do shell script "lpadmin -p " & quoted form of printerName & " -v " & quoted form of printerURI & " -P /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/Resources/Generic.ppd -o printer-is-shared=false -E"

 

  do shell script "lpadmin -p " & quoted form of printerName2 & " -v " & quoted form of printerURI2 & " -P /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/Resources/Generic.ppd -o printer-is-shared=false -E"

 

  display dialog "UCMGlobal added successfully!" buttons {"Ok"} default button 1 with title "UC Merced Campus Printer Utility"

 

on error

  display dialog "Unable to configure UCMGlobal" buttons {"Ok"} default button 1 with title "UC Merced Campus Printer Utility"

end try

                   

Here's what the CUPS logs look like during a successfully sent job:

localhost - - [19/Mar/2015:09:22:13 -0700] "POST /printers/UCMGlobal HTTP/1.1" 200 1532 Create-Job successful-ok\

localhost - - [19/Mar/2015:09:22:13 -0700] "POST /printers/UCMGlobal HTTP/1.1" 200 647739 Send-Document successful-ok\

localhost - - [19/Mar/2015:09:22:18 -0700] "POST / HTTP/1.1" 200 313 Set-Job-Attributes successful-ok

 

And a failed job:

localhost - - [19/Mar/2015:10:31:02 -0700] "POST /printers/UCMColor HTTP/1.1" 200 4093 Create-Job successful-ok\

localhost - - [19/Mar/2015:10:31:02 -0700] "POST /printers/UCMColor HTTP/1.1" 200 222001 Send-Document successful-ok\

localhost - - [19/Mar/2015:10:31:02 -0700] "POST / HTTP/1.1" 200 347 Set-Job-Attributes successful-ok\

localhost - - [19/Mar/2015:10:31:05 -0700] "POST / HTTP/1.1" 200 221876 CUPS-Get-Document successful-ok

 

Pharos support suggested we switch from SMB to LPD. When we made that change, we encountered that the UserID for print jobs was being sent to our print server as "UserID:password". The jobs made it to the Pharos print queue successfully, but because of the password being attached to the UserID field, jobs couldn't be printed from our omegas as they weren't associated with the UserID.

 

I'm really scratching my head on this one. Thanks in advance for any input!

~Rachel

Outcomes