Click to See Complete Forum and Search --> : Cups Network Printing Problem


anarcholinuxism
07-30-2003, 12:19 PM
I've got a printer set up using cups on a debian box, and I'm trying to print to it from another debian box, I've set cups up on that box too, pointing using a variety of methods
i.e

http://servername:631/ipp/lp0

but just get the message

"printer busy;will retry in 10 seconds..."

no active jobs come up in the print q on the server.


tail -f /var/log/cups/access_log on the print server gives me

192.168.0.18 - - [30/Jul/2003:17:12:30 +0100] "POST /ipp/lp0 HTTP/1.1" 403 0
192.168.0.18 - - [30/Jul/2003:17:12:40 +0100] "POST /ipp/lp0 HTTP/1.1" 403 0
192.168.0.18 - - [30/Jul/2003:17:12:50 +0100] "POST /ipp/lp0 HTTP/1.1" 403 0

so something is registering but nothing in the error log.

anarcholinuxism
07-30-2003, 12:26 PM
ok then , I've just discovered that the log messages are

"access forbidden:403" errors so apparently I need to work out how to "share" the printer, nothing in the cups manual, it says it's the default?!

anarcholinuxism
07-30-2003, 12:36 PM
Ah, they've obviuosly changed it since my informant last looked

from /usr/share/doc/cupsys/README.Debian.gz

By default, cupsys is configured to only allow connections to
printers from localhost, effectively disabling network printing.
The previous default was to allow anyone to connect to printers
from any location - definitely not a smart move. You can change
these defaults by editing /etc/cups/cupsd.conf; the access controls
are at the end of the file. Be sure you only allow access from the
locations you trust, or require authentication.

so the relevant part of the cupsd.conf file

## Restrict access to local domain
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 192.168.0.18
#Encryption Required


which you can see from earlier hacks I've already tried to allow the main client to access, obviously I've got it wrong :(

mdwatts
07-30-2003, 01:24 PM
Did you restart the cupsd service after you modified cupsd.conf?

anarcholinuxism
07-30-2003, 02:40 PM
Sorry, I didn't make myself clear, that "allow from" line was something I put in a few days ago in an earlier attempt to get it working, cups has been restarted several times since then.


I now have

## Restrict access to local domain
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 192.168.0.18
#Encryption Required
</Location>

and tail -f /var/log/cups/access_log
gives me

192.168.0.18 - - [30/Jul/2003:19:35:54 +0100] "POST /ipp/lp0 HTTP/1.1" 200 117
192.168.0.18 - - [30/Jul/2003:19:35:54 +0100] "POST /ipp/lp0 HTTP/1.1" 200 117
192.168.0.18 - - [30/Jul/2003:19:35:54 +0100] "POST /ipp/lp0 HTTP/1.1" 200 117

anarcholinuxism
07-30-2003, 02:42 PM
also the client machine gives me a new error message

"unable to get printer status (client-error-not found)!"

so I must be nearly there but not quite :)

mdwatts
07-30-2003, 03:38 PM
Does http://www.linuxprinting.org/pipermail/hp-list/2003q2/003265.html help?

anarcholinuxism
07-30-2003, 03:46 PM
That's windows to linux isn't it?

I think I can use samba to print to the cups printer from another linux box, but that's more of workaround than a solution I think. I'd like to persevere with the ipp a bit longer because it should work.

Someone has advised me to read ALL the logs.

KDE needs a logviewer gui :)

mdwatts
07-30-2003, 03:49 PM
Originally posted by anarcholinuxism

KDE needs a logviewer gui :)

Search

www.kde.org

www.google.com/linux

http://freshmeat.net

for one.

Do you have a firewall preventing the connection?

All I can think of is to check the main cups website or www.linuxprinting.org

Anyone else?

anarcholinuxism
07-30-2003, 03:51 PM
ah, in /var/log/cups/error_log

E [30/Jul/2003:20:45:12 +0100] get_printer_attrs: resource name '/ipp/lp0' no good!

I've got the path wrong in the client set-up, how can I find out what the right path should be?

mdwatts
07-30-2003, 04:04 PM
Originally posted by anarcholinuxism
'/ipp/lp0' no good!


Is that a i or l in '/ipp/lp0'?

I would think it should be lpp for line printer.

anarcholinuxism
07-30-2003, 04:12 PM
no it's defintely i

it stands for internet printing protocol, I think it just uses http, they appear to be interchangeable according to the cups documentation, although I had to check.

anarcholinuxism
07-30-2003, 07:53 PM
Done it, I had the Device URI wrong.

mdwatts
07-31-2003, 08:09 AM
Originally posted by anarcholinuxism
Done it, I had the Device URI wrong.

Good job. Persistence usually pays off in the long run. :)