Samba fails to start on fresh install 3.9.1-16

Hello everyone.

I found Rockstor today and I’ve been testing it out, so far I’m really liking it!

I tested it using 3.9.1-0 initially, then after i decided to start over, reinstalled it and decided to give the updates a go. It updated the system to version 3.9.1-16.

Everything seems to be working except Samba: I did no configurations on rockstor at all before upgrading, samba just fails to start. I tried checking the journal logs, but i couldn’t find the issue by myself.

Could you help me out finding out whats going on?

Thank you for your time.

Hi @Paulo_Constanca, and welcome to the community!

I’m glad you’re liking it so far, and thanks for the encouraging words, that’s always greatly appreciated!

I’m sorry you’re having some issues, though. I strongly suspect that the root cause is the fact that 3.9.1-16 is now rather old and we’ve had several important fixes lately to our Samba implementation. This is due to change soon, though, as we’re nearing the release of our new installer.

In the meantime, the first explanation that come to mind is related to the updates your mentioned. Indeed, due to our rather old ISO, there is a ton of updates to be applied, and we’ve seen several some of these large amount of updates having some issues (and Samba seems to often be the victim of those). I would thus wonder if you could try to see if your updates were interrupted or reported some error. What would be the output of the following?

yum update

Hopefully, it would tell you if you have some issues with your previous updates and also complete what’s left to be updated. In particular, I wonder what yum info samba would say.

Alternatively, you can try to monitor the system logs while turning the Samba sercice ON. Use journalctl -f, for instance, and then toggle the Samba service from Rockstor webUI. You will see what error message is displayed.
You can then further check Samba’s status:

systemctl status smb

One last thing, are you trying to switch it ON from the “System > Services” page or “Storage > Samba” page? We recently corrected a bug in the latter, so I would recommend using the former while you’re still on an older verion of Rockstor.

Let’s see where that leaves us, and we should be able to know more about what is happening.

Hope this helps,

1 Like

Hello @Flox, thank you for trying to help.

Just to make sure it was not a fluke, i did a re-install again, and the same issue happened. Trying to enable samba from the “System > Services” page or “Storage > Samba”, or even from the terminal always results in failure.

I also ran all the commands you asked for, heres the summary:

Yum update
Reported that there was no packages are marked for update

Yum info samba

> [root@pauloserver ~]# yum info samba
> Loaded plugins: changelog, fastestmirror
> Loading mirror speeds from cached hostfile
>  * base: centos.mirror.ptisp.pt
>  * epel: mirrors.up.pt
>  * extras: centos.mirror.ptisp.pt
>  * updates: centos.mirror.ptisp.pt
> Installed Packages
> Name        : samba
> Arch        : x86_64
> Version     : 4.10.4
> Release     : 11.el7_8
> Size        : 2.1 M
> Repo        : installed
> From repo   : updates
> Summary     : Server and Client software to interoperate with Windows machines
> URL         : http://www.samba.org/
> License     : GPLv3+ and LGPLv3+
> Description : Samba is the standard Windows interoperability suite of programs
>             : for Linux and Unix.

journalctl -f

May 29 02:04:34 pauloserver systemd[1]: Starting Samba SMB Daemon…
May 29 02:04:34 pauloserver systemd[1]: Failed to start Samba SMB Daemon.
May 29 02:04:34 pauloserver systemd[1]: Unit smb.service entered failed state.
May 29 02:04:34 pauloserver systemd[1]: smb.service failed.

systemctl status

● smb.service - Samba SMB Daemon
Loaded: loaded (/etc/systemd/system/smb.service; enabled; vendor preset: disabled)
Active: failed (Result: protocol) since Fri 2020-05-29 02:04:34 PDT; 1min 1s ago
Process: 3074 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=0/SUCCESS)
Main PID: 3074 (code=exited, status=0/SUCCESS)

May 29 02:04:34 pauloserver systemd[1]: Starting Samba SMB Daemon…
May 29 02:04:34 pauloserver systemd[1]: Failed to start Samba SMB Daemon.
May 29 02:04:34 pauloserver systemd[1]: Unit smb.service entered failed state.
May 29 02:04:34 pauloserver systemd[1]: smb.service failed.

I also ran a testparm on the smb.conf file, it reported it was OK.

Also i might have not been clear but, samba works on version 3.9.1-0 just fine, only after updating did it break.

Any hope to get this working from the logs i provided? Or is it better to just wait out for the next release and try again?

Again thank you for your time!

Before going deeper into a yum rabbit hole, I forgot to ask you about the nmb service as well. Could you try to toggle the Samba service from the webUI and post the output from the commands below?

systemctl status nmb.service
journalctl -u nmb.service
systemctl status smb.service
journalctl -u smb.service

This was, for instance, helpful in another Samba troubleshooting linked below (and its link therein):

Also, could you describe what the UI shows? Did you indeed configure the Samba service by clicking on the little wrench icon next to “Samba” first? Do you see any error message or is the toggle automatically reverting back to OFF after a few seconds?

Hope this helps,

1 Like

Hello @Flox. Here’s the outputs, hope it helps:

systemctl status nmb.service

[root@pauloserver ~]# systemctl status nmb.service
● nmb.service - Samba NMB Daemon
Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2020-05-29 06:31:22 PDT; 4min 57s ago
Docs: man:nmbd(8)
man:samba(7)
man:smb.conf(5)
Main PID: 2202 (nmbd)
Status: “nmbd: ready to serve connections…”
CGroup: /system.slice/nmb.service
└─2202 /usr/sbin/nmbd --foreground --no-process-group

May 29 06:31:22 pauloserver systemd[1]: Starting Samba NMB Daemon…
May 29 06:31:22 pauloserver systemd[1]: Started Samba NMB Daemon.
May 29 06:31:22 pauloserver nmbd[2202]: [2020/05/29 06:31:22.989561, 0] …/…/lib/util/become_daemon.c:136(daemon_ready)
May 29 06:31:22 pauloserver nmbd[2202]: daemon_ready: daemon ‘nmbd’ finished starting up and ready to serve connections
May 29 06:31:50 pauloserver nmbd[2202]: [2020/05/29 06:31:50.337715, 0] …/…/source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
May 29 06:31:50 pauloserver nmbd[2202]: *****
May 29 06:31:50 pauloserver nmbd[2202]:
May 29 06:31:50 pauloserver nmbd[2202]: Samba name server PAULOSERVER is now a local master browser for workgroup SAMBA on subnet 192.168.8.110
May 29 06:31:50 pauloserver nmbd[2202]:
May 29 06:31:50 pauloserver nmbd[2202]: *****

journalctl -u nmb.service

[root@pauloserver ~]# journalctl -u nmb.service
– Logs begin at Fri 2020-05-29 06:31:13 PDT, end at Fri 2020-05-29 06:35:45 PDT. –
May 29 06:31:22 pauloserver systemd[1]: Starting Samba NMB Daemon…
May 29 06:31:22 pauloserver systemd[1]: Started Samba NMB Daemon.
May 29 06:31:22 pauloserver nmbd[2202]: [2020/05/29 06:31:22.989561, 0] …/…/lib/util/become_daemon.c:136(daemon_ready)
May 29 06:31:22 pauloserver nmbd[2202]: daemon_ready: daemon ‘nmbd’ finished starting up and ready to serve connections
May 29 06:31:50 pauloserver nmbd[2202]: [2020/05/29 06:31:50.337715, 0] …/…/source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
May 29 06:31:50 pauloserver nmbd[2202]: *****
May 29 06:31:50 pauloserver nmbd[2202]:
May 29 06:31:50 pauloserver nmbd[2202]: Samba name server PAULOSERVER is now a local master browser for workgroup SAMBA on subnet 192.168.8.110
May 29 06:31:50 pauloserver nmbd[2202]:
May 29 06:31:50 pauloserver nmbd[2202]: *****

systemctl status smb.service

[root@pauloserver ~]# systemctl status smb.service
● smb.service - Samba SMB Daemon
   Loaded: loaded (/etc/systemd/system/smb.service; enabled; vendor preset: disabled)
   Active: failed (Result: protocol) since Fri 2020-05-29 06:35:45 PDT; 1min 25s ago
  Process: 3197 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 3197 (code=exited, status=0/SUCCESS)

May 29 06:35:45 pauloserver systemd[1]: Starting Samba SMB Daemon...
May 29 06:35:45 pauloserver systemd[1]: Failed to start Samba SMB Daemon.
May 29 06:35:45 pauloserver systemd[1]: Unit smb.service entered failed state.
May 29 06:35:45 pauloserver systemd[1]: smb.service failed.

journalctl -u smb.service

[root@pauloserver ~]# journalctl -u smb.service
– Logs begin at Fri 2020-05-29 06:31:13 PDT, end at Fri 2020-05-29 06:35:45 PDT. –
May 29 06:32:00 pauloserver systemd[1]: Starting Samba SMB Daemon…
May 29 06:32:00 pauloserver systemd[1]: Failed to start Samba SMB Daemon.
May 29 06:32:00 pauloserver systemd[1]: Unit smb.service entered failed state.
May 29 06:32:00 pauloserver systemd[1]: smb.service failed.
May 29 06:34:44 pauloserver systemd[1]: Starting Samba SMB Daemon…
May 29 06:34:44 pauloserver systemd[1]: Failed to start Samba SMB Daemon.
May 29 06:34:44 pauloserver systemd[1]: Unit smb.service entered failed state.
May 29 06:34:44 pauloserver systemd[1]: smb.service failed.
May 29 06:35:45 pauloserver systemd[1]: Starting Samba SMB Daemon…
May 29 06:35:45 pauloserver systemd[1]: Failed to start Samba SMB Daemon.
May 29 06:35:45 pauloserver systemd[1]: Unit smb.service entered failed state.
May 29 06:35:45 pauloserver systemd[1]: smb.service failed.

Here's the error the UI gives when i try to turn on the Samba Service:

Failed to start samba due to a system error: Error running a command. cmd = /usr/bin/systemctl start smb. rc = 1. stdout = [’’]. stderr = [‘Job for smb.service failed. See “systemctl status smb.service” and “journalctl -xe” for details.’, ‘’]

        Traceback (most recent call last):

File “/opt/rockstor/src/rockstor/smart_manager/views/samba_service.py”, line 114, in post
systemctl(‘smb’, command)
File “/opt/rockstor/src/rockstor/system/services.py”, line 64, in systemctl
return run_command([SYSTEMCTL_BIN, switch, service_name])
File “/opt/rockstor/src/rockstor/system/osi.py”, line 121, in run_command
raise CommandException(cmd, out, err, rc)
CommandException: Error running a command. cmd = /usr/bin/systemctl start smb. rc = 1. stdout = [’’]. stderr = [‘Job for smb.service failed. See “systemctl status smb.service” and “journalctl -xe” for details.’, ‘’]

Trying to configure Samba in the wrench tool throws the same error as above. The toggle reverts itself back off after a few seconds.

Thank you for trying to help!

Hi again @Paulo_Constanca, and sorry for the delay in getting back to you. I tried it on my end this morning and could reproduce your problem, but the reason was rather confusing to me so I needed more time. Unfortunately, today was very busy for me and I couldn’t find more time until now.

I’m still not 100% sure of what exactly happened, but my setup on Rockstor 3.9.1-16 had a working Samba with an older version of Samba (4.9). I updated it to 4.10 (the same as yours, the most up-to-date), and then I couldn’t start it anymore–although with a slightly different output than you. I could fix the issue by resetting a few things related to Samba.

  1. First, make sure to stop any service related. I know your issue is that they can’t turn on, but I prefer to be extra sure, so a lot of steps below could be deem overkill and unnecessary.
systemctl stop smb nmb winbind
  1. Delete the service files:
rm /etc/systemd/system/smb.service
rm /usr/lib/systemd/system/smb.service
rm /usr/lib/systemd/system/nmb.service
rm /usr/lib/systemd/system/winbind.service
  1. Reload the configs:
systemctl daemon-reload
  1. Reinstall samba-related packages:
yum reinstall samba samba-winbind libwbclient
systemctl daemon-reload
  1. Start monitoring your logs
journalctl -f
  1. In Rockstor webUI, go to System > Services, and click on the little wrench icon and set your WORKGROUP. In this version of Rockstor, there is a small bug (now fixed in recent versions) in which the Samba service is automatically started when you submit you configuration. This means the service should now start. You should see something like the following in the logs:
May 29 17:15:47 rocktest systemd[1]: Stopping Samba SMB Daemon...
May 29 17:15:47 rocktest systemd[1]: Stopped Samba SMB Daemon.
May 29 17:15:47 rocktest systemd[1]: Starting Samba SMB Daemon...
May 29 17:15:47 rocktest systemd[1]: Started Samba SMB Daemon.
May 29 17:15:47 rocktest smbd[3179]: [2020/05/29 17:15:47.808162,  0] ../../lib/util/become_daemon.c:136(daemon_ready)
May 29 17:15:47 rocktest smbd[3179]:   daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
May 29 17:15:47 rocktest systemd[1]: Starting Samba NMB Daemon...
May 29 17:15:47 rocktest systemd[1]: Started Samba NMB Daemon.
May 29 17:15:47 rocktest nmbd[3185]: [2020/05/29 17:15:47.917933,  0] ../../lib/util/become_daemon.c:136(daemon_ready)
May 29 17:15:47 rocktest nmbd[3185]:   daemon_ready: daemon 'nmbd' finished starting up and ready to serve connections
May 29 17:16:10 rocktest nmbd[3185]: [2020/05/29 17:16:10.953210,  0] ../../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
May 29 17:16:10 rocktest nmbd[3185]:   *****
May 29 17:16:10 rocktest nmbd[3185]:
May 29 17:16:10 rocktest nmbd[3185]:   Samba name server ROCKTEST is now a local master browser for workgroup MYROCKYGROUP on subnet 192.168.1.18
May 29 17:16:10 rocktest nmbd[3185]:
May 29 17:16:10 rocktest nmbd[3185]:   *****

Let’s see how that goes and hopefully you should be all set with it.

1 Like

Hello again @Flox . Don’t worry about the time, i’m grateful you’re trying to help :slight_smile:

I did everything you said, even rebooted after finishing just for good measure, but unfortunatly trying to start samba still gives me the same error:

[root@pauloserver ~]# journalctl -f
– Logs begin at Sat 2020-05-30 08:36:32 PDT. –
May 30 08:39:46 pauloserver systemd[1]: Starting Samba SMB Daemon…
May 30 08:39:47 pauloserver systemd[1]: Failed to start Samba SMB Daemon.
May 30 08:39:47 pauloserver systemd[1]: Unit smb.service entered failed state.
May 30 08:39:47 pauloserver systemd[1]: smb.service failed.
May 30 08:39:53 pauloserver systemd[1]: Reloading.
May 30 08:39:53 pauloserver systemd[1]: Reloading.
May 30 08:39:53 pauloserver systemd[1]: Starting Samba SMB Daemon…
May 30 08:39:53 pauloserver systemd[1]: Failed to start Samba SMB Daemon.
May 30 08:39:53 pauloserver systemd[1]: Unit smb.service entered failed state.
May 30 08:39:53 pauloserver systemd[1]: smb.service failed.

TESTPARM on smb.conf says it’s configured ok. Really no idea what’s causing the issue.

2 Likes

Mmmm… let’s try to get one step back and see if the default smb.service is ok (before Rockstor’s small customizations that we used to make at 3.9.1-16). As a result, let’s reset Samba again and see if it does start without issue:

systemctl stop smb nmb winbind

# Delete the service files
rm /etc/systemd/system/smb.service
rm /usr/lib/systemd/system/smb.service
rm /usr/lib/systemd/system/nmb.service
rm /usr/lib/systemd/system/winbind.service

# Reload the configs
systemctl daemon-reload
systemctl status smb nmb

# Reinstall samba-related packages:
yum reinstall samba samba-winbind libwbclient
systemctl daemon-reload
systemctl status smb nmb

Try to paste as much of the output here as you can so that we can make sure things were indeed reset as I believe they should (especially the systemctl status smb nmb bits).

Then, let’s make sure we have the right files where they need to be:

cat /etc/systemd/system/smb.service
cat /usr/lib/systemd/system/smb.service

The latter shouldn’t exist yet.

Then, let’s try to start smb as it. Let’s monitor the logs with journalctl -f and see what happens (or does not happen):

systemctl start smb

That should tell us at least if we have something wrong with smb.service. You did mention that testparm didn’t find any issue with smb.conf so we’ll keep that troubleshooting step for later if needed. Have you change anything in it at all, by the way?

1 Like

Hello again @Flox .

As i was gathering all the logs as requested, i accidentally found a way to make sure it works, at least if you’ve never used samba before upgrading.

Samba did start fine from he terminal before i let rockstor touch it after reinstalling. That got me thinking about what you said about the “Set the Workgroup in the wrench”. This time, before attempting to start samba, i went to the wrench and typed in my workgroup: Samba fired up just fine.

Thinking this was a fluke, i set up another VM and retried, but this time i started samba without the Workgroup: sure enough it kept giving errors as before, even if i tried inputing the workgroup after it would not work.

The trick is then:
For this version (3.9.1-16), do not use Samba at all before upgrading, and then make sure to set the Workgroup in the Services Tab by clicking on the Wrench icon BEFORE starting samba. As @Flox said, this version has a glitch that starts samba automatically after doing that, so there’s no need to re-turn it on after setting the workgroup.

@Flox Thank you for the help provided! I still have the broken VM available if you still want me to test out anything else.

Again, thank you for your time!

3 Likes