CUPS + LPR printing from Windows (LPD printing)

suresh suresh at hclp.com
Mon May 2 05:34:55 PDT 2005


Hai,

Found the root cause of the problem in printing via LPR port from Windows 2000. In cups-1.1.17 source code, main.c in scheduler directory,  FD_ISSET(lis->fd, &input) function return 0.

In CUPS installed on Suse Linux PC,
-----------------------------------

FD_ISSET(lis->fd, &input) returns false;
In turn AcceptClient(lis) fuction is not getting called. So the listening socket is not created. The output of netstat -atn command after cupsd is started.

sh-2.05b# netstat -atn
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:4000            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:515             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:9098            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:6000            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:6003            0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN
sh-2.05b#


In CUPS installed on Reh Hat 9.0 PC,
------------------------------------

FD_ISSET(lis->fd, &input) returns true;
In turn AcceptClient(lis) fuction is getting called. So the listening socket is created. The output of netstat -atn command after cupsd is started.

[root at Qute root]# netstat -atn
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:512             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:32768           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:32769           0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:32770         0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:514             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:515             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:678             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:9098            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:6000            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:23              0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:34387         127.0.0.1:631           TIME_WAIT
tcp        0      0 127.0.0.1:34386         127.0.0.1:631           TIME_WAIT
tcp        0      0 127.0.0.1:34385         127.0.0.1:631           TIME_WAIT
tcp        0      0 127.0.0.1:34384         127.0.0.1:631           TIME_WAIT
tcp        0      0 127.0.0.1:34389         127.0.0.1:631           TIME_WAIT
tcp        0      0 127.0.0.1:34388         127.0.0.1:631           TIME_WAIT
tcp        0      0 127.0.0.1:34379         127.0.0.1:631           TIME_WAIT
tcp        0      0 127.0.0.1:34383         127.0.0.1:631           TIME_WAIT
tcp        0      0 127.0.0.1:34382         127.0.0.1:631           TIME_WAIT
tcp        0      0 127.0.0.1:34381         127.0.0.1:631           TIME_WAIT



Kindly help me why FD_ISSET returns false in CUPS installed on Suse Linux PC. Why listening sockets are not generated?.

With Thanks & Regards,
K. Suresh

========================================================================

> Hai,
>
> I am using Suse Linux Distribution. I have moved from LPRng spooler to CUPS spooler. I faced the problem in printing from Windows 2000 server to Linux PC. When printing via LPR port  from Windows, the print data is not spooled to the Linux machine (LPD Printing).
>
> I checked the LPR port printing with Red Hat 9 PC,  it is working fine. CUPs version in both the PCs is 1.1.17. I compared the error log file in both Red Hat 9.0 and Suse Linux. I found the difference in one location of error_log. The following error log files are obtained by defining LogLevel debug2 in /etc/cups/cupsd.conf files.
>
> Part of Working  /var/log/cups/error_log file
> ---------------------------------------------
>
> d [27/Apr/2005:14:12:31 +0530] AcceptClient(0x8086c00) 0 NumClients = 1
> D [27/Apr/2005:14:12:31 +0530] AcceptClient() 7 from localhost:631.
> d [27/Apr/2005:14:12:31 +0530] AcceptClient: Adding fd 7 to InputSet...
> d [27/Apr/2005:14:12:31 +0530] ReadClient() 7, used=0
> D [27/Apr/2005:14:12:31 +0530] ReadClient() 7 POST /printers/lp HTTP/1.1        d [27/Apr/2005:14:12:31 +0530] decode_auth(0x4046f220): Authorization string = ""
> d [27/Apr/2005:14:12:31 +0530] decode_auth() 7 username=""
> d [27/Apr/2005:14:12:31 +0530] IsAuthorized: con->uri = "/printers/lp"
> d [27/Apr/2005:14:12:31 +0530] FindBest: uri = "/printers/lp"...
> d [27/Apr/2005:14:12:31 +0530] FindBest: Location /admin Limit 7f
> d [27/Apr/2005:14:12:31 +0530] FindBest: Location /printers/lp Limit 7f
> d [27/Apr/2005:14:12:31 +0530] FindBest: Location /printers/printer Limit 7f
> d [27/Apr/2005:14:12:31 +0530] FindBest: Location / Limit 7f                    d [27/Apr/2005:14:12:31 +0530] FindBest: Location CUPS_INTERNAL_BROWSE_ACL Limit 0
> d [27/Apr/2005:14:12:31 +0530] FindBest: best = "/printers/lp"
>
>
>
> Part of Not Working /var/log/cups/error_log file
> ------------------------------------------------
>
> d [27/Apr/2005:14:05:54 +0530] AcceptClient(0x8086c00) 0 NumClients = 1
> D [27/Apr/2005:14:05:54 +0530] AcceptClient() 5 from localhost:631.
> d [27/Apr/2005:14:05:54 +0530] AcceptClient: Adding fd 5 to InputSet...
> d [27/Apr/2005:14:05:54 +0530] ReadClient() 3, used=0
> D [27/Apr/2005:14:05:54 +0530] CloseClient() 3
> d [27/Apr/2005:14:05:54 +0530] CloseClient: Removing fd 3 from InputSet and OutputSet...
> d [27/Apr/2005:14:05:54 +0530] ReadClient() 5, used=0
> D [27/Apr/2005:14:05:54 +0530] ReadClient() 5 POST / HTTP/1.1
> d [27/Apr/2005:14:05:54 +0530] decode_auth(0x40378008): Authorization string = ""
> d [27/Apr/2005:14:05:54 +0530] decode_auth() 5 username=""
> d [27/Apr/2005:14:05:54 +0530] IsAuthorized: con->uri = "/"
> d [27/Apr/2005:14:05:54 +0530] FindBest: uri = "/"...
> d [27/Apr/2005:14:05:54 +0530] FindBest: Location /admin Limit 7f
> d [27/Apr/2005:14:05:54 +0530] FindBest: Location / Limit 7f
> d [27/Apr/2005:14:05:54 +0530] FindBest: Location CUPS_INTERNAL_BROWSE_ACL Limit 0
> d [27/Apr/2005:14:05:54 +0530] FindBest: best = "/"
>
> The printer deatils are missed in the error log file in which the printing is not working. Why the printer details are not read by cupsd when printing via LPR port from Windows. The following printing are working in both PCs.
>
>            1. Local Printing (printer connect to PCs locally)
>            2. Test page print from Browser (http://localhost:631)
>            3. SMB printing
> Only printing via LPR port from Windows machine (LPD printing) is not working. Kindly help me in this regards.
>
> With Thanks and Regards,
> K. Suresh





More information about the cups-devel mailing list