# CUPS configuration and no devices

## majkelek

Hi all!

I've got a problem with my printer HP DJ3550. It worked under my Gentoo, but it had been deleted. So i tried to install it, like always, through localhost:631, but when there is a moment to choose Device there is no list, nothing is shown... I'm using Opera, but under firefox there is another problem, that i have no permissions to get into CUPS configuration

----------

## jflintz

It sounds like CUPS got foobared really bad. I would emerge -C cupsd and delete the /etc/cupsd directory and then re-emerge cupsd.

Make sure that you do not have a .cupsrc in your home directory before you re-emerge cupsd

----------

## majkelek

Unfortunately it didn't helped. And it one more thing - I get lpr: scheduler not responding while i want to print something.

----------

## jflintz

Back to the drawing board. A couple more questions.

1: Is the connection USB or regular parport connection?

a: Is the module loaded for the connection?

2: Is it compiled in your kernel or as a module for your printer connection?

3: Do you have any kind of firewall on the machine?

----------

## penguinlnx

You also need ghostscript and Emerge foomatic-filters.  Usually this isn't automatically installed.

Check through my list: at the bottom of my signature there is a link to my post on printers and CUPS.

----------

## majkelek

1. Connection is USB

a. You are thinking about usblp or lp?? Actually not, and it don't want to load with modprobe

2. It is compiled in my kernel (2.6.11.3)

3. Firewall not, but i have NAT (if it is important) and privoxy - proxy server (but when i turn it off it does not work too.

----------

## jflintz

Is it compiled in the kernel or as a module?

What happens when you type

lpq

After reading your first post I realized something.

In you home directory do you have a .cupsrc file and if so what does it say. In /etc/cups directory you will see client.conf, do you have anything uncommented? In the same directory there is a file called cupsd.conf. What do you have set for ServerName?

What does it say (if any) in /var/log/cups/error_log

Here is what I have for my cupsd.conf

######

ServerName 192.168.0.4  #The machine IP

AccessLog /var/log/cups/access_log

DefaultLanguage en

DocumentRoot /usr/share/cups/docs

ErrorLog /var/log/cups/error_log

FontPath /usr/share/cups/fonts

LogLevel info

User lp

Group lp

Port 631

SystemGroup lp

# Settings for my lan and sharing for my lan machines

<Location />

Order Deny,Allow

Deny From All

Allow From 127.0.0.1

Allow From 192.168.0.*

</Location>

<Location /admin>

AuthType Basic

AuthClass System

Order Deny,Allow

Deny From All

Allow From 127.0.0.1

Allow From 192.168.0.4

</Location>

######

Also make sure that cupsd is running and to make sure that it starts when your machine starts add it to rc-udpate via

rc-update add cupsd default

----------

## Szityu

I have the same problem. I tryed to re-emerge everything, nothing helped. My cupsd.conf looks the same as the above one. 

My /var/log/cups/error_log looks like:

I [17/May/2005:15:04:04 +0200] LoadPPDs: Read "/etc/cups/ppds.dat", 2130 PPDs...

I [17/May/2005:15:04:04 +0200] LoadPPDs: No new or changed PPDs...

I [17/May/2005:15:04:04 +0200] Full reload complete.

I [17/May/2005:15:04:14 +0200] Started "/usr/lib/cups/cgi-bin/printers.cgi" (pid=12579)

E [17/May/2005:15:04:14 +0200] [CGI] CUPS-Get-Printers request failed - client-error-forbidden (401)

Please help me with this problem. THx!

----------

## jflintz

Since the printer is usb, unplug it and read your dmesg, then plug it back in and read your dmesg. What does dmesg tell you? What does your system logs tell you?

----------

## Szityu

Well, I forgot to mention, but it`s accessed through a network.  It`ll be accessed with samba.

----------

## jflintz

 *Szityu wrote:*   

> Well, I forgot to mention, but it`s accessed through a network.  It`ll be accessed with samba.

 

It's been a looong time since I played with samba. At least 5 years now. 

Have you checked out http://www.gentoo.org/doc/en/quick-samba-howto.xml yet?

Figured it might help if you have not seen it yet.

----------

## majkelek

I don't have .cupsrc file, my servername is localhost and I've got the same cupsd.conf as you. And i'm absolutely sure that cups is running. And at last - nothing helped :/ Any other ideas? I'll be pleased.

----------

## jflintz

What happens when you type in a terminal

lpq

What does your /var/log/cups/error_log say

What does your /var/log/cups/access_log say

unplug your usb cable and in a terminal type 

dmesg | grep usb

what does it say

plug your usb cable in and type in a terminal

dmesg | grep usb

Also make sure that you system finds your usb card. Type in a terminal lspci and make sure that your usb card is listed.

post what everything tells you so I (and everyone else who happen to stumble on this thread)can see what might be going on.

----------

## majkelek

lpq => lpq: error - no default destination available.

errol_log: I [17/May/2005:19:49:59 +0200] Listening to 0:631

I [17/May/2005:19:49:59 +0200] Loaded configuration file "/etc/cups/cupsd.conf"

I [17/May/2005:19:49:59 +0200] Configured for up to 100 clients.

I [17/May/2005:19:49:59 +0200] Allowing up to 100 client connections per host.

I [17/May/2005:19:49:59 +0200] Full reload is required.

I [17/May/2005:19:50:00 +0200] LoadPPDs: Read "/etc/cups/ppds.dat", 1857 PPDs...

I [17/May/2005:19:50:00 +0200] LoadPPDs: No new or changed PPDs...

I [17/May/2005:19:50:00 +0200] Full reload complete.

I [17/May/2005:19:53:00 +0200] Started "/usr/lib/cups/cgi-bin/printers.cgi" (pid=4289)

E [17/May/2005:19:53:01 +0200] [CGI] CUPS-Get-Printers request failed - client-error-forbidden (401)

I [17/May/2005:19:53:08 +0200] Started "/usr/lib/cups/cgi-bin/admin.cgi" (pid=4290)

I [17/May/2005:19:53:15 +0200] Started "/usr/lib/cups/cgi-bin/admin.cgi" (pid=4291)

I [17/May/2005:20:01:26 +0200] Scheduler shutting down normally.

acces_log: localhost - - [17/May/2005:19:53:02 +0200] "GET /admin/?op=add-printer HTTP/1.1" 401 0

localhost - root [17/May/2005:19:53:08 +0200] "GET /admin/?op=add-printer HTTP/1.1" 200 0

localhost - root [17/May/2005:19:53:08 +0200] "GET /admin/?op=add-printer HTTP/1.1" 200 2393

localhost - - [17/May/2005:19:53:09 +0200] "GET /images/left.gif HTTP/1.1" 200 110

localhost - - [17/May/2005:19:53:09 +0200] "GET /images/right.gif HTTP/1.1" 200 145

localhost - - [17/May/2005:19:53:09 +0200] "GET /images/continue.gif HTTP/1.1" 200 224

localhost - - [17/May/2005:19:53:15 +0200] "POST /admin HTTP/1.1" 401 0

localhost - root [17/May/2005:19:53:15 +0200] "POST /admin HTTP/1.1" 200 77

tux - - [17/May/2005:19:53:15 +0200] "POST / HTTP/1.1" 403 0

localhost - root [17/May/2005:19:53:15 +0200] "POST /admin HTTP/1.1" 200 2415

localhost - root [17/May/2005:20:01:38 +0200] "GET /printers HTTP/1.1" 200 0

tux - - [17/May/2005:20:01:38 +0200] "POST / HTTP/1.1" 403 0

tux - - [17/May/2005:20:01:38 +0200] "POST / HTTP/1.1" 403 0

localhost - root [17/May/2005:20:01:38 +0200] "GET /printers HTTP/1.1" 200 1596

localhost - root [17/May/2005:20:01:38 +0200] "GET /admin/?op=add-printer HTTP/1.1" 200 0

unplug usb: usbcore: registered new driver usbfs

usbcore: registered new driver hub

usb 2-1: new full speed USB device using uhci_hcd and address 2

drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x03F0 pid 0x7304

usbcore: registered new driver usblp

drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver

usbcore: registered new driver usb-storage

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.0:USB HID core driver

usb 2-1: USB disconnect, address 2

drivers/usb/class/usblp.c: usblp0: removed

plug usb: usbcore: registered new driver usbfs

usbcore: registered new driver hub

usb 2-1: new full speed USB device using uhci_hcd and address 2

drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x03F0 pid 0x7304

usbcore: registered new driver usblp

drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver

usbcore: registered new driver usb-storage

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.0:USB HID core driver

usb 2-1: USB disconnect, address 2

drivers/usb/class/usblp.c: usblp0: removed

bash-2.05b# dmesg | grep usb

usbcore: registered new driver usbfs

usbcore: registered new driver hub

usb 2-1: new full speed USB device using uhci_hcd and address 2

drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x03F0 pid 0x7304

usbcore: registered new driver usblp

drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver

usbcore: registered new driver usb-storage

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.0:USB HID core driver

usb 2-1: USB disconnect, address 2

drivers/usb/class/usblp.c: usblp0: removed

usb 2-1: new full speed USB device using uhci_hcd and address 3

drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 3 if 0 alt 0 proto 2 vid 0x03F0 pid 0x7304

My system found my usb and lspci list it.

----------

## jflintz

All looks good from what you posted except for the

E [17/May/2005:19:53:01 +0200] [CGI] CUPS-Get-Printers request failed - client-error-forbidden (401) 

in the error_log

Do you have hpijs installed?

What do you have in your /dev/usb/ directory?

If anything file a bugreport at cups.org cause this is strange.

----------

## majkelek

Yes, i have hpijs and in my /dev/usb is lp0... So i guess it is so strange, that my only chance is cups.org?

----------

## +Kardboard+

Hi, same problem here, everything's the same too except that when I try lpq I get "uncable to contact server".  Re-emerging it doesn't work, so anyone knows what's going on?  It was working fine until I emerged qmail...

----------

## +Kardboard+

OK, this is too weird.  It just mysteriously started working again.  Now I can see the "Devices" drop box in the CUPS web admin for adding printers properly, but only one of my printers print now after I tried printing test pages.

cups/error_log shows this:

```

E [18/May/2005:12:07:17 +0000] Unable to convert file 0 to printable format for job 8!

I [18/May/2005:12:07:17 +0000] Hint: Do you have ESP Ghostscript installed?

I [18/May/2005:12:07:17 +0000] Hint: Try setting the LogLevel to "debug".

```

Ummmm....I'm pretty sure Ghostscript is already there...

----------

## +Kardboard+

OK, I reemerged Ghostscript and Foomatic and now everything works just fine.  I really have no idea what's going on.  -_-;

----------

## Szityu

I still have the same problem as majkelek. My lpq gives no default destination available.

----------

## ce110ut

I recently had this problem [for like a month] and realized that it's linked to how cups restricts access.

what I had done with my /etc/hosts file was customize it:

```

# /etc/hosts file

10.0.0.1          mybox.mydomain.com mybox

```

I edited it back to contain:

```

# /etc/hosts file

127.0.0.1        localhost

10.0.0.1         mybox.mydomain.com mybox

```

and voila - fixed my problem.  the device 'box' now contained the many protocols of printing.

hope this helps

regards,

berto

----------

