smbd does not start on first boot with 20110426

Bug #771305 reported by Jamie Strandboge on 2011-04-26
38
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Release Notes for Ubuntu
Undecided
Unassigned
samba (Ubuntu)
Medium
Ubuntu Server Team
Natty
Medium
Ubuntu Server Team
Oneiric
Medium
Ubuntu Server Team

Bug Description

Binary package hint: samba

Fresh install using natty/amd64 20110426 and choosing the samba task (http://iso.qa.ubuntu.com/qatracker/result/5709/186). After reboot smbd does not start. Attached is tarball of /var/log/samba and /var/log/syslog. Same problem on each reboot. Samba starts successfully after login with 'sudo stop smbd ; sudo start smbd'.

This happened with 20110425 too, but I only made a comment in the iso tracker rather than a bug thinking it was intermittent, but it isn't.

Jamie Strandboge (jdstrand) wrote :
Jamie Strandboge (jdstrand) wrote :
description: updated
description: updated
tags: added: iso-testing
James Hunt (jamesodhunt) wrote :

Hi Jamie - your syslog shows that Upstart attempted to restart smbd a number of times, but since smbd kept exiting in error, it eventually hit the upstart respawn limit at which point Upstart stopped attempting to start it.

The problem suggests an issue either with the smbd binary or one of the files it reads (maybe an invalid /etc/samba/smb.conf?)

Robbie Williamson (robbiew) wrote :

I wonder if this is related to bug 750786

Changed in samba (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Ubuntu Server Team (ubuntu-server)
Changed in samba (Ubuntu Natty):
milestone: none → natty-updates
Changed in samba (Ubuntu Oneiric):
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Ubuntu Server Team (ubuntu-server)
Robbie Williamson (robbiew) wrote :

Ubuntu Server 11.04 Release Note:

After choosing the samba task during install, smbd will not start after reboot. Users can start samba after login by running: 'sudo stop smbd ; sudo start smbd'.

Changed in ubuntu-release-notes:
status: New → Fix Released
Jamie Strandboge (jdstrand) wrote :

@James,

This is a default install with no configuration. After reboot I can login and start smbd by hand manually with no problems (ie, without changing /etc/samba/smb.conf). These were the interesting lines in /var/log/samba/log.smbd:

[2011/04/26 10:07:06, 0] smbd/server.c:1123(main)
  smbd version 3.5.8 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2010
[2011/04/26 10:07:06.485135, 0] printing/print_cups.c:108(cups_connect)
  Unable to connect to CUPS server localhost:631 - Network is unreachable
[2011/04/26 10:07:06.514425, 0] printing/print_cups.c:108(cups_connect)
  Unable to connect to CUPS server localhost:631 - Network is unreachable
[2011/04/26 10:07:06.548629, 0] lib/interface.c:519(load_interfaces)
  ERROR: Could not determine network interfaces, you must use a interfaces config line

These are repeated over and over until the upstart respawn limit is reached. This looks to me to be some sort of missing networking item in the upstart job (smbd.conf only has 'start on local-filesystems'), but I am not an upstart expert....

C de-Avillez (hggdh2) wrote :

Actually, it seems the network is not up yet:

  smbd version 3.5.8 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2010
[2011/04/26 10:07:03.860866, 0] printing/print_cups.c:108(cups_connect)
  Unable to connect to CUPS server localhost:631 - Network is unreachable <<===
[2011/04/26 10:07:03.885855, 0] printing/print_cups.c:108(cups_connect)
  Unable to connect to CUPS server localhost:631 - Network is unreachable <<===
[2011/04/26 10:07:03.912124, 0] lib/interface.c:519(load_interfaces)
  ERROR: Could not determine network interfaces, you must use a interfaces config line <<===
[2011/04/26 10:07:03, 0] smbd/server.c:1123(main)

C de-Avillez (hggdh2) wrote :

BTW, I cannot reproduce on the standard ISO tests on Jenkins.

Chuck Short (zulcss) wrote :

It looks like it needs the following now:

start on (local-filesystems and net-device-up IFACE!=lo)

Clint Byrum (clint-fewbar) wrote :

I don't think IFACE!=lo is needed .. just net-device-up. It just needs *something*, and making it IFACE!=lo will mean it doesn't come up until the user has brought up wifi connections and such.. which may be a bit late if they want to test samba in a no-network situation.

Accepted samba into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in samba (Ubuntu Natty):
status: Confirmed → Fix Committed
tags: added: verification-needed
Jamie Strandboge (jdstrand) wrote :

TEST CASE
1. install samba via tasksel
2. reboot
3. pgrep smbd

After reboot smbd should start, but does not with 2:3.5.8~dfsg-1ubuntu2. When testing packages in -proposed, upgrade then reboot and run pgrep.

Jamie Strandboge (jdstrand) wrote :

Upgraded to 2:3.5.8~dfsg-1ubuntu2.1 in natty-proposed, and after several reboots, smbd always starts. Marking 'verification-done'.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package samba - 2:3.5.8~dfsg-1ubuntu2.1

---------------
samba (2:3.5.8~dfsg-1ubuntu2.1) natty-proposed; urgency=low

  * debian/samba.smbd.upstart: Do not attempt to start smbd until network
    device is up, previously smbd was starting too early and often failing.
    (LP: #771305)
 -- Dave Walker (Daviey) <email address hidden> Thu, 28 Apr 2011 10:45:32 +0100

Changed in samba (Ubuntu Natty):
status: Fix Committed → Fix Released
Martin Pitt (pitti) wrote :

Copied to oneiric as well.

Changed in samba (Ubuntu Oneiric):
status: Confirmed → Fix Released
cremersdh (cremersdh) wrote :

I am using Natty with this update (2:3.5.8~dfsg-1ubuntu2.1) but still have to start samba manually because it is starting before networkmanager starts and doing so fails.....

cremersdh (cremersdh) wrote :

I solved my problem.

What made my situation different, I think, and caused my problem was the binding I made in /etc/samba/smb.conf under [global] to one of my interfaces.
I did that as following:
   [global]
   bind interfaces only = yes
   interfaces = 192.168.123.123

I now changed the line with "start-on" in /etc/init/smbd.conf to the following
   start on (local-filesystems and net-device-up IFACE=eth0 and started udev-finish)

Ssmdb now waits and it starts automatically when I boot my system and I don't need to start it manually anymore (finally)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers