Windows clients cannot connect unless Samba manually restarted

Bug #554094 reported by Charles Burns on 2010-04-02
32
This bug affects 4 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: samba

Windows clients cannot connect to the server after the server is restarted. The samba process is running according to
 "status smbd" and is working fine according to "smbstatus".

This has been the case since updating the server from 9.10 to 10.04 Beta (fresh reinstall),

The Windows clients cannot reconnect, even after rebooting them, until samba is manually restarted on the server with "restart smbd"

Once this is done, Windows clients can immediately connect.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: samba 2:3.4.7~dfsg-1ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-19.28-server 2.6.32.10+drm33.1
Uname: Linux 2.6.32-19-server x86_64
NonfreeKernelModules: binfmt_misc ppdev fbcon tileblit font bitblit softcursor vga16fb vgastate radeon ttm drm_kms_helper lp psmouse drm i2c_algo_bit serio_raw i3000_edac parport edac_core shpchp usbhid hid mptsas mptscsih mptbase scsi_transport_sas ahci e1000e
Architecture: amd64
Date: Fri Apr 2 10:54:10 2010
InstallationMedia: Ubuntu-Server 10.04 "Lucid Lynx" - Beta amd64 (20100317)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SambaServerRegression: Yes
SourcePackage: samba
UbuntuFailedConnect: Yes

Charles Burns (charlesnburns) wrote :
Chuck Short (zulcss) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it without more information.

Please include the information requested at https://wiki.ubuntu.com/DebuggingSamba#samba-server.

Changed in samba (Ubuntu):
status: New → Incomplete
importance: Undecided → Low
Charles Burns (charlesnburns) wrote :

Requested information:

# dpkg-query -W -f='${Package} ${Version} ${Source} ${Status}\n' | grep samba
libpam-smbpass 2:3.4.7~dfsg-1ubuntu1 samba install ok installed
libsmbclient 2:3.4.7~dfsg-1ubuntu1 samba install ok installed
libwbclient0 2:3.4.7~dfsg-1ubuntu1 samba install ok installed
samba 2:3.4.7~dfsg-1ubuntu1 install ok installed
samba-common 2:3.4.7~dfsg-1ubuntu1 samba install ok installed
samba-common-bin 2:3.4.7~dfsg-1ubuntu1 samba install ok installed
samba-doc 2:3.4.7~dfsg-1ubuntu1 samba install ok installed
smbclient 2:3.4.7~dfsg-1ubuntu1 samba install ok installed
smbfs 2:3.4.7~dfsg-1ubuntu1 samba install ok installed
winbind 2:3.4.7~dfsg-1ubuntu1 samba install ok installed

Which clients are failing to connect?
Windows 7 (laptop, wireless) and Windows 7 (Desktop). I suspect other systems, at least Windows systems (XP, etc.) would exhibit the same behavior.

Charles Burns (charlesnburns) wrote :

Attached is smb.conf

Charles Burns (charlesnburns) wrote :

Attached is the smb.conf from the previous configuration. The differences should be minor and unrelated to the issue, but I've attached it in case I am wrong. This configuration worked on the previous setup with Ubuntu 9.10. When the server was restarted, Windows systems could resume share connections within about 20 seconds of the samba service starting (with no restart required)

Thierry Carrez (ttx) wrote :

How is network defined on this server ? Through /etc/network/interfaces, or with network-manager (samba running on a desktop machine with a GUI) ?

Charles Burns (charlesnburns) wrote :

The network is defined in /etc/network/interfaces as follows:
####################################
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
####################################
The motherboard has two NICs, but only one is in use. both are Intel GBit. The IP is assigned by a separate router configured to always give the server the same IP address (10.0.0.2).

Charles Burns (charlesnburns) wrote :

The following is the only log entry made after last server reboot. This is after the most recent 10.04 updates. I've also updated the clients and rebooted them, and they still cannot connect (until Samba is restarted). Only the last two entries are of the right time:

charles@sheridan:/var/log/samba$ tail log.smbd
  charles-pc (10.0.0.42) closed connection to service common
[2010/04/16 10:30:26, 1] smbd/service.c:1240(close_cnum)
  charles-pc (10.0.0.42) closed connection to service music
[2010/04/16 10:30:26, 1] smbd/service.c:1240(close_cnum)
  charles-pc (10.0.0.42) closed connection to service charles
[2010/04/16 12:27:59, 0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2010/04/16 12:28:00, 0] smbd/server.c:1115(main)
  standard input is not a socket, assuming -D option

I also ensured that Samba is, in fact, running:

charles@sheridan:/var/log/samba$ ps ax | grep mbd
  858 ? Ss 0:00 smbd -F
  979 ? S 0:00 smbd -F
 1457 ? Ss 0:00 nmbd -D
 1790 pts/0 S+ 0:00 grep mbd

Please let me know if any other information is needed. I'll even provide a shell account, as this is not a mission-critical server.

Thierry Carrez (ttx) on 2010-04-26
Changed in samba (Ubuntu):
status: Incomplete → New
Rene (rene-gr) wrote :

same problem here:

running on ubuntu 10.04 (GNOME; upgraded from working 9.10):

log.smbd after restart:

>[2010/05/13 13:32:02, 0] smbd/server.c:1069(main)
  smbd version 3.4.7 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2009
[2010/05/13 13:32:02, 0] smbd/server.c:1115(main)
  standard input is not a socket, assuming -D option

local connection work just fine (Connect to Server --> localhost --> works)
but trying to connect from my mac it stays in "connection - loop" no response.

Thierry Carrez (ttx) wrote :

I'm trying to see if it's a timing issue...

Charles: Could you try to temporarily define a static address in /etc/network/interfaces, reboot and see if samba works "out-of-the-boot" ?

Rene: are you also using DHCP ?

Changed in samba (Ubuntu):
importance: Low → Medium
status: New → Incomplete
Maksims M. (makson) wrote :

 Hello,

I have same problem. I do not use dhcp-client, I use static IP addresses. In my case I use samba on two interfaces : br0 and ath0 .
/etc/network/interfaces (part):
auto br0
iface br0 inet static
        address 192.168.2.1
        network 192.168.2.0
        netmask 255.255.255.0
        broadcast 192.168.2.255
        bridge_ports eth1 eth2

auto ath0
iface ath0 inet static
        wireless-mode master
        wireless-essid HomeAPn
        wireless-channel 4
        address 192.168.3.1
        netmask 255.255.255.0
        broadcast 192.168.3.255

Thierry Carrez (ttx) wrote :

Is nmbd running ? Samba needs both nmbd and smbd running and sometimes on Lucid nmbd fails to start at boot, see bug 596064 and bug 572410

Maksims M. (makson) wrote :

 Yes it is running. Also, other way, restarting only smbd would not help.

Thierry Carrez (ttx) on 2010-08-12
Changed in samba (Ubuntu):
status: Incomplete → Confirmed
Ole Jakob Skjelten (olesk) wrote :

I have experienced exactly the same. Additionally, the Avahi daemon for Mac connections also suffers from the same problem. I noticed that a new version of upstart has been released and my new issues with smbd and avahi occured after that, so perhaps there is a problem with upstart not getting an event or not waiting for one?

Charles Burns (charlesnburns) wrote :

This problem appears to be resolved with a recent update. I've restarted my server and Samba came right up.

Ole Jakob Skjelten (olesk) wrote :

On my fully patched (today) Lucid installation this problem persists, both with samba and avahi. I still suspect upstart to be the sinner, but I haven't had time to dig through the logs yet. Since this happened to me with several network services (Ubuntu box is server for PCs and Macs) and both daemons fail to start automatically, I do not think this is an smbd issue, but rather that this is a symptom pf events in upstart not triggering during boot. Can someone prove me wrong who relies on rc scripts rather than upstart events for starting these services?

Thierry Carrez (ttx) wrote :

Marking samba task fixed, based on OP report (was probably a dupe of bug 572410).
Ole Jakob Skjelten: if you can isolate a generic issue with upstart, you should probably file a specific upstart bug.

Changed in samba (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers