Samba (nmbd) fails to start at boot

Bug #582376 reported by Raffaele Sgarro
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
NULL Project
Invalid
Undecided
Unassigned
samba (Ubuntu)
Incomplete
Medium
Unassigned

Bug Description

I have a wireless connection so, at boot - maybe also due to Lucid short cold boot - my network isn't up. This causes my nmbd process (a smbd related daemon) to return without letting me accessing my samba shares. In order to do this I have to manually run `sudo service nmbd start` and everything goes fine. Only a minor issue, I know, but for less experienced users it may cause troubles. (Actually, I had to ask ubuntuforums.org for a solution)

affects: upstart → null
Changed in null:
status: New → Invalid
Revision history for this message
Raffaele Sgarro (raffaelesgarro) wrote :

Scott, why do you think this is not a bug? The daemon fails to start at boot time and samba shares are not available. The nmbd daemon should start when network is up

Revision history for this message
Thierry Carrez (ttx) wrote :

Raffaele: this is not an upstart project issue, that's why Scott marked it as Invalid. That would rather be a bug in the samba upstart script (samba package), if any.

The nmbd upstart script has "start on (local-filesystems and net-device-up IFACE!=lo)" so it should be started when another interface goes up. Could you confirm that nmbd doesn't start automatically once you log in and wlan0 goes up ?

Changed in samba (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Raffaele Sgarro (raffaelesgarro) wrote :

Thx thierry
I can confirm this, although everything seems ok. Where is the upstart script located?

Revision history for this message
Thierry Carrez (ttx) wrote :

The upstart script is located at /etc/init/nmbd.conf
Is there anything showing up about starting failure in /var/log/syslog, /var/log/boot.log or /var/log/samba/* ?
Could you attach the information required at https://wiki.ubuntu.com/DebuggingSamba#Samba%20as%20a%20server

Revision history for this message
Hadmut Danisch (hadmut) wrote :

I'm coming from bug #590862 which was marked as a duplicate of this bug. And I had been asked to outline my network configuration.

No, there is no error message in nmbd.log at all. The reason for not starting is not a failure in configuration. It always starts properly when I launch it manually with service nmbd start.

On that machine I am using just a static ethernet network configuration.

I'll attach my /etc/network/interfaces file.

As far as I can see the problem is that nmbd is simply not always started at boottime. Interestingly I found it to be running in rare cases.

My guess is that there is a timing problem with the net-device-up signal.

The major problem might be the lack of proper documentation for the upstart code (and an increasing ignorance of the upstart maintainers).

Revision history for this message
Hadmut Danisch (hadmut) wrote :
Revision history for this message
spacefight (spacefight) wrote :

I second the bug. nmdb is not running while smdb is running fine, starting manually works withouth any problems. log.nmdb is not showing anything, obviously.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# configure the static ip address
auto eth1
iface eth1 inet static
        address 192.168.0.12
        netmask 255.255.255.0
        broadcast 192.168.0.255
        up route add default gw 192.168.0.190
        down route del default

Revision history for this message
Thierry Carrez (ttx) wrote :

Is there anything showing up about starting failure in /var/log/syslog, /var/log/boot.log or /var/log/samba/* ?
Could you attach the information required at
https://wiki.ubuntu.com/DebuggingSamba#Samba%20as%20a%20server

Revision history for this message
spacefight (spacefight) wrote :

No, no messages regarding nmbd not starting/failing at all in any of those logs, I've checked them all.

Revision history for this message
Thierry Carrez (ttx) wrote :

Maybe this is a duplicate of bug 596064 -- could you try commenting the two lines in /etc/init/nmbd.conf as suggested there ?

Revision history for this message
michael brenden (mike-brenden) wrote :

smbd is running, started ok at box boot.

nmbd is not running at box boot.

% status nmbd
nmbd stop/waiting

% service nmbd start
start: Job failed to start
%tail /var/log/daemon.log
Jul 13 09:22:10 seed init: nmbd pre-start process (1079) terminated with status 127

Looking at <bug 596064>, it appears my system, stock Ubuntu Server LTS 10.04 has no testparm in the PATH...very odd. Will post follow up in a few hours. You know the unhappy truth is Upstart project is going to catch much flak for all the mess that's been compounding for decades in the outdated sysV init way...

Revision history for this message
michael brenden (mike-brenden) wrote :

Ok, commented the two pre-script commands mentioned in <bug 596064>, followed by service nmbd start, and -BWAP- immediate, flawless execution. When this stuff works great it is SO GREAT...and when idiocy creeps in, well.... now, as to why testparm didn't install, or where it disappeared to ..... eeesh

Revision history for this message
bkrzem (bkrzem) wrote :

I am on a netbook with Maverick Meerkat and have the same problem. I seem to have fixed it by changing
/etc/init/nmbd.conf line
   start on (local-filesystems and net-device-up IFACE!=lo)
to
   start on (local-filesystems)

Revision history for this message
puppet (puppet-trash) wrote :

@bkrzem: you're fu****g right! I've been struggling with this for a week and the solution was so simple!

Revision history for this message
puppet (puppet-trash) wrote :

ah... and this bug IS NOT a duplicate of bug #572410 (IMHO of course...) as testparm was installed and perfectly working.

Revision history for this message
Dejan (dejan-rodiger) wrote :

Hi,

I have static IP address set and my nmbd doesn't start automatically. "sudo service nmbd start" is working OK and nmbd starts, but nmbd doesn't start after boot.

I tried with suggested changing /etc/init/nmbd.conf, but nmbd doesn't start and I found this in dmesg:

2018 mynamexxx@server /etc % dmesg|grep nmb
[ 35.206891] init: nmbd main process (1412) terminated with status 1
[ 35.206941] init: nmbd main process ended, respawning
[ 35.248705] init: nmbd main process (1509) terminated with status 1
[ 35.248739] init: nmbd main process ended, respawning
[ 35.271393] init: nmbd main process (1517) terminated with status 1
[ 35.271431] init: nmbd main process ended, respawning
[ 36.331176] init: nmbd main process (1523) terminated with status 1
[ 36.331214] init: nmbd main process ended, respawning
[ 36.353534] init: nmbd main process (1568) terminated with status 1
[ 36.353573] init: nmbd main process ended, respawning
[ 36.378882] init: nmbd main process (1578) terminated with status 1
[ 36.378922] init: nmbd main process ended, respawning
[ 36.400740] init: nmbd main process (1586) terminated with status 1
[ 36.400779] init: nmbd main process ended, respawning
[ 36.422524] init: nmbd main process (1592) terminated with status 1
[ 36.422562] init: nmbd main process ended, respawning
[ 36.449262] init: nmbd main process (1600) terminated with status 1
[ 36.449300] init: nmbd main process ended, respawning
[ 36.472198] init: nmbd main process (1606) terminated with status 1
[ 36.472240] init: nmbd main process ended, respawning
[ 36.494553] init: nmbd main process (1614) terminated with status 1
[ 36.494591] init: nmbd respawning too fast, stopped

I am using Ubuntu 11.10 which was upgraded from 11.04 and 10.10 and 10.04.

Revision history for this message
Alek Silver (aleksilver) wrote :

I have confirmed the same bug., but haven't tried modifying modifying /etc/init/nmbd.conf yet.

After a reboot, I just type:

sudo nmdb

and it all works for me.

I have this problem on my static IP computer, but not on my dynamic IP computer.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.