Public bug reported:

Binary package hint: samba

Ubuntu 8.10
Samba 2:3.2.3-1ubuntu3.4

I just found an answer to a nasty Samba problem that I was having since
upgrading my server to Intrepid 8.10

First the problem:

Every single Windows machine (all Win XP SP3) on my home network once in
a while looses connection (mapping) of network drives from Samba. It
keeps seeing other Windows machine shares, but not Ubuntu ones. It
started happening right after upgrade to Intrepid 8.10.

If I try to open shared location by UNC, such as \\fs\share1, I'm
getting a request for the password, but nothing happens after password
entry - the password dialog keeps coming back. If I enter \\fs in
Explorer, it opens an empty view under My Network Places > Entire
Network > Web Client Network, not under Microsoft Windows Network as it
would happen normally when Samba connection works. Needless to say that
all the shares from that server fall off at that time, and cannot be
reconnected by any woodoo that I could think of with that machine
(reboots, moving the order of providers for Web Client Network, etc.)

Peculiar part is that all other machines are quite happy and can see the
shares, until its their time to flake out.

My server is configured to run Samba+winbind, Apache and has WebDAV
module for apache. It is further configured as wins server for the
network.

I found one temporary rework - if I stop apache server, restart samba
and restart windows machine that flaked out, then I can reconnect the
shares. Then I can restart apache, and all seems normal again, until
this or some other machine flakes out.

I searched the net low and high for many days. Noone seems to encounter
that exact problem like I did, but some pointers suggested that WebDAV
handling on Windows has problems. Wait, how's it a Samba bug? Read on...

Changing RUN_MODE=inet to RUN_MODE=daemons in /etc/default/samba solves
the problem for good, and no change is needed on Windows side - all XP
machines are working fine with that.

It appears that Intrepid 8.10 introduced daemons vs. inet RUN_MODE in
/etc/default/samba, and it prefers to switch it to "inet".

What it means in practice, is that inet (being from xinetd or inetd
package) is responsible to start samba as soon as any client machine
tries to open its socket, instead of keeping samba as daemon in memory
ready kick in.

My guess is that this additional time that is required to start new
process from inet, load it from disk, let it read its config files, and
finally respond to the request, it causes windows smb/cifs to timeout
once in a while (it is my pure speculation), and this causes windows to
go further down the list of providers to WebDAV service, which finds
apache/WebDAV on the same server, happily reports that there is in fact
such resource, and it kicks SMB share into this WebDAV mode which does
not have a simple recovery. Switching to "daemons" makes samba readily
available on its socket, no timeout happens, and Windows never tries
WebDAV. I might be completely wrong here, but hey, this "daemons" mode
solves this problem - which makes it a Samba bug.

** Affects: samba (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: samba webdav windows

-- 
WebDAV fights Samba, WebDAV wins, Windows looses. Blame it on RUN_MODE=inet.
https://bugs.launchpad.net/bugs/378920
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to samba in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to