nmb not starting

Is there something new that needs to be set in order to get nmb to start at boot?? I have enabled and activated it via yast after the system is up and running and it says that it is writing/updating the config file -but- at next boot it fails to start. I did not have this problem in 13.2 or prior versions.

Thanks in advance,
-Chuck

What does the following report?

sudo systemctl status nmb

> sudo systemctl status nmb
root’s password:
nmb.service - Samba NMB Daemon
Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled)
Active: active (running) since Thu 2017-02-16 23:03:55 MST; 5h 28min ago
Main PID: 8292 (nmbd)
Status: “nmbd: ready to serve connections…”
CGroup: /system.slice/nmb.service
├─8292 /usr/sbin/nmbd -D
└─8293 /usr/sbin/nmbd -D

Feb 16 23:04:01 Dakotah-i7 nmbd[8292]: become_domain_master_browser_bcast:
Feb 16 23:04:01 Dakotah-i7 nmbd[8292]: Attempting to become domain master browser on workgroup TRCOMPUTING on subnet 192.168.0.63
Feb 16 23:04:01 Dakotah-i7 nmbd[8292]: [2017/02/16 23:04:01.584561, 0] …/source3/nmbd/nmbd_become_dmb.c:307(become_domain_mas…_bcast)
Feb 16 23:04:01 Dakotah-i7 nmbd[8292]: become_domain_master_browser_bcast: querying subnet 192.168.0.63 for domain master brows…MPUTING
Feb 16 23:04:01 Dakotah-i7 nmbd[8292]: [2017/02/16 23:04:01.585094, 0] …/source3/nmbd/nmbd_become_dmb.c:237(become_domain_mas…uccess)
Feb 16 23:04:01 Dakotah-i7 nmbd[8292]: become_domain_master_query_success:
Feb 16 23:04:01 Dakotah-i7 nmbd[8292]: There is already a domain master browser at IP 192.168.0.8 for workgroup TRCOMPUTING reg…8.0.63.
Feb 17 02:14:23 Dakotah-i7 nmbd[8292]: [2017/02/17 02:14:23.913586, 0] …/source3/nmbd/nmbd_namequery.c:109(query_name_response)
Feb 17 02:14:23 Dakotah-i7 nmbd[8292]: query_name_response: Multiple (2) responses received for a query on subnet 192.168.0.63 …NG<1d>.
Feb 17 02:14:23 Dakotah-i7 nmbd[8292]: This response was from IP 192.168.0.8, reporting an IP address of 192.168.0.8.
Hint: Some lines were ellipsized, use -l to show in full.

-BUT- that is after I have already started it. Will get it after a restart when I return from walking my dog. :wink:

As promised… the after “dog walk” and restart:

ctaylor@Dakotah-i7:~
> sudo systemctl status nmb
root’s password:
nmb.service - Samba NMB Daemon
Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled)
Active: failed (Result: exit-code) since Fri 2017-02-17 05:39:05 MST; 4min 26s ago
Process: 1180 ExecStart=/usr/sbin/nmbd $NMBDOPTIONS (code=exited, status=1/FAILURE)
Main PID: 1180 (code=exited, status=1/FAILURE)
Status: “daemon failed to start: NMBD failed when creating subnet lists”
Error: 13 (Permission denied)

Feb 17 05:39:05 Dakotah-i7 nmbd[1180]: bind failed on port 137 socket_addr = 192.168.0.63.
Feb 17 05:39:05 Dakotah-i7 nmbd[1180]: Error = Cannot assign requested address
Feb 17 05:39:05 Dakotah-i7 nmbd[1180]: [2017/02/17 05:39:05.063001, 0] …/source3/nmbd/nmbd_subnetdb.c:113(make_subnet)
Feb 17 05:39:05 Dakotah-i7 nmbd[1180]: nmbd_subnetdb:make_subnet()
Feb 17 05:39:05 Dakotah-i7 nmbd[1180]: Failed to open nmb socket on interface 192.168.0.63 for port 137. Error was Cannot assi…address
Feb 17 05:39:05 Dakotah-i7 nmbd[1180]: [2017/02/17 05:39:05.063046, 0] …/lib/util/become_daemon.c:111(exit_daemon)
Feb 17 05:39:05 Dakotah-i7 nmbd[1180]: STATUS=daemon failed to start: NMBD failed when creating subnet lists, error code 13
Feb 17 05:39:05 Dakotah-i7 systemd[1]: nmb.service: main process exited, code=exited, status=1/FAILURE
Feb 17 05:39:05 Dakotah-i7 systemd[1]: Failed to start Samba NMB Daemon.
Feb 17 05:39:05 Dakotah-i7 systemd[1]: Unit nmb.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.

Thanks for now and in advance :),
-Chuck

Check the interfaces option defined in /etc/samaba/smb.conf and make sure that it matches your physical interfaces/addressing correctly, or perhaps just or comment it out. If in doubt, share it here…

grep interfaces /etc/samba/smb.conf
ip add

Reference:
https://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#INTERFACES

Oh darn… been away to long and forgot the code tags. I’ll try to remember. Sorry.
Anywho, here is info about my system. The last part is from an alias/function that I put together. I have done a few things. :stuck_out_tongue: Got taken away from SuSE first by my new SmartPhone and then by my new dog. A very high energy, attention demanding GSD/Husky… and old age.( I’m now 70)


ctaylor@Dakotah-i7:~
> grep interfaces /etc/samba/smb.conf
        interfaces = 192.168.0.63/255.255.255.0  This is the IP of my "main" machine.  I have two HP i7's, an i3 laptop, my wife's i5 and my SmartPhone.  At times I have others also connected in the Network.
ctaylor@Dakotah-i7:~
> ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 34:64:a9:20:40:ee brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.63/24 brd 192.168.0.255 scope global dynamic eth0
       valid_lft 72350sec preferred_lft 72350sec
    inet6 fe80::3664:a9ff:fe20:40ee/64 scope link 
       valid_lft forever preferred_lft forever
3: vmnet1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000   VMware on my "main" machine.
    link/ether 00:50:56:c0:00:01 brd ff:ff:ff:ff:ff:ff
    inet 172.16.49.1/24 brd 172.16.49.255 scope global vmnet1
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fec0:1/64 scope link 
       valid_lft forever preferred_lft forever
4: vmnet8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether 00:50:56:c0:00:08 brd ff:ff:ff:ff:ff:ff
    inet 172.16.72.1/24 brd 172.16.72.255 scope global vmnet8
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fec0:8/64 scope link 
       valid_lft forever preferred_lft forever
ctaylor@Dakotah-i7:~
> disp

eth0      Link encap:Ethernet  HWaddr 34:64:A9:20:40:EE  
vmnet1    Link encap:Ethernet  HWaddr 00:50:56:C0:00:01  
vmnet8    Link encap:Ethernet  HWaddr 00:50:56:C0:00:08  
          inet addr:192.168.0.63  Bcast:192.168.0.255  Mask:255.255.255.0
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet addr:172.16.49.1  Bcast:172.16.49.255  Mask:255.255.255.0
          inet addr:172.16.72.1  Bcast:172.16.72.255  Mask:255.255.255.0

I primarily use the nmb to get access between my VMware Windows machines and my openSuSE. I run a Lin/Win system. Primarily cause of Homesite. I love that HTML editor and I have not found anything in Linux -or- Windows that can replace it.

Thanks,
-Chuck

Sounds like he will take you for walks :slight_smile:

The output checks out ok IMO. I’m wondering if your network takes longer to come up and that causes an issue here. If restarting the nmb.service after boot gets things running without issue, then maybe a inserting small delay can help as a workaround ie

sudo systemctl restart nmb

You could try creating a custom service eg /etc/systemd/system/nmb.service (which will take precedence over /usr/lib/systemd/system/nmb.service) including a 10s sleep delay

ExecStartPre=/bin/sleep 10

The complete .service file would look like this…

[Unit]
Description=Samba NMB Daemon
After=syslog.target network.target

[Service]
Type=notify
NotifyAccess=all
Environment=KRB5CCNAME=/run/samba/krb5cc_samba
PIDFile=/run/samba/nmbd.pid
EnvironmentFile=-/etc/sysconfig/samba
ExecStartPre=/bin/sleep 10
ExecStart=/usr/sbin/nmbd $NMBDOPTIONS
ExecReload=/usr/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target

Then

sudo systemctl reenable nmb.service

The next time you reboot, there should be a delay.

The exact steps required for modifying existing systemd unit files are described here:
https://wiki.archlinux.org/index.php/Systemd#Replacement_unit_files

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Managing_Services_with_systemd-Unit_Files.html#sect-Managing_Services_with_systemd-Unit_File_Modify

Ok. But it seems like a lot of hassle since the “old Ways”. In my 13.2 system, the other i7, nmb just comes up and running when I initially boot up or restart. In this 42.1 I have to go and manually start it after the boot up.

Has 42.2 changed?? ie; will it restart nmb properly??? ie; that would be incentive for me to move over to 42.2

Well, I’m not sure what has changed between openSUSE 13.2 and Leap 42.1, but I’m assuming from your reply that

sudo systemctl restart nmb.service

does successfully restart nmbd? Can you please confirm explicitly that this is the case? As I speculated before, this may be due to the network not being ready at the time nmb is started.

Are you using NetworkManager or Wicked?

If you have NM, the network may not be up in time for NMB to startup properly. You can always add Restart=Always in your nmb.service service file. Mind you, this works for me on 42.1 and 42.2 (as well as SLES) without issues when using Wicked - haven’t tested NM.

Are you using NetworkManager or Wicked?

Yes, I’d meant to ask about this as well but still trying to get a handle on whether this is due to slow network startup.

Alllllrighty now… I had to search to find out which I am using. In the search I found that I have both running -and- that the question of why was asked by another at:
wicked or NetworkManager - why both? - Install/Boot/Login - openSUSE Forums last September.

Unfortunately, the question was never answered. Perhaps we can get it answered here. You all have been very, very courteous and helpful over the years and that is the main reason I have stuck with SuSE/openSuSE. (Yes it was originally spelled that way and I think it looks cool.)


ctaylor@Dakotah-i7:~
> ps -ef | grep NetworkManager
root       829     1  0 Feb17 ?        00:00:01 /usr/sbin/NetworkManager --no-daemon
root      1890   829  0 Feb17 ?        00:00:00 /sbin/dhclient -d -q -sf /usr/lib/nm-dhcp-helper -pf /var/run/dhclient-eth0.pid -lf /var/lib/NetworkManager/dhclient-5db7033e-0297-484c-9dbc-c3402e779857-eth0.lease -cf /var/lib/NetworkManager/dhclient-eth0.conf eth0
ctaylor  12522  2146  0 05:49 pts/1    00:00:00 grep --color=auto NetworkManager
ctaylor@Dakotah-i7:~
> ps -ef | grep wicked
root       832     1  0 Feb17 ?        00:00:00 /usr/lib/wicked/bin/wickedd-dhcp6 --systemd --foreground
root       833     1  0 Feb17 ?        00:00:00 /usr/lib/wicked/bin/wickedd-dhcp4 --systemd --foreground
root       834     1  0 Feb17 ?        00:00:00 /usr/lib/wicked/bin/wickedd-auto4 --systemd --foreground
root       854     1  0 Feb17 ?        00:00:00 /usr/sbin/wickedd --systemd --foreground
root       859     1  0 Feb17 ?        00:00:00 /usr/sbin/wickedd-nanny --systemd --foreground
ctaylor  12527  2146  0 05:50 pts/1    00:00:00 grep --color=auto wicked

Now when I go into the Services Manager of Yast, it also shows both running and active. Naturally it would, but I never paid any attention cause it all worked. In fact over these months I have been using the Services Manager to start nmb. Thanks for the previous responses that shows how to start from the command line. I forgot about those.

Now then, I do believe that a delay might be what is needed. Cause it starts right up via Services Manager -or- the Command Line. deano_ferrari mentioned this and I will try it today… after the dog walk.:stuck_out_tongue:

Thanks to all,
-Chuck

Normally, a deliberate decision to use wicked or network manager is made via YaST > System > Network Settings. For those using wicked, the network configuration is done via YaST (editing the appropriate interface), while for NM it is done using its connection editor.

Only one of the following services should be enabled…

sudo systemctl status NetworkManager
sudo systemctl status wicked

Looks to me like they are both running. In Yast Services Manager

  • 3 items are listed for NetworkManager and only the first one is active
  • 6 items are listed for wicked and all six are active

However I get the following status. BTW the delay did not work for a power-off re-start -but- it seemed to work for a power-on re-boot.


ctaylor@Dakotah-i7:~
> sudo systemctl status NetworkManager
NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled)
   Active: active (running) since Sat 2017-02-18 16:37:37 MST; 10min ago
 Main PID: 827 (NetworkManager)
   CGroup: /system.slice/NetworkManager.service
           ├─ 827 /usr/sbin/NetworkManager --no-daemon
           └─2260 /sbin/dhclient -d -q -sf /usr/lib/nm-dhcp-helper -pf /var/run/dhclient-eth0.pid -lf /var/lib/NetworkManager/dhclient...

Feb 18 16:39:27 Dakotah-i7 NetworkManager[827]: <info>    lease time 86400
Feb 18 16:39:27 Dakotah-i7 NetworkManager[827]: <info>    nameserver '192.168.0.1'
Feb 18 16:39:27 Dakotah-i7 NetworkManager[827]: <info>  (eth0): DHCPv4 state changed unknown -> bound
Feb 18 16:39:27 Dakotah-i7 NetworkManager[827]: <info>  (eth0): device state change: ip-config -> ip-check (reason 'none') [70 80 0]
Feb 18 16:39:27 Dakotah-i7 NetworkManager[827]: <info>  (eth0): device state change: ip-check -> secondaries (reason 'none') [80 90 0]
Feb 18 16:39:27 Dakotah-i7 NetworkManager[827]: <info>  (eth0): device state change: secondaries -> activated (reason 'none') [90 100 0]
Feb 18 16:39:27 Dakotah-i7 NetworkManager[827]: <info>  NetworkManager state is now CONNECTED_LOCAL
Feb 18 16:39:28 Dakotah-i7 NetworkManager[827]: <info>  NetworkManager state is now CONNECTED_GLOBAL
Feb 18 16:39:28 Dakotah-i7 NetworkManager[827]: <info>  Policy set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS.
Feb 18 16:39:28 Dakotah-i7 NetworkManager[827]: <info>  (eth0): Activation: successful, device activated.
Hint: Some lines were ellipsized, use -l to show in full.
ctaylor@Dakotah-i7:~
> sudo systemctl status wicked
wicked.service - wicked managed network interfaces
   Loaded: loaded (/usr/lib/systemd/system/wicked.service; enabled)
   Active: active (exited) since Sat 2017-02-18 16:38:07 MST; 10min ago
  Process: 870 ExecStart=/usr/sbin/wicked --systemd ifup all (code=exited, status=0/SUCCESS)
 Main PID: 870 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/wicked.service

Feb 18 16:37:37 Dakotah-i7 systemd[1]: Starting wicked managed network interfaces...
Feb 18 16:38:07 Dakotah-i7 wicked[870]: lo              up
Feb 18 16:38:07 Dakotah-i7 wicked[870]: eno1            no-device
Feb 18 16:38:07 Dakotah-i7 systemd[1]: Started wicked managed network interfaces.
ctaylor@Dakotah-i7:~

Well, which do you prefer to use? If you have a static desktop environment, you might prefer that wicked is used for network management. NM is good for those who frequently change network environments. For example to disable NM, you can do this

sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager

then reboot, or just restart the network with

sudo systemctl restart network

Looks like I have a weird and unique system again. I used the above commands and lost my network after a power down re-start. “wicked” was still running but “networkManager” wasn’t. I could not access the Internet either. Had to redo my configuration and get my IP and hostname reset. I also restarted NetworkManager… or it restarted itself. I’m not sure. Anywho, I could then get “nmb” started and I could access the Internet. Both networks are now active and I can view my other systems… and they can see my main host.

I guess for now I will just put up with having to manually start nmb upon a new power up or a restart. And read up on the networking to find out why both are needed.

Thanks for your attempts and your help. I’m sure IF you were here you would see something that I missed and fix it quickly.
Take care,
-Chuck

That tells me that wicked was not yet configured then. When using wicked, a given network interface can be configured using YaST > System > Network Settings by selecting the device concerned and clicking the ‘Edit’ button.

Had to redo my configuration and get my IP and hostname reset.

That should not be necessary. The respective configuration files are preserved whether using NM or wicked.

I also restarted NetworkManager… or it restarted itself. I’m not sure. Anywho, I could then get “nmb” started and I could access the Internet. Both networks are now active and I can view my other systems… and they can see my main host.

I guess for now I will just put up with having to manually start nmb upon a new power up or a restart. And read up on the networking to find out why both are needed.

If you’re using NM then wicked should be disabled. Both are not needed concurrently, and it can cause conflicts anyway. Using YaST to choose wicked or NetworkManager via Network Settings > ‘Global Options’ will take care of this for you as well.

Thanks for your attempts and your help. I’m sure IF you were here you would see something that I missed and fix it quickly.
Take care,
-Chuck

No worries, but if you have the time and inclination you can always post again.