Fedora Linux Support Community & Resources Center
  #1  
Old 1st December 2011, 10:24 PM
yoyolala Offline
Registered User
 
Join Date: Dec 2011
Posts: 6
linuxfirefox
nmb.service doesn't start automatically on boot

I upgraded to Fedora 16 as a fresh install. Since then I can't get nmbd to start automatically. I can get smb to start just fine using the new systemctl enable smb.service command, but the nmb.service won't start on boot.

At first it was an SELinux problem becuase I saw nmbd SELinux AVC Denial messages, but I put the entire system into permissive from boot and nmbd still won't start. (The AVC errors dealt with dac_override.) Interesting after the system is up, I can do a systemctl start nmb.service and it starts just fine. The first attempt to start nmbd durring boot time produced the following error from systemctl:

nmb.service - Samba NMB Daemon
Loaded: loaded (/lib/systemd/system/nmb.service; enabled)
Active: failed since Thu, 01 Dec 2011 13:31:11 -0600; 25min ago
Process: 1016 ExecStart=/usr/sbin/nmbd $NMBDOPTIONS (code=exited, status=0/SUCCESS)
Main PID: 1026 (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/nmb.service

However, when I do "systemctl start nmb.service" manually as root, the service starts but generates the following error in syslog:
systemd[1]: PID 1026 read from file /run/nmbd.pid does not exist. Your service or init script might be broken.

Using syslog as my next hint I looked up the permissions of /run/nmbd.pid along with the nmbd service:
-rw-r--r--. root root system_u:object_r:nmbd_var_run_t:s0 /run/nmbd.pid
-rwxr-xr-x. root root system_u:object_r:nmbd_exec_t:s0 /usr/sbin/nmbd

The SELinux context type is different and that may be why I was orginally getting the dac_override AVC errors. I am sure I will have to solve for that problem as soon soon as I can fix this one. For the moment, I have the entire system in permissive mode through the /etc/ selinux/config file so that it starts that way from boot.

The end state I would like is to be able to boot, start nmbd, and have SELinux enabled but I think I need to tackle the them one at a time.
Many thanks in advance.
Reply With Quote
  #2  
Old 1st December 2011, 10:32 PM
leigh123linux
Guest
 
Posts: n/a
linuxfirefox
Re: nmb.service doesn't start automatically on boot

http://fedoraproject.org/wiki/Common...us_of_services
Reply With Quote
  #3  
Old 1st December 2011, 10:46 PM
yoyolala Offline
Registered User
 
Join Date: Dec 2011
Posts: 6
linuxfirefox
Re: nmb.service doesn't start automatically on boot

Thanks to lleigh123linux. He suggested I check-out the following recent Fedora 16 bugs posting that said this:
Upgrade from previous releases resets the enablement status of services

link to this item - Bugzilla: #752846
If you upgrade from a previous Fedora release, some services that you previously had enabled may be disabled and therefore they will not be started automatically on boot. This happens to services whose initscripts were converted to native systemd units. This is intentional. The rule for migration to systemd is to "start-over fresh" with default start and stop policy from the new package, and not to migrate what the user had previously configured. systemd provides a tool (systemd-sysv-convert --apply) to help do this conversion if you want after the package is updated. You can instead choose to inspect the services' enablement status manually by using systemctl

I don't think that is applicable for me here because I did a fresh install and I also have the nmbd service enabled with systemctl. I used the following command to enable it: systemctl enable nmb.service

When I do a systemctl status nmb.service after a fresh boot, it shows that nmb is enabled, but that it fails to start. Weird. Please let me know if I missed something. Thanks.
Reply With Quote
  #4  
Old 2nd December 2011, 10:19 PM
yoyolala Offline
Registered User
 
Join Date: Dec 2011
Posts: 6
linuxfirefox
Re: nmb.service doesn't start automatically on boot

Problem is resolved but I am not entirely sure why. I did a few things. Once of which was to follow a command that leigh123linux posted in the forum in response to my problem on F16. It said to run the following command:
systemd-sysv-convert --apply
I had already gotten smb.service and nmb.service to an enabled state using the "systemctl enable nmb.service" command. So, I did the command and it gave me some kind of error that it was an unrecognised service, but wanted to note here that I did it.

I also did a yum update before the next actions that I am about describe. I don't remember seeing anything in there that would have made a difference, but wanted to note that as well.

Finally, I took the entire system to run level 1 and then brought the system back to run level 5. For some reason, when I brought the system back-up the nmb.service was able to start on time. It also started on a subsequent reboot for me. Weird.

I can't imagine that taking the system to run level 1 and then 5 would do anything like that. The only package that came in the yum update that may have made a difference was an update to SELinux policy, but I had the entire system in permissive mode so that shouldn't have made a difference. Anyway, just wanted to send a note to say thanks what it is that I did. Hope that it can help someone else in some way.
Reply With Quote
  #5  
Old 16th December 2011, 07:03 AM
jeepii Offline
Registered User
 
Join Date: Dec 2011
Location: Qc, Canada
Posts: 1
windows_7firefox
Re: nmb.service doesn't start automatically on boot

Hey, just to let you know that it is not because it looks crazy that it really is... After several hours of research, trial and errors, i finally tried this solution: init 1 then init 5, and since the problem comes back after a kernel update I did it twice and worked twice... Really.

JP
Reply With Quote
  #6  
Old 1st October 2012, 07:14 PM
harpreetparmar Offline
Registered User
 
Join Date: Oct 2012
Location: mississauga
Posts: 4
windows_7firefox
Re: nmb.service doesn't start automatically on boot

Samba 3.6.6-92.fc17 (fedora : 3.5.4-1.fc17.x86_64)

nmbd does not start at boot but if i start it manually, it is fine
smbd runs fine

*******************************
here is status of nmb after i reboot, it is enabled but failed to start
/bin/systemctl status nmb.service
nmb.service - Samba NMB Daemon
Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled)
Active: failed (Result: exit-code) since Mon, 01 Oct 2012 13:52:33 -0400; 1min 38s ago
Process: 759 ExecStart=/usr/sbin/nmbd $NMBDOPTIONS (code=exited, status=0/SUCCESS)
Main PID: 787 (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/nmb.service

************************************
/var/log/samba/log.nmbd
[2012/10/01 13:52:33, 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]

************************************
I have tried following things which work temporarily
1). switch default runlevel to 1, reboot
switch default runlevel to 5 now, reboot
works for first boot, again nmbd does not run at boot

2). disable seLINUX permanently in /etc/selinux/config
works for first few reboots but again nmbd does not run at boot time

3). systemctl enable NetworkManage-wait-online.service
works for first few reboots but again nmbd does not run at boot

4). some of the posts suggest to upgrade samba, but i can't find any package after Samba 3.6.6-92.fc17

**********************************
here is global options from smb.conf
[global]
workgroup = XXXXX
server string = Customer FC17 Samba Server
interfaces = em1, lo
log level = 5
log file = /var/log/samba/log.%m
max log size = 50
name resolve order = wins host lmhosts
os level = 0
local master = No
domain master = No
dns proxy = No
wins server = 10.0.0.17
idmap config * : range =
idmap config * : backend = tdb
hosts allow = 10.0.0., 127.0.0.
cups options = raw

***********
2012-10-02, following worked for me, it seems to be the network, nmbd is running fine
systemctl enable NetworkManage-wait-online.service

Last edited by harpreetparmar; 2nd October 2012 at 08:41 PM.
Reply With Quote
  #7  
Old 1st October 2012, 07:47 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,865
linuxfirefox
Re: nmb.service doesn't start automatically on boot

You may be trying to start nmb before the network is ready.

Make sure (especially if you are using NetworkManager) that you have "NetworkManager-wait-online.service" enabled.

It may work sometimes and not others due to systemd not knowing how to synchronize properly.
Reply With Quote
  #8  
Old 1st October 2012, 08:44 PM
harpreetparmar Offline
Registered User
 
Join Date: Oct 2012
Location: mississauga
Posts: 4
windows_7firefox
Re: nmb.service doesn't start automatically on boot

Thank Jpollard.

you are right, i think nmb tries to start before network is fully ready.

i rebooted the system four times now and four times it worked, i got network manager wait online enabled and nmbd running but I feel, as you said, sometime it has problem with synchronizing. i will try tomorrow again, it seems fine for now. thanks.

[root@customer2 ~]# /bin/systemctl status NetworkManager-wait-online.service
NetworkManager-wait-online.service - Network Manager Wait Online
Loaded: loaded (/usr/lib/systemd/system/NetworkManager-wait-online.service; enabled)
Active: inactive (dead) since Mon, 01 Oct 2012 15:34:51 -0400; 1min 14s ago
Process: 806 ExecStart=/usr/bin/nm-online -q --timeout=30 (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/NetworkManager-wait-online.service

[root@customer2 ~]# /bin/systemctl status nmb.service
nmb.service - Samba NMB Daemon
Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled)
Active: active (running) since Mon, 01 Oct 2012 15:34:52 -0400; 1min 32s ago
Process: 818 ExecStart=/usr/sbin/nmbd $NMBDOPTIONS (code=exited, status=0/SUCCESS)
Main PID: 900 (nmbd)
CGroup: name=systemd:/system/nmb.service
â 900 /usr/sbin/nmbd

CGroup: name=systemd:/system/nmb.service
â 900 /usr/sbin/nmbd
Reply With Quote
Reply

Tags
automatically, boot, nmbd, nmbservice, start, systemctl

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to start/respawn a service automatically in FC 13 ? rwaters Programming & Packaging 2 11th October 2011 03:40 PM
sendmail service doesnt automatically start on fedora 15 ryb37 Servers & Networking 9 10th October 2011 07:26 PM
network does not start automatically at boot up simpleashwin Servers & Networking 3 30th July 2007 01:57 PM


Current GMT-time: 05:21 (Tuesday, 21-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Khujaobod Travel Photos - Groves Photos - Mbanza Congo Travel Photos on Instagram