LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-27-2009, 09:14 PM   #1
adrianmariano
Member
 
Registered: Dec 2004
Distribution: Ubuntu Yakkety
Posts: 193

Rep: Reputation: 15
Can't print to shared printer after suspend to ram


I have a machine with CUPS 1.3.10-2 installed that acts as a print server. It seems that a recent upgrade on the server (of CUPS?) has created a situation where I can print to the shared printer from the client machine just after rebooting the client. But if I suspend the client to RAM (/usr/sbin/s2ram) then printing doesn't work at all after I wake it up.

I upgraded the client to the same CUPS version. When I print after suspending I get the following in /var/log/cups/error_log:

Code:
E [27/Jun/2009:21:46:35 -0400] [Job 145] recoverable: Unable to connect to printer; will retry in 30 seconds...
This is repeated a lot and the jobs remain in the queue as shown by "lpq" when run on the client. The cupsd.conf on the client is the default on installed by debian, which I list below.

I restarted cups after switching LogLevel to "debug" and got the following messages about failure to connect to printers:

Code:
D [27/Jun/2009:22:02:55 -0400] process_browse_data: photo@alpaca.local not found...
D [27/Jun/2009:22:02:56 -0400] process_browse_data: photo4x6@alpaca.local not found...
D [27/Jun/2009:22:02:58 -0400] process_browse_data: lp300@alpaca.local not found...
D [27/Jun/2009:22:02:59 -0400] [Job 145] Connection error: No such file or directory
E [27/Jun/2009:22:02:59 -0400] [Job 145] recoverable: Unable to connect to printer; will retry in 30 seconds...
D [27/Jun/2009:22:02:59 -0400] Discarding unused printer-state-changed event...
D [27/Jun/2009:22:02:59 -0400] Discarding unused job-progress event...
D [27/Jun/2009:22:03:05 -0400] process_browse_data: lp300@alpaca.local not found...
D [27/Jun/2009:22:03:05 -0400] Discarding unused printer-deleted event...
D [27/Jun/2009:22:03:05 -0400] Discarding unused job-stopped event...
W [27/Jun/2009:22:03:05 -0400] [Job 145] Printer/class lp300 has gone away; canceling job!
D [27/Jun/2009:22:03:05 -0400] Discarding unused job-completed event...
D [27/Jun/2009:22:03:05 -0400] Discarding unused job-completed event...
W [27/Jun/2009:22:03:05 -0400] [Job 146] Printer/class lp300 has gone away; canceling job!
D [27/Jun/2009:22:03:05 -0400] Discarding unused job-completed event...
D [27/Jun/2009:22:03:05 -0400] Discarding unused job-completed event...
W [27/Jun/2009:22:03:05 -0400] [Job 147] Printer/class lp300 has gone away; canceling job!
D [27/Jun/2009:22:03:05 -0400] Discarding unused job-completed event...
D [27/Jun/2009:22:03:05 -0400] Discarding unused job-completed event...
E [27/Jun/2009:22:03:05 -0400] PID 4294 (/usr/lib/cups/backend/ipp) stopped with status 1!
D [27/Jun/2009:22:03:05 -0400] process_browse_data: lp600@alpaca.local not found...
D [27/Jun/2009:22:03:05 -0400] Discarding unused printer-deleted event...
D [27/Jun/2009:22:03:05 -0400] process_browse_data: photo@alpaca.local not found...
D [27/Jun/2009:22:03:05 -0400] Discarding unused printer-deleted event...
D [27/Jun/2009:22:03:05 -0400] process_browse_data: photo4x6@alpaca.local not found...
D [27/Jun/2009:22:03:05 -0400] Discarding unused printer-deleted event...
D [27/Jun/2009:22:03:07 -0400] process_browse_data: lp300@alpaca.local not found...
D [27/Jun/2009:22:03:07 -0400] Added remote printer "lp300"...
D [27/Jun/2009:22:03:07 -0400] Discarding unused printer-added event...
D [27/Jun/2009:22:03:08 -0400] process_browse_data: lp600@alpaca.local not found...
D [27/Jun/2009:22:03:08 -0400] Added remote printer "lp600"...
D [27/Jun/2009:22:03:08 -0400] Discarding unused printer-added event...
D [27/Jun/2009:22:03:09 -0400] process_browse_data: photo@alpaca.local not found...
D [27/Jun/2009:22:03:09 -0400] Added remote printer "photo"...
D [27/Jun/2009:22:03:09 -0400] Discarding unused printer-added event...
D [27/Jun/2009:22:03:10 -0400] process_browse_data: photo4x6@alpaca.local not found...
D [27/Jun/2009:22:03:10 -0400] Added remote printer "photo4x6"...
D [27/Jun/2009:22:03:10 -0400] Discarding unused printer-added event...
D [27/Jun/2009:22:03:38 -0400] process_browse_data: lp300@alpaca.local not found...
These "process_browse_data: <printer> not found" messages continue to repeat. I tried printing with debug on and saw this on the client (and no messages on the server):

Code:
D [27/Jun/2009:22:12:06 -0400] [Job 148] Connection error: No such file or directory
E [27/Jun/2009:22:12:06 -0400] [Job 148] recoverable: Unable to connect to printer; will retry in 30 seconds...
Can anybody tell me what could be going on or how I might fix this?


This is the cupsd.conf from the client:
Code:
LogLevel warning

# Administrator user group...
SystemGroup lpadmin


# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Restrict access to the server...
<Location />
  Order allow,deny
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Encryption Required
  Order allow,deny
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
</Location>

# Set the default printer/job policies...
<Policy default>
  # Job-related operations must be done by the owner or an administrator...
  <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 CUPS-Move-Job>
    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 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>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

This is the cupsd.conf from the server:

Code:
LogLevel debug
SystemGroup lpadmin
# Allow remote access
Port 631
Listen /var/run/cups/cups.sock
# Enable printer sharing and shared printers.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress @LOCAL
DefaultAuthType Basic
<Location />
  # Allow shared printing...
  Order allow,deny
  Allow @LOCAL
</Location>
<Location /admin>
  Encryption Required
  Order allow,deny
</Location>
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
</Location>
<Policy default>
  <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 CUPS-Move-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <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>
  <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 CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
 
Old 06-29-2009, 07:41 AM   #2
arckane
Member
 
Registered: Sep 2005
Location: UK
Distribution: Gentoo/Debian/Ubuntu
Posts: 308

Rep: Reputation: 39
By the sounds of it, the hardware isn't coming fully out of suspend. I'm wondering whether you could try kicking UDEV and then CUPS and see if that helps. Just restart the services.

let us know.
 
Old 06-29-2009, 03:57 PM   #3
adrianmariano
Member
 
Registered: Dec 2004
Distribution: Ubuntu Yakkety
Posts: 193

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by arckane View Post
By the sounds of it, the hardware isn't coming fully out of suspend. I'm wondering whether you could try kicking UDEV and then CUPS and see if that helps. Just restart the services.

let us know.
Tried restarting udev and cups. This had no effect.

On the client isn't it the case that the only hardware interface I'm using is the network connection? (And the internet connection works just fine after suspend. I haven't found anything else that is broken after suspend.) I'm not suspending the server, just the client.
 
Old 06-30-2009, 09:14 PM   #4
adrianmariano
Member
 
Registered: Dec 2004
Distribution: Ubuntu Yakkety
Posts: 193

Original Poster
Rep: Reputation: 15
I restarted some stuff in /etc/init and discovered that restarting avahi-daemon restores my print service.

Any idea why this would be?

Is there a way to automatically restart this daemon after coming out of suspend?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shared printer does not print litlmary Linux - Server 8 07-28-2009 09:53 AM
Unable to print to shared printer... jim_naisium Slackware 1 07-26-2007 08:50 PM
I want to print using windows XP shared printer dv502 Linux - Networking 4 01-04-2007 01:06 PM
how to print on a winxp-shared printer from inux? pusrob Linux - Networking 14 06-16-2006 05:33 AM
Can't seem to print to an XP Pro Shared Printer powerismine Slackware 1 05-09-2003 11:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration