How to print from Windows XP to cups-lpd
Helge Blischke
h.blischke at acm.org
Sat Sep 5 06:42:54 PDT 2009
Kai Lanz wrote:
> Short version: How do I print from a Windows XP client to cups-lpd?
>
> We have RHEL 4 with CUPS v1.1.22. CUPS and cups-lpd are configured and
> working; I can print from a Mac OSX client using lpd-style printing just
> fine. But I can't print from a Windows XP Professional client, even though
> it's set up to print to the same host, same port (515), using LPR, to the
> same queue.
>
> Mysteriously, the job reaches the server and then seems to evaporate. The
> logs show the client contacting cups-lpd via xinetd; here's
> /var/log/secure:
>
> Sep 4 14:07:18 pangea2 xinetd[5663]: START: printer pid=2219
> from=171.64.175.30
>
> Then in /var/log/messages, we see an error from cups-lpd:
>
> Sep 4 14:07:18 pangea2 cups-lpd[2219]: Connection from a65pc20
> (171.64.175.30)
> Sep 4 14:07:18 pangea2 cups-lpd[2219]: Receive print job for a65-laserjet
> Sep 4 14:07:18 pangea2 cups-lpd[2219]: Error while reading file - Success
> Sep 4 14:07:18 pangea2 cups-lpd[2219]: Closing connection
>
> The cups/access_log file shows a small flurry of connections:
>
> localhost - - [04/Sep/2009:14:07:18 -0700] "POST / HTTP/1.1" 200 137
> localhost - - [04/Sep/2009:14:07:18 -0700] "POST / HTTP/1.1" 200 137
> localhost - - [04/Sep/2009:14:07:18 -0700] "POST / HTTP/1.1" 200 77
> localhost - - [04/Sep/2009:14:07:18 -0700] "POST / HTTP/1.1" 200 180
>
> And here's the error_log, with logging level at debug:
>
> D [04/Sep/2009:14:07:18 -0700] AcceptClient: 6 from localhost:631.
> D [04/Sep/2009:14:07:18 -0700] ReadClient: 6 POST / HTTP/1.1
> D [04/Sep/2009:14:07:18 -0700] ProcessIPPRequest: 6 status_code=1
> D [04/Sep/2009:14:07:18 -0700] ReadClient: 6 POST / HTTP/1.1
> D [04/Sep/2009:14:07:18 -0700] ProcessIPPRequest: 6 status_code=1
> D [04/Sep/2009:14:07:18 -0700] ReadClient: 6 POST / HTTP/1.1
> D [04/Sep/2009:14:07:18 -0700] ProcessIPPRequest: 6 status_code=406
> D [04/Sep/2009:14:07:18 -0700] AcceptClient: 7 from localhost:631.
> D [04/Sep/2009:14:07:18 -0700] CloseClient: 6
> D [04/Sep/2009:14:07:18 -0700] ReadClient: 7 POST / HTTP/1.1
> D [04/Sep/2009:14:07:18 -0700] ProcessIPPRequest: 7 status_code=0
> D [04/Sep/2009:14:07:18 -0700] CloseClient: 7
>
> The result of all this is that no job is spooled for this queue. Both lpq
> and lpstat show no new job spooled, and the /var/spool/cups directory has
> no new files added to it. The printer is disabled so we don't waste paper
> while I'm testing, but the spool is accepting jobs:
>
> # /usr/sbin/lpc status a65-laserjet
> a65-laserjet:
> printer is on device 'socket' speed -1
> queuing is enabled
> printing is disabled
> no entries
> daemon present
>
> This is confirmed by the fact that I can still spool jobs to this queue
> via cups-lpd from a Mac.
>
> The odd-looking message, "Error while reading file - Success", comes from
> cups-lpd.c (line 714, in the source for v1.1.23). It would seem to
> indicate that the previous fread or write operation returned <1 byte,
> though the operation itself did not fail (meaning, errno was set to 0). I
> don't know what that implies about the file cups-lpd got from the PC.
>
> I've tried both
> server_args = -o document-format=application/vnd.cups-raw
> and server_args = -o document-format=application/octet-stream
> in the /etc/xinetd.d/cups-lpd file, with no change in behavior. And I've
> tried setting group=lp and group=sys in that file, also to no effect.
>
> Can someone shed some light on this?
Can you manage to temporarily replace the cups-lpd by a smple script that
dumps the input to a file and post (an URL to) that?
If I can have a detailed look into such a dump, I could check if it is the
same issue for which I patched cups-lpd for both 1.1.19 and 1.3.5 some time
ago.
Helge
More information about the cups
mailing list