Fedora Linux Support Community & Resources Center
  #1  
Old 8th April 2013, 01:08 PM
serendip82 Offline
Registered User
 
Join Date: Apr 2013
Location: Germany
Posts: 206
linuxfirefox
F17 samba won't start after boot.

Hi,

I need some help with samba. I really don't know why it don't want to work. I tried so many things, goggled so much... no chance.

Maybe you can help me to work out a checklist for troubleshooting samba.


The steps that I have tried:

1) Install samba
yum install samba samba-client samba-swat system-config-samba

2)Acitivate some services
chkconfig smb on
chkconfig swat on
service smb start
service xinetd start
systemctl start smb.service
systemctl start nmb.service

Some may be arbitrary. I don't know why there a so many arbitrary options. I prefere the "service smb on" syntax scince I can remember it, it is easy and intuitive. Systemctl doesn't tell me anything. However, nothing really lead to success.

3) Allow samba services in the firewall.
Just checked samba and samba-client.

4) Configure SELinux
setsebool -P samba_export_all_rw 1



NOW: smb starts after bootup, nmb don't. There is no error message

cat /var/log/samba/log.nmbd gives:
[PASTE_doesn' work]

*****
[2013/04/08 12:36:39, 0] nmbd/nmbd.c:66(terminate)
Got SIGTERM: going down...
[2013/04/08 12:36:39, 0] nmbd/nmbd.c:861(main)
nmbd version 3.6.12-1.fc17 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
[2013/04/08 12:36:39, 0] nmbd/nmbd.c:889(main)
standard input is not a socket, assuming -D option
[2013/04/08 12:37:02, 0] nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
*****

Samba name server ** is now a local master browser for workgroup SAMBA on subnet 192.168****
[/PASTE....]

starting nmb by
service nmb start

don't give me access to my network shares.


I always have to upen the samba-server-configuration-gui apply some changes.
Then surprise the network share is available.

What else can I do to activate samba automatically after reboot?????

best S.

---------- Post added at 12:08 PM ---------- Previous post was at 11:14 AM ----------

It seems that, the configuration tool restarts the nmb service.

Doing this manually allows access to the network shares.

Now, why doesn't it do its job in the first place?

And, is it possible to fix it?
Reply With Quote
  #2  
Old 8th April 2013, 02:00 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 7,347
linuxfirefox
Re: F17 samba won't start after boot.

Are you using NetworkManager? if yes, then do you have NetworkManager-wait-online enabled?

The problem by default is that systemd assumes everything is ready for use even if it isn't. When NetworkManager starts, systemd assumes the network is ready (it isn't) so systemd ALSO starts smd/nmb. Now if other processes delay the actual starting long enough, then SOMETIMES it will work. NetworkManager-wait-online is supposed to delay systemd until NetworkManager actually configures the network... but this is only reliable in a single network interface (the usual case).
Reply With Quote
  #3  
Old 8th April 2013, 03:30 PM
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 8,432
linuxfirefox
Re: F17 samba won't start after boot.

try using systemd to enable the smb service on startup. You enabled samba on startup using the old service, which doesn't start the necessary other services. You either need to tell it to start the other services on boot, or just use systemctl enable smb.service which will insure the other services are started as well.

Code:
systemctl enable smb.service
Reply With Quote
  #4  
Old 8th April 2013, 06:48 PM
serendip82 Offline
Registered User
 
Join Date: Apr 2013
Location: Germany
Posts: 206
linuxfirefox
Re: F17 samba won't start after boot.

I checked:
systemctl status NetworkManager-wait-online

NetworkManager-wait-online.service - Network Manager Wait Online
Loaded: loaded (/usr/lib/systemd/system/NetworkManager-wait-online.service; disabled)
Active: inactive (dead)
CGroup: name=systemd:/system/NetworkManager-wait-online.service

and tried
systemctl enable NetworkManager-wait-online

....will it work? the answer in a few minutes...

---------- Post added at 05:41 PM ---------- Previous post was at 05:33 PM ----------

reboot: no, it did not help. Now, the status looks a bit different:

systemctl status NetworkManager-wait-online
NetworkManager-wait-online.service - Network Manager Wait Online
Loaded: loaded (/usr/lib/systemd/system/NetworkManager-wait-online.service; enabled)
Active: inactive (dead) since Mon, 08 Apr 2013 20:35:41 +0200
Process: 752 ExecStart=/usr/bin/nm-online -q --timeout=30 (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/NetworkManager-wait-online.service

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.


now, trying:
systemctl enable smb.service
....to be continued...

---------- Post added at 05:48 PM ---------- Previous post was at 05:41 PM ----------

....nope...

no change.

Which other services do you mean, by the way? I wrote that it works, when I restart the nmb service, which is already active. It is maybe the problem with the network manager, but I cannot find any error message. Or don't understand them.

Is this the important message?
(from /var/log/samba/log.nmb)

[2013/04/08 12:36:39, 0] nmbd/nmbd.c:66(terminate)
Got SIGTERM: going down...

?????
Reply With Quote
  #5  
Old 8th April 2013, 06:50 PM
beaker_ Offline
Registered User
 
Join Date: Nov 2008
Location: Canada
Posts: 2,718
windows_7firefox
Re: F17 samba won't start after boot.

Don't ignore DBelton's post above: smb service will not start nmb automatically and that behavior changed way back in Fedora 9!.

---------- Post added at 02:50 PM ---------- Previous post was at 02:48 PM ----------

Crap. I miss read it. He wrote smb.service.

systemctl enable smb.service
systemctl enable nmb.service
Reply With Quote
  #6  
Old 8th April 2013, 07:00 PM
serendip82 Offline
Registered User
 
Join Date: Apr 2013
Location: Germany
Posts: 206
linuxfirefox
Re: F17 samba won't start after boot.

chkconfig gives

Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.

livesys 0:off 1:off 2:off 3:on 4:on 5:on 6:off
livesys-late 0:off 1:off 2:off 3:on 4:on 5:on 6:off
netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
spice-vdagentd 0:off 1:off 2:off 3:off 4:off 5:on 6:off
tcsd 0:off 1:off 2:off 3:off 4:off 5:off 6:off

does this look good?

---------- Post added at 05:56 PM ---------- Previous post was at 05:50 PM ----------

OK, I tried

Quote:
systemctl enable smb.service
systemctl enable nmb.service
and it is not working. :-(

---------- Post added at 05:57 PM ---------- Previous post was at 05:56 PM ----------

Do I have to undo something, maybe??

---------- Post added at 06:00 PM ---------- Previous post was at 05:57 PM ----------

I just had a look into
/lib/systemd/system/smb.service

I seems that smb waits for the nmb service, befor it starts. Probably correct...

------------------------
[Unit]
Description=Samba SMB Daemon
After=syslog.target network.target nmb.service winbind.service

[Service]
Type=forking
PIDFile=/run/smbd.pid
LimitNOFILE=16384
EnvironmentFile=-/etc/sysconfig/samba
ExecStart=/usr/sbin/smbd $SMBDOPTIONS
-------------------
Reply With Quote
  #7  
Old 8th April 2013, 07:02 PM
beaker_ Offline
Registered User
 
Join Date: Nov 2008
Location: Canada
Posts: 2,718
windows_7firefox
Re: F17 samba won't start after boot.

Probably not. This behavior is typical when samba starts before your nic is ready. You could try dumping restarts in rc.local. But even then you're hoping systemd hits rc.local both last and after your nic is up. Basically you have both systemd and networkmanager to thank.
Reply With Quote
  #8  
Old 8th April 2013, 07:22 PM
serendip82 Offline
Registered User
 
Join Date: Apr 2013
Location: Germany
Posts: 206
linuxfirefox
Re: F17 samba won't start after boot.

But, this is in the configuration file!
Quote:
After=syslog.target network.target nmb.service winbind.service
Why should this be wrong? I did not place it there...

OK, you mean samba starts before the nic=network(?) is ready?

...I tried inserting the NetworkManager-wait-online.service in both the
/lib/systemd/system/smb.service
/lib/systemd/system/nmb.service

and increased the waiting time to 60 sec, still doesn't work.... too, bad...

---------- Post added at 06:19 PM ---------- Previous post was at 06:17 PM ----------

Quote:
The problem by default is that systemd assumes everything is ready for use even if it isn't. When NetworkManager starts, systemd assumes the network is ready (it isn't) so systemd ALSO starts smd/nmb. Now if other processes delay the actual starting long enough, then SOMETIMES it will work. NetworkManager-wait-online is supposed to delay systemd until NetworkManager actually configures the network... but this is only reliable in a single network interface (the usual case).
Reply With Quote
I my case it doesn't....WHY :-( ??

---------- Post added at 06:22 PM ---------- Previous post was at 06:19 PM ----------

Do you know the difference between:

chkconfig smb on
service smb start
systemctl start smb.service
systemctl enable smb.service

?? What is the state of the art to do it?
Reply With Quote
  #9  
Old 8th April 2013, 07:39 PM
beaker_ Offline
Registered User
 
Join Date: Nov 2008
Location: Canada
Posts: 2,718
linuxfirefox
Re: F17 samba won't start after boot.

systemd replaced sysv around fedora 15. chkconfig and service were the old commands and systemctl is the new command/method.

See http://fedoraproject.org/wiki/SysVin...emd_Cheatsheet

If samba plays nicely after you login and restart smb and nmb services manually. Then I say you have a choice; try dumping restarts in rc.local; or toss fedora in the trash and grab rhel/centos/sl. Of course your choice will always depend on both your level of sanity, how critical samba is, and how much work you're willing to do.

---------- Post added at 03:39 PM ---------- Previous post was at 03:31 PM ----------

Just adding: in general, it has gotten better and
Code:
systemctl enable NetworkManager-wait-online.service
systemctl enable smb.service
systemctl enable nmb.service
should be the most work you need to do. Assuming you've already configured the nic to be a "system connection" and "connect automatically" (NetworkManager's language, found in KDE's or gnome's applet).
Reply With Quote
  #10  
Old 8th April 2013, 07:44 PM
serendip82 Offline
Registered User
 
Join Date: Apr 2013
Location: Germany
Posts: 206
linuxfirefox
Re: F17 samba won't start after boot.

Thanks!

I tried to start nmb and smb services after the sendmail.service, which is the last I can see. However, it did not change anything....

Then, I think, I will have to find out, what dumping restarts in rc.local means, and give it a try....
or wait for the next generation of init-methods, and fix other bugs in the meantime...

Thanks to all of you!!
Reply With Quote
  #11  
Old 8th April 2013, 07:50 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 7,347
linuxfirefox
Re: F17 samba won't start after boot.

Fedora 14 and earlier:
Code:
chkconfig smb on
service smb start
Fedora 15 and later:
Code:
systemctl start smb.service
systemctl enable smb.service
Fedora 17 and later:
Code:
systemctl start smb
systemctl enable smb
You also have to do:
Code:
systemctl enable nmb
systemctl start nmb
Quote:
OK, you mean samba starts before the nic=network(?) is ready?
Sometimes....

Quote:
?? What is the state of the art to do it?
I gave up on NetworkManager. It just seems so flaky as to be unusable (for me). I completely disabled it, and enabled networks.
It just seems more reliable.

It appears to work if you have only one network interface. Two or more though, and it gets easily confused as to what it is doing, and the state of the network becomes indeterminate.

I have two wired networks, one is supported via DHCP, the other is not. I kept having NetworkManager set the wrong default route on the wrong interface, and it seemed to set it on the interface that came up first (the static internal one), thus routing to the internet always failed. This also meant that the state of the network was indeterminate - using NTP would also fail due to the inaccessibility to the time servers. If the networks came up in the reverse order... things worked. Next boot - not work.

Services would also not start properly. In my case it was Apache, sometimes it would work.... sometimes not. It also seemed to depend on which order the devices came up.

I tried using NetworkManager-wait-online, but that didn't always work either. The DHCP interface would not yet be ready... but the internal net would be ready... so NetworkManager assumed the network was ready... wrong. It still depended on which network was ready first...

Routing to/from VMs would also fail.

As soon as I disabled NetworkManager and enabled networks everything worked.

The difference: the /etc/network script doesn't mark the network as ready until ALL configured interfaces are ready, and that included waiting until the DHCP negotiation completed.

I blame most of the problems on NetworkManager, the rest on systemd being overly aggressive about running everything simultaneously. Systemd cannot know enough about what is going on, and gets it wrong. Sometimes.
Reply With Quote
  #12  
Old 8th April 2013, 07:53 PM
beaker_ Offline
Registered User
 
Join Date: Nov 2008
Location: Canada
Posts: 2,718
linuxfirefox
Re: F17 samba won't start after boot.

Dumping restarts into rc.local means, restart smb and nmb service in rc.local because rc.local is suppose to be the last thing executed.

Of course, now you need to create the file and:

/etc/rc.d/rc.local
Code:
#!/bin/bash
systemctl restart smb.service
systemctl restart nmb.service
systemctl enable rc-local.service

Yeah it needs to be executable but I don't recall if chmod +x or chmod 760 is all you need.

---------- Post added at 03:53 PM ---------- Previous post was at 03:51 PM ----------

You got it then. Good luck.
Reply With Quote
  #13  
Old 8th April 2013, 08:11 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 7,347
linuxfirefox
Re: F17 samba won't start after boot.

Last is relative.

It is "last" if you mean after multi-user.target is reached... but you CAN get there without the network being fully functional.
Reply With Quote
  #14  
Old 8th April 2013, 08:18 PM
beaker_ Offline
Registered User
 
Join Date: Nov 2008
Location: Canada
Posts: 2,718
linuxfirefox
Re: F17 samba won't start after boot.

You know it.
Reply With Quote
  #15  
Old 8th April 2013, 08:36 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 7,347
linuxfirefox
Re: F17 samba won't start after boot.

Besides, throwing things into rc.local to try and get them to work properly is just so.... SunOS 2.x way to do it
Reply With Quote
Reply

Tags
boot, f17, samba, start

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
won't boot after f17 upgrade to f18 simon2000 Using Fedora 2 27th January 2013 12:34 AM
F17 won't start up after sleep Mr Mojo Rising Using Fedora 1 9th September 2012 05:32 PM
HELP! F17 won't boot RAINxCHASER Using Fedora 1 7th July 2012 05:14 PM
Samba won't start . . . am lost re: the new configuration GMachine_24 Servers & Networking 0 3rd April 2006 05:13 AM
Samba won't start on FC1 webtalk EOL (End Of Life) Versions 2 12th August 2004 01:54 PM


Current GMT-time: 17:45 (Wednesday, 26-04-2017)

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