LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   CUPS: Not working properly, doing crazy stuff. (http://www.linuxquestions.org/questions/linux-software-2/cups-not-working-properly-doing-crazy-stuff-769983/)

Thaorius 11-18-2009 12:13 PM

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:
lp JOB.ps
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 12:31 PM

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 01:44 PM

Code:

Skarlet:/home/skarlet# lpstat -t
scheduler is running
system default destination: HP_LaserJet_P1505
members of class Network:
        HP_LaserJet_P1505
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:
Code:

LogLevel debug
SystemGroup lpadmin
# Allow remote access
#Port 631
Listen 127.0.0.1:631
Listen 192.168.3.12:631
Listen 192.168.2.1:631

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

BrowseAddress 192.168.3.255
BrowseAddress 192.168.2.255
BrowseAddress 127.0.0.1
BrowseAllow from 127.0.0.1
BrowseAllow from 192.168.2.0/24)
BrowseAllow from 192.168.3.0/24)
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>
<Location /admin>
  # Allow remote administration...
  Order allow,deny
  Allow all
</Location>
<Location /admin/conf>
  # AuthType None
  # Allow remote access to the configuration files...
  Order allow,deny
  Allow all
</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
    Order allow,deny
  </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
    Order allow,deny
  </Limit>
</Policy>

WAN access is firewalled.

Thaorius 11-20-2009 09:30 PM

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

Thanks.

Spatior 11-23-2009 11: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 05: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:
Code:

HP_LaserJet_P1505
-----------------
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 3.9.8.36
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...:
Code:

Skarlet:~# dmesg | tail
RPC: Registered tcp transport module.
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
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 06: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.
Code=12https://answers.launchpad.net/hplip/+question/47352

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 06: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 03:55 AM.