Samba: CUPS printers are not available at startup

Lucio M Nicolosi lmnicolosi at gmail.com
Sat Apr 23 03:36:21 UTC 2011


On Thu, Apr 21, 2011 at 1:20 AM, NoOp <glgxg at sbcglobal.net> wrote:
> On 04/20/2011 05:53 PM, Lucio M Nicolosi wrote:
>> On Wed, Apr 20, 2011 at 8:56 PM, NoOp <glgxg at sbcglobal.net> wrote:
>>>
>>> You get this sorted out? Sorry I didn't do anything further as I was
>>> away/sailing last weekend & forgot to respond.
>>>
>>> G.
>>
>> In fact no.
>>
>> Since the issue is apparent in both current Maverick install and a
>> brand new Natty, you cannot reproduce it and the Ubuntu guys say it is
>> a Lucid bug, I'm probably facing a local problem, a hardware issue.
>>
>> I intend to test my station again, stripping it of any unnecessary
>> add-ons, such as one suspicious USB connected, cheap, multiple card
>> reader (never used it). Also, I will test this issue on a couple of
>> stations nearby.
>>
>> However as I'm dealing with this issue for a long time now and already
>> accustomed to restarting smbd and hardware testing will require
>> switching off the system, grabbing a screwdriver, bringing in the
>> compressor to to clean the unit, its neighbors and all the stuff we
>> should do given he opportunity, I think it won't be done during this
>> long weekend (beginning on Thursday).
> ...
>
> I wonder if the problem is related to your Firestarter. I had installed
> Firestarter on my laptop for testing, closed it down, did some kernel
> updates, and tried to connect to the laptop from my desktop via samba &
> couldn't. Firestarter wasn't running.
>
> $ smbclient -L //127.0.0.1
>
> wasn't finding the laptop (even after restarting smbd & nmbd). It now does.
>
> I then purged Firestarter on the laptop & rebooted & now I find and
> connect to the laptop shares from the just fine. I'm too tired digg into
> it further tonight, but it's something you might consider investigating.

G.

As intended, stripped down my hardware and thoroughly tested the
behavior of the smbd daemon. Removed Firestarter and iptables are now
as naked as a newborn. USB ports at use:  the printers, a mouse and a
camera (forgot to remove it but it is more recent than the problem).

Conclusion: in my station it doesn't work, neither on Maverick 64 or
Natty 64. Something blocks the daemon's auto reload function. So the
parameter "printcap cache time ="  is useless. Note that the Natty
install is bare, almost nothing but the default itens.

On a headless Lucid 64 station nearby, the adding or removing of a
printer from Cups server is almost immediately reflected by the
command sbmclient -L [IP], indicating the daemon is working.

A typical segment of the Maverick 64 /var/log/samba/smbd log file at
the faulty station is:

[begin]

[2011/04/22 12:53:21,  0] smbd/server.c:1123(main)  smbd version 3.5.4 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2010
[2011/04/22 12:53:21.406311,  0]
printing/print_cups.c:108(cups_connect)  Unable to connect to CUPS
server localhost:631 - Connection refused
[2011/04/22 12:53:21.411729,  0]
printing/print_cups.c:108(cups_connect)  Unable to connect to CUPS
server localhost:631 - Connection refused

{(above) normal, denotes cups starting after smbd, a known bug}

[2011/04/22 12:53:21.412194,  0] smbd/server.c:1169(main)  standard
input is not a socket, assuming -D option

{standard, also appears at the functional station}

[2011/04/22 12:53:21.418346,  0]
smbd/server.c:500(smbd_open_one_socket) smbd_open_once_socket:
open_socket_in: Address already in use
[2011/04/22 12:53:21.418455,  0]
smbd/server.c:500(smbd_open_one_socket) mbd_open_once_socket:
open_socket_in: Address already in use
[2011/04/22 12:53:21.419338,  0] smbd/server.c:281(remove_child_pid)
Could not find child 1146 -- ignoring

{these previous lines probably contain the clue, they are also present
at Natty's log, it looks like smbd is unable to open a needed socket
for the service daemon - ran socklist and checked /etc/init/smbd.conf
but haven't a clue about what socket it might be, perhaps the author,
Steve Langasek <steve.langasek at ubuntu.com> knows what is all about}

[2011/04/22 12:53:27.158123,  1] smbd/process.c:776(smbd_sig_hup_handler)
  Reloading services after SIGHUP
[2011/04/22 12:53:27.171400,  0] smbd/server.c:281(remove_child_pid)
Could not find child 2170 -- ignoring
[2011/04/22 13:12:40,  0] smbd/server.c:1123(main)

{displayed after forcing a smdb reload - this SIGHUP should run at
intervals set by  "printcap cache time =" }

[end]

After this I gave up and decided to apply the simple transitory patch
recommended at https://bugs.launchpad.net/ubuntu/+source/cups/+bug/494141,
 added '/sbin/reload smbd' at the end of /etc/rc.local. Although the
daemon still doesn't work, at least the Cups printers are loaded just
after startup.

So, now my rc.local now looks like this:

 #!/bin/sh -e
 # [snip]
 /sbin/reload smbd
 exit 0

L.

-- 
Lucio M. Nicolosi, Eng.
Open Source Platform Implementation
System and Applications
GNU/Linux - Ubuntu




More information about the ubuntu-users mailing list