-   Linux - Software (
-   -   CUPS: Not working properly, doing crazy stuff. (

Thaorius 11-18-2009 11:13 AM

CUPS: Not working properly, doing crazy stuff.
Hi, I got an HP LaserJet 1505 printer like a month ago; so I came home, installed CUPS and the latest version of HPLIP, which, after some struggling, started working like a charm. It worked for like 1 week, and then, I stopped being able to send jobs to the printer via CUPS. Even tried from a windows Laptop using IPP, which was working previously.

Sometimes the web interface doesn't even respond(time out, connection refused, etc), sometimes it's working "half ass", meaning, you click on something and it crashes.

The printer sometimes shows on my computer (Gnome's printing dialog), and sometimes it doesn't. At first it showed and I couldn't send anything(time out), but now the printer shows up and says "Rejecting jobs", while the printer isn't rejecting jobs.

I can print to PostScript, transfer the file to my LAN server, and run:
But it's a completely hackish solution, not to mention it's blatantly slow and requires me to log to the LAN server every time I need to print something.

As for CUPS log, it doesn't really say anything usable.

The server is using Debian, presumably updated 2 months ago.

Any ideas?

Thanks for your time.

EDIT: I forgot to mention, usually, after restarting CUPS, I can send jobs from my Gnome desktop, but they never arrive to the printing queue.

Spatior 11-18-2009 11:31 AM

Hi, my guess is an error in the CUPS config. It would be helpful if you post your config file and your 'lpstat -t' I haven't used the web interface so I don't know why it does not respond.

Thaorius 11-18-2009 12:44 PM


Skarlet:/home/skarlet# lpstat -t
scheduler is running
system default destination: HP_LaserJet_P1505
members of class Network:
device for HP_LaserJet_P1505: hp:/usb/HP_LaserJet_P1505?serial=L501N8R
device for Network: ///dev/null
HP_LaserJet_P1505 accepting requests since Mon 09 Nov 2009 05:11:22 PM ARST
Network accepting requests since Tue 27 Oct 2009 02:00:22 PM ARST
printer HP_LaserJet_P1505 is idle.  enabled since Mon 09 Nov 2009 05:11:22 PM ARST
printer Network is idle.  enabled since Tue 27 Oct 2009 02:00:22 PM ARST

And my /etc/cups/cupsd.conf:

LogLevel debug
SystemGroup lpadmin
# Allow remote access
#Port 631

Listen /var/run/cups/cups.sock
# Enable printer sharing and shared printers.
Browsing On

BrowseAllow from
BrowseAllow from
BrowseAllow from
BrowseOrder deny,allow

#BrowseOrder allow,deny
#BrowseAllow all
BrowseRemoteProtocols CUPS
BrowseAddress @LOCAL
BrowseLocalProtocols cups
DefaultAuthType Basic
<Location />
  # Allow shared printing and remote administration...
  Order allow,deny
  Allow all
<Location /admin>
  # Allow remote administration...
  Order allow,deny
  Allow all
<Location /admin/conf>
  # AuthType None
  # Allow remote access to the configuration files...
  Order allow,deny
  Allow all
<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
    Order allow,deny
  <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 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 Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  <Limit All>
    #Order deny,allow
    Order allow,deny

WAN access is firewalled.

Thaorius 11-20-2009 08:30 PM

Please, anyone? I use the printer rather heavily and I don't know what else to do.


Spatior 11-23-2009 10:34 AM

Hi, sorry i haven't been around.
Mmmh now, in your lpstat -t the URI for the printer states ///dev/null, but if you are using Cups i think it may say something like //any.ip.x.x/HP_LaserJet_P1505 or //box/HP_LaserJet_P1505.

So just to be sure, try lpadmin -l ///dev/null if it respond with the status then the network name is ok, otherwise you can try to lpadmin -v and give the URI.

Hope this works.

Thaorius 11-24-2009 04:24 AM

Running your commands outputs this:
Skarlet:~# lpadmin -l ///dev/null
lpadmin: Unknown option 'l'!
Skarlet:~# lpadmin -v
lpadmin: Unable to set the device URI:
You must specify a printer name first!
Skarlet:~# lpadmin -v HP_LaserJet_P1505
lpadmin: Unable to set the device URI:
You must specify a printer name first!

However, the /dev/null should be irrelevant; as I don't use the Network class but send directly to HP_LaserJet_P1505. Though I did test the Network class when it was working and it printed just fine :S.

If you can think of anything else, please do tell, in the mean time I'm going to issue a system wide dist-upgrade and we'll see what happens.

EDIT: I updated the system, cups went ballistic. First the web interface says:
"/usr/lib/cups/backend/hp failed"
And the printer shows up as "Paused".

So I go and run hp-check, getting this:

Type: Printer
Device URI: hp:/usb/HP_LaserJet_P1505?serial=L501N8R
PPD: /etc/cups/ppd/HP_LaserJet_P1505.ppd
PPD Description: HP LaserJet p1505, hpcups
Printer Processing page 3...aserJet_P1505 now printing HP_LaserJet_P1505-0.  enabled since Tue 24 Nov 2009 09:23:12 AM ART
error: Required plug-in status: Not installed
error: Unable to communicate with device (code=12): hp:/usb/HP_LaserJet_P1505?serial=L501N8R
error: Device not found
error: Communication status: Failed

So I figured, let's try re-installing the plugin, and run hp-plugin, which failed miserably with printer communication errors.
So I figured, ok, let's check dmesg, and...:

Skarlet:~# dmesg | tail
RPC: Registered tcp transport module.
Installing knfsd (copyright (C) 1996
eth2: no IPv6 routers present
eth0: no IPv6 routers present
eth1: no IPv6 routers present
ip_tables: (C) 2000-2006 Netfilter Core Team
nf_conntrack version 0.5.0 (6144 buckets, 24576 max)
lp0: using parport0 (interrupt-driven).
ppdev: user-space parallel port driver
cupsd[2327]: segfault at 00000074 eip b7de1582 esp bfde35e0 error 4

The printer doesn't work anymore, not even from the command line.

Any ideas? All I can think of is remove CUPS, HPLIP and re-install them from source, but that will take forever.

Spatior 11-24-2009 05:11 PM

Hi again.
My bad I get confused about that part.
I googled the error code=12 of hp-check and find this thread, the solution may help.

Also this other post of LQ talks about a bug in Cups, it may have nothing to do with your problem but i cant remeber which version is the last
Cups bug and locale

Thaorius 11-24-2009 05:38 PM

I checked the links you pointed out, and after some digging, I managed to get CUPS to print a test page again and hp-check shows no errors.

But still, CUPS doesn't work, it won't take the jobs I send from the network :(.

All times are GMT -5. The time now is 02:27 PM.