[Pkg-cups-devel] Bug#541879: cups: CUPS Browse Protocol reports wrong printer URL

Jaime Alberto Silva jaimealbertosilva at gmail.com
Sun Aug 16 20:47:32 UTC 2009


Package: cups
Version: 1.3.11-1+b1
Severity: important

I have a Lexmark X1290 attached to my desktop machine that shares it
via CUPS to the laptops.

In my laptop the printer had always been automatically added by it's cups
server, but a few days ago it stopped working. The printer is there but
if I send a job it never gets printed. I assume it stopped working after a
cups
upgrade, I prefer testing for the desktop and the laptop but since cups is
failing I upgraded the desktop's cups to the unstable version, however the
problem remains.

After that, in the laptop's browser I loaded http://localhost:631/printers
and find out that the printer's URL is wrong.

The desktop's IP address is 10.1.52.2 so the printer's URL had always been
ipp://10.1.52.2:631/printers/Lexmark-X1290 but now it has changed to
ipp://sgautomatizacion.local:631/printers/Lexmark-X1290 which has an
unresolvable host name. The desktop's hostname has been
sgautomatizacion.dynalias.com for a long time now and it never affected
cups.

In cupsd.conf I configured the server name to 10.1.52.2 a long time ago.
Here is the desktop's cupsd.conf:

jaime at sgautomatizacion:/$ cat /etc/cups/cupsd.conf
LogLevel warning
ServerName 10.1.52.2
SystemGroup lpadmin
# Allow remote access
Port 631
Listen /var/run/cups/cups.sock
# Enable printer sharing and shared printers.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress @LOCAL
<Location />
  Allow localhost
  Allow 10.1.52.0/24
  # Allow shared printing and remote administration...
  Order allow,deny
  Allow all
</Location>
<Location /admin>
  Allow localhost
  Allow localhost
  Allow 10.1.52.0/24
  # Allow remote administration...
  Order allow,deny
  Allow all
</Location>
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Allow localhost
  Allow 10.1.52.0/24
  # 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 allow,deny
    Allow localhost
    Allow 10.1.52.0/24
  </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 allow,deny
    Allow localhost
    Allow 10.1.52.0/24
  </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 allow,deny
    Allow localhost
    Allow 10.1.52.0/24
  </Limit>
  <Limit CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order allow,deny
    Allow localhost
    Allow 10.1.52.0/24
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
jaime at sgautomatizacion:/$

So I don't get where is this "sgautomatizacion.local" hostname is comming
from.
I tried by changing the desktop's hostname and then running:

sgautomatizacion:/# /etc/init.d/cups stop
 * Stopping Common Unix Printing System: cupsd                           [
ok ]
sgautomatizacion:/# /etc/init.d/hostname.sh stop
sgautomatizacion:/# /etc/init.d/hostname.sh start
sgautomatizacion:/# /etc/init.d/cups start
 * Starting Common Unix Printing System: cupsd                           [
ok ]
sgautomatizacion:/#

With no luck, cups keeps reporting the printer URL with the same hostname:
"sgautomatizacion.local".

I have been reading the cups documentation and can't find how to solve this.
I
even found out how to see the CUPS Browse Protocol messages and this is
what I got in the laptop:

inspironjaime2:/home/jaime# /etc/init.d/cups stop
Stopping Common Unix Printing System: cupsd.
inspironjaime2:/home/jaime# nc -l -u -p 631
2900e 3 ipp://sgautomatizacion.local:631/printers/Lexmark-X1290 "Oficina
Jaime" "Lexmark-X1290" "Lexmark Z600 v1.0-1" job-sheets=none,none
lease-duration=300
^C
inspironjaime2:/home/jaime#

The only solution I have is to add the printer manually with a different
name
but I want the automatic detection to work again.

I hope this doesn't break printing in the Mac OS X and Windows laptop's but
I'll find that out after the weekend if I get complains.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing'), (102, 'unstable'), (101, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages cups depends on:
ii  adduser                3.110             add and remove users and groups
ii  bc                     1.06.94-3.1       The GNU bc arbitrary precision
cal
ii  cups-client            1.3.11-1          Common UNIX Printing System(tm)
-
ii  cups-common            1.3.11-1          Common UNIX Printing System(tm)
-
ii  debconf [debconf-2.0]  1.5.27            Debian configuration management
sy
ii  ghostscript            8.64~dfsg-13      The GPL Ghostscript
PostScript/PDF
ii  libavahi-compat-libdns 0.6.25-1          Avahi Apple Bonjour
compatibility
ii  libc6                  2.9-23            GNU C Library: Shared libraries
ii  libcups2               1.3.11-1          Common UNIX Printing System(tm)
-
ii  libcupsimage2          1.3.11-1          Common UNIX Printing System(tm)
-
ii  libdbus-1-3            1.2.16-2          simple interprocess messaging
syst
ii  libgcc1                1:4.4.1-1         GCC support library
ii  libgnutls26            2.8.3-1           the GNU TLS library - runtime
libr
ii  libgssapi-krb5-2       1.7dfsg~beta3-1   MIT Kerberos runtime libraries
- k
ii  libijs-0.35            0.35-7            IJS raster image transport
protoco
ii  libkrb5-3              1.7dfsg~beta3-1   MIT Kerberos runtime libraries
ii  libldap-2.4-2          2.4.17-1          OpenLDAP libraries
ii  libpam0g               1.0.1-10          Pluggable Authentication
Modules l
ii  libpaper1              1.1.23+nmu1       library for handling paper
charact
ii  libpoppler4            0.10.6-1          PDF rendering library
ii  libslp1                1.2.1-7.6         OpenSLP libraries
ii  libstdc++6             4.4.1-1           The GNU Standard C++ Library v3
ii  lsb-base               3.2-23            Linux Standard Base 3.2 init
scrip
ii  perl-modules           5.10.0-24         Core Perl modules
ii  procps                 1:3.2.8-1         /proc file system utilities
ii  ssl-cert               1.0.23            simple debconf wrapper for
OpenSSL
ii  ttf-freefont           20080323-3        Freefont Serif, Sans and Mono
True
ii  xpdf-utils [poppler-ut 3.02-1.4+lenny1   Portable Document Format (PDF)
sui
ii  zlib1g                 1:1.2.3.3.dfsg-15 compression library - runtime

Versions of packages cups recommends:
ii  avahi-utils               0.6.25-1       Avahi browsing, publishing and
dis
pn  cups-driver-gutenprint    <none>         (no description available)
ii  foomatic-filters          4.0-20090509-1 OpenPrinting printer support -
fil
ii  ghostscript-cups          8.64~dfsg-13   The GPL Ghostscript
PostScript/PDF
pn  smbclient                 <none>         (no description available)

Versions of packages cups suggests:
ii  cups-bsd                  1.3.11-1       Common UNIX Printing System(tm)
-
ii  cups-pdf                  2.5.0-4        PDF printer for CUPS
ii  foomatic-db               20090616-1     OpenPrinting printer support -
dat
ii  foomatic-db-engine        4.0-20090509-1 OpenPrinting printer support -
pro
ii  hplip                     3.9.4b-1       HP Linux Printing and Imaging
Syst
pn  xpdf-korean | xpdf-japane <none>         (no description available)

-- debconf information:
* cupsys/raw-print: true
* cupsys/backend: ipp, lpd, parallel, scsi, serial, socket, usb, snmp, dnssd

Jaime Alberto Silva
Socio / Representante Legal
SG Automatización Ltda.
Pereira \ Risaralda \ Colombia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-cups-devel/attachments/20090816/ed309732/attachment-0001.htm>


More information about the Pkg-cups-devel mailing list