← Back to team overview

enterprise-support team mailing list archive

[Bug 1731502] Re: package samba 2:4.6.7+dfsg-1ubuntu3 [origin: Ubuntu] failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

 

Thanks for filing this bug in Ubuntu.

Job for nmbd.service failed because a timeout was exceeded.
See "systemctl  status nmbd.service" and "journalctl  -xe" for details.
invoke-rc.d: initscript nmbd, action "start" failed.
● nmbd.service - Samba NMB Daemon
   Loaded: loaded (/lib/systemd/system/nmbd.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Fri 2017-11-10 09:51:44 CST; 32ms ago
     Docs: man:nmbd(8)
           man:samba(7)
           man:smb.conf(5)
 Main PID: 8674
   Status: "nmbd: No local IPv4 non-loopback interfaces available, waiting for interface ..."

What happened is that systemd gave up waiting for nmbd to notify it that
it started up fully. In this case, nmbd didn't make that notification
because there was no networking available.

While nmbd can and will just wait forever, systemd is expecting a
notification and if one doesn't arrive in 90s it will decide the service
failed to start.

I believe in your case this is happening because you only get networking
after you login on your system, probably via wifi.

I filed this bug upstream in samba about this problem:
https://bugzilla.samba.org/show_bug.cgi?id=13111

I will use this Ubuntu bug to track this issue.

** Bug watch added: Samba Bugzilla #13111
   https://bugzilla.samba.org/show_bug.cgi?id=13111

** Summary changed:

- package samba 2:4.6.7+dfsg-1ubuntu3 [origin: Ubuntu] failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
+ nmbd starts fine with no interfaces, but doesn't notify systemd that it started

** Changed in: samba (Ubuntu)
       Status: New => Triaged

** Changed in: samba (Ubuntu)
   Importance: Undecided => Low

** Also affects: samba via
   https://bugzilla.samba.org/show_bug.cgi?id=13111
   Importance: Unknown
       Status: Unknown

** Description changed:

- na
+ nmbd seems to start fine when there are no non-loopback interfaces up,
+ and will loop indefinitely:
+ 
+         /* We only count IPv4, non-loopback interfaces here. */
+         while (iface_count_v4_nl() == 0) {
+             sleep(5);
+             load_interfaces();
+         }
+ 
+ It can happen that during boot there is really no interface available,
+ because, for example, it's a desktop connected via wifi and the wireless
+ connection is only established after the user logs in.
+ 
+ nmbd will happily start up and wait for an interface, but systemd is expecting a notification because the Type is set to notify:
+ $ cat packaging/systemd/nmb.service 
+ [Unit]
+ Description=Samba NMB Daemon
+ After=syslog.target network.target
+ 
+ [Service]
+ Type=notify
+ (...)
+ 
+ So after about 1m30s without a notification from nmbd, systemd will just
+ kill it:
+ 
+ Oct 30 14:25:51 artful-samba-init systemd[1]: nmbd.service: Supervising process 171 which is not our child. We'll most likely not notice when it exits.
+ ...
+ Oct 30 14:27:21 artful-samba-init systemd[1]: nmbd.service: Start operation timed out. Terminating.
+ Oct 30 14:27:21 artful-samba-init systemd[1]: nmbd.service: Killing process 171 (nmbd) with signal SIGKILL.
+ Oct 30 14:27:21 artful-samba-init systemd[1]: nmbd.service: Killing process 171 (nmbd) with signal SIGKILL.
+ Oct 30 14:27:21 artful-samba-init systemd[1]: Failed to start Samba NMB Daemon.
+ Oct 30 14:27:21 artful-samba-init systemd[1]: nmbd.service: Unit entered failed state.
+ Oct 30 14:27:21 artful-samba-init systemd[1]: nmbd.service: Failed with result 'timeout'.
+ 
+ 
+ --- Original description ---
  
  ProblemType: Package
  DistroRelease: Ubuntu Kylin 17.10
  Package: samba 2:4.6.7+dfsg-1ubuntu3 [origin: Ubuntu]
  ProcVersionSignature: Ubuntu 4.13.0-17.20-lowlatency 4.13.8
  Uname: Linux 4.13.0-17-lowlatency x86_64
  ApportVersion: 2.20.7-0ubuntu3.2
  Architecture: amd64
  Date: Fri Nov 10 09:51:44 2017
  ErrorMessage: subprocess installed post-installation script returned error exit status 1
  InstallationDate: Installed on 2017-10-19 (22 days ago)
  InstallationMedia: Ubuntu-Studio 17.04 "Zesty Zapus" - Release amd64 (20170412)
  Python3Details: /usr/bin/python3.6, Python 3.6.3, python3-minimal, 3.6.3-0ubuntu2
  PythonDetails: /usr/bin/python2.7, Python 2.7.14, python-minimal, 2.7.14-2ubuntu1
  RelatedPackageVersions:
-  nautilus 1:3.26.0-0ubuntu1
-  gvfs     1.34.1-1ubuntu1
+  nautilus 1:3.26.0-0ubuntu1
+  gvfs     1.34.1-1ubuntu1
  SambaClientRegression: No
  SourcePackage: samba
  Title: package samba 2:4.6.7+dfsg-1ubuntu3 [origin: Ubuntu] failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
  UpgradeStatus: No upgrade log present (probably fresh install)

** Changed in: samba (Ubuntu)
   Importance: Low => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to samba in Ubuntu.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/1731502

Title:
  nmbd starts fine with no interfaces, but doesn't notify systemd that
  it started

To manage notifications about this bug go to:
https://bugs.launchpad.net/samba/+bug/1731502/+subscriptions