Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 515684 - net-fs/samba-3.6.23-r1 - nmbd.service: main process exited, code=exited, status=1/FAILURE - ../lib/util/util_net.c:70(interpret_string_addr_internal) interpret_string_addr_internal: getaddrinfo failed for name 0.0.0.0 [Address family for hostname not su
Summary: net-fs/samba-3.6.23-r1 - nmbd.service: main process exited, code=exited, stat...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-29 17:26 UTC by Chris Smith
Modified: 2020-01-07 20:20 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Smith 2014-06-29 17:26:43 UTC
nmbd.service fails to start on boot

The results show systemd:
"Starting Samba NetBIOS name server..."
followed by:
nmbd.service: main process exited, code=exited, status=1/FAILURE
later we see:
eno1: rebinding lease of 172.27.12.66

Apparently attempting to start nmbd before the interface has an IP address is somehow problematic.

This was previously working although I can't say for sure the problem started with the systemd-214 update.

Reproducible: Always

Actual Results:  
Jun 29 12:47:29 sartre systemd[1]: Starting Network is Online.
Jun 29 12:47:29 sartre systemd[1]: Reached target Network is Online.
Jun 29 12:47:29 sartre systemd[1]: Starting Samba NetBIOS name server...
Jun 29 12:47:29 sartre systemd[1]: Starting Vsftpd ftp daemon...
Jun 29 12:47:29 sartre dhcpcd[460]: DUID 00:01:00:01:0f:2c:94:65:00:16:76:aa:bf:70
Jun 29 12:47:29 sartre dhcpcd[460]: eno1: IAID 00:e3:63:00
Jun 29 12:47:29 sartre libvirtd[512]: 2014-06-29 16:47:29.736+0000: 512: info : libvirt version: 1.2.5
Jun 29 12:47:29 sartre libvirtd[512]: 2014-06-29 16:47:29.736+0000: 512: warning : virGetHostname:654 : getaddrinfo failed 
Jun 29 12:47:29 sartre systemd[1]: Started OpenSSH server daemon.
Jun 29 12:47:29 sartre systemd[1]: Started Samba NetBIOS name server.
Jun 29 12:47:29 sartre systemd[1]: Starting Samba SMB/CIFS server...
Jun 29 12:47:29 sartre sshd[544]: Server listening on 0.0.0.0 port 6067.
Jun 29 12:47:29 sartre sshd[544]: Server listening on :: port 6067.
Jun 29 12:47:29 sartre systemd[1]: nmbd.service: main process exited, code=exited, status=1/FAILURE
Jun 29 12:47:29 sartre systemd[1]: Unit nmbd.service entered failed state.
Jun 29 12:47:29 sartre systemd[1]: Started Virtualization daemon.
Jun 29 12:47:29 sartre dhcpcd[460]: eno1: rebinding lease of 172.27.12.66
Jun 29 12:47:29 sartre systemd[1]: Started Samba SMB/CIFS server.


Attempting to fix the issue per:
http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

I edited the nmbd.service file to read:
After=network-online.target
Wants=network-online.target

instead of:
After=network.target

and enabled:
systemd-networkd-wait-online.service

the effects of which can be seen in the above results, to no avail
Comment 1 Mike Gilbert gentoo-dev 2014-06-30 04:57:54 UTC
What version of samba?
Comment 2 Chris Smith 2014-06-30 12:04:48 UTC
(In reply to Mike Gilbert from comment #1)
> What version of samba?

net-fs/samba-3.6.23-r1
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2014-06-30 14:56:42 UTC
Please post the relevant output from nmbd. It might be located in /var/log/samba/.
Comment 4 Chris Smith 2014-06-30 17:38:46 UTC
I'm aware of bug 500922, this occur without the bind interfaces directive.
Comment 5 Chris Smith 2014-06-30 18:48:09 UTC
(In reply to Jeroen Roovers from comment #3)
> Please post the relevant output from nmbd. It might be located in
> /var/log/samba/.

At log level = 5:

[2014/06/30 14:44:34,  4] param/loadparm.c:9608(lp_load_ex)
  pm_process() returned Yes
[2014/06/30 14:44:34,  5] ../lib/util/charset/codepoints.c:235(map_locale)
  Substituting charset 'UTF-8' for LOCALE
[2014/06/30 14:44:34,  3] nmbd/nmbd.c:383(reload_nmbd_services)
  services not loaded
[2014/06/30 14:44:34,  5] lib/util.c:242(init_names)
  Netbios name list:-
  my_netbios_names[0]="SARTRE"
[2014/06/30 14:44:34,  2] nmbd/nmbd.c:894(main)
  Becoming a daemon.
[2014/06/30 14:44:34,  4] lib/time.c:384(TimeInit)
  TimeInit: Serverzone is 14400
[2014/06/30 14:44:34,  3] nmbd/nmbd.c:963(main)
  Opening sockets 137
[2014/06/30 14:44:34,  3] ../lib/util/util_net.c:70(interpret_string_addr_internal)
  interpret_string_addr_internal: getaddrinfo failed for name 0.0.0.0 [Address family for hostname not supported]
[2014/06/30 14:44:34,  0] nmbd/nmbd.c:690(open_sockets)
Comment 6 Mike Gilbert gentoo-dev 2014-06-30 20:18:55 UTC
Would you mind attaching your smb.conf file as well?
Comment 7 Chris Smith 2014-06-30 20:25:42 UTC
(In reply to Mike Gilbert from comment #6)
> Would you mind attaching your smb.conf file as well?

Here's the global section which should be entirely sufficient:
[global]
workgroup = GRIZZLY
netbios name = SARTRE
server string = Bears will kill you
name resolve order = wins host bcast
local master = yes
preferred master = yes
domain master = yes
domain logons = yes
security = user
socket options = TCP_NODELAY SO_KEEPALIVE
wins support = yes
passdb backend = tdbsam
log file = /var/log/samba/%m.log
max log size = 500
log level = 1
map to guest = bad user
dns proxy = no
username map = /etc/samba/smbusers
use sendfile = yes
host msdfs = no
msdfs root = no
max protocol=SMB2
unix extensions = no
disable netbios = no
smb ports = 445 139
enhanced browsing = no
browse list = yes
logon path =
logon home = \\%N\%U
logon drive = u:
add user script = /usr/sbin/useradd  -g "users" -m -k "/etc/skelnul" -s /bin/false '%u'
add machine script = /usr/sbin/useradd -d /dev/null -g 'nofiles' -c 'Machine Account' -s /bin/false '%u'
deadtime = 3
printcap name = cups
printing = cups
load printers = yes
Comment 8 Ben Kohler gentoo-dev 2019-07-10 18:55:57 UTC
Does this still affect samba-4.x?