Bug 472912 - cups-polld needs to call __res_init() on hostname failure
Summary: cups-polld needs to call __res_init() on hostname failure
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: 10
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: bzcl34nup
Depends On: 354071
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-25 15:59 UTC by James Laska
Modified: 2013-09-02 06:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-12-15 11:01:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description James Laska 2008-11-25 15:59:27 UTC
I'm still observing the issue filed as bug#354071 against F9 while using F10 (cups-1.3.9-2.fc10.i386).  The procedure outlined below matches the case I'm seeing.  It seems that cups starts and begins searching for printers before NetworkManager has connected.  

I have to restart cups for it to connect to my provided BrowsePoll server and see shared printers.

+++ This bug was initially created as a clone of Bug #354071 +++

Description of problem:

On My laptop, when I join the Red Hat network, every time I go to print the list
of printers is empty.  I have to go to root and execute service cups reload.

This should happen whenever NetworkManager joins a new network.

--- Additional comment from twaugh on 2007-10-26 12:33:12 EDT ---

I just tried this out, and it works for me in rawhide.  Here's how I tested it:

1. Fresh install with default CUPS configuration.
2. Disable networking by right-clicking on the nm-applet icon and unchecking the
box.
3. Stop CUPS:
/sbin/service cups stop
4. Remove cached remote printers:
rm -f /var/cache/cups/remote.cache
5. Start CUPS:
/sbin/service cups start

At this point, CUPS has never seen the network interface, and has no
recollection of any remote printers.

6. Start gedit and click Print...
7. Only locally-connected printers shown
8. Right-click on nm-applet icon and enable networking
9. Wait (up to 30 seconds -- this is the default BrowseInterval, and is how long
the remote print server might take to broadcast a browse packet)
10. Remote printers appear in print dialog

cups-1.3.3-3.fc8


--- Additional comment from dwalsh on 2007-11-05 09:26:12 EDT ---

Ok It happened to me again this morning.

I brought my laptop in this morning and NetworkManager hooked to the wired
network, and I get no printers listed.

Looking at the cups error log I see this error every minute.

E [05/Nov/2007:09:19:16 -0500] [cups-polld cups.boston.redhat.com:631] Unable to
connect to cups.boston.redhat.com on port 631: Host name lookup failure
E [05/Nov/2007:09:20:26 -0500] [cups-polld cups.boston.redhat.com:631] Unable to
connect to cups.boston.redhat.com on port 631: Host name lookup failure

I attempt to telnet to this port and I get it fine.  So name resolution is
working fine on the box.  I am not running nscd or named at the time I tried
this out.  The code is calling getaddrinfo so this seems to somehow have cached
some data/error and is not clearing itself up.

Comment 1 Tim Waugh 2008-11-25 16:18:06 UTC
Verified.  Reproduced on Fedora 9 as well.

Comment 2 Tim Waugh 2008-11-25 16:18:38 UTC
Trimming CC list.

Comment 3 Tim Waugh 2008-12-15 11:01:28 UTC
This was fixed in:
  http://admin.fedoraproject.org/updates/F10/FEDORA-2008-10895


Note You need to log in before you can comment on or make changes to this bug.