Failed to start samba due to a system error:

[Please complete the below template with details of the problem reported on your Web-UI. Be as detailed as possible. Community members, including developers, shall try and help. Thanks for your time in reporting this issue! We recommend purchasing commercial support for expedited support directly from the developers.]

Brief description of the problem

Configuring SAMBA in Rockstor and assigned two shares with two admin users

Detailed step by step instructions to reproduce the problem

[write here]

Web-UI screenshot

image

Error Traceback provided on the Web-UI

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 115, 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 because the control process exited with error code. See "systemctl status smb.service" and "journalctl -xe" for details.', '']

Hi @Rushby_Craig, and welcome to the community!

Sorry to read you’re having troubles with Samba, but let’s try to see what is happening.

The error you pasted (thanks!) indicates that the Samba service failed to start, but you also indicate that you were trying to create a new Samba export of two shares. As a result, it seems you may already have had the Samba service turned on before (or in the past)… could you comment on that?

Nonetheless, it is necessary to have a look at the logs to see what is preventing the Samba service from turning on. As a result, could you provide the content of the logs mentioned in the error at the time you tried to turn the Samba service ON?

journalctl -u smb -u nmb
systemctl status -l smb nmb

These should hopefully give us more details on the exact error and we should be able to troubleshoot better from there.

Hope this helps,

1 Like

Hi Flox,
Thanks for your help!

I have not had Samba working prior. This is the initial install.

Here are the contents of the files when I just tried to turn on Samba in the Rockstor settings again:

journalctl

Jan 04 21:40:19 craigcloudserver nmbd[27649]: [2020/01/04 21:40:19.068329, 0] …/source3/nmbd/nmbd_become_lmb.c:533(become_local_master_browser)
Jan 04 21:40:19 craigcloudserver nmbd[27649]: become_local_master_browser: Error - cannot find server CRAIGCLOUDSERVER in workgroup SAMBA on subnet 10.0.1.154
Jan 04 21:41:55 craigcloudserver systemd[1]: Starting Samba SMB Daemon…
Jan 04 21:41:55 craigcloudserver systemd[1]: smb.service: main process exited, code=exited, status=1/FAILURE
Jan 04 21:41:55 craigcloudserver systemd[1]: Failed to start Samba SMB Daemon.
Jan 04 21:41:55 craigcloudserver systemd[1]: Unit smb.service entered failed state.
Jan 04 21:41:55 craigcloudserver systemd[1]: smb.service failed.

systemctl

● smb.service - Samba SMB Daemon
Loaded: loaded (/etc/systemd/system/smb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2020-01-04 21:41:55 MST; 10min ago
Process: 26101 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
Main PID: 26101 (code=exited, status=1/FAILURE)

Jan 04 21:41:55 craigcloudserver systemd[1]: Starting Samba SMB Daemon…
Jan 04 21:41:55 craigcloudserver systemd[1]: smb.service: main process exited, code=exited, status=1/FAILURE
Jan 04 21:41:55 craigcloudserver systemd[1]: Failed to start Samba SMB Daemon.
Jan 04 21:41:55 craigcloudserver systemd[1]: Unit smb.service entered failed state.
Jan 04 21:41:55 craigcloudserver systemd[1]: smb.service failed.

● nmb.service - Samba NMB Daemon
Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2020-01-03 15:04:34 MST; 1 day 6h ago
Main PID: 27649 (nmbd)
Status: “nmbd: ready to serve connections…”
CGroup: /system.slice/nmb.service
└─27649 /usr/sbin/nmbd

Jan 04 21:30:37 craigcloudserver nmbd[27649]: [2020/01/04 21:30:37.686559, 0] …/source3/nmbd/nmbd_become_lmb.c:533(become_local_master_browser)
Jan 04 21:30:37 craigcloudserver nmbd[27649]: become_local_master_browser: Error - cannot find server CRAIGCLOUDSERVER in workgroup SAMBA on subnet 10.0.1.154
Jan 04 21:35:30 craigcloudserver nmbd[27649]: [2020/01/04 21:35:30.065589, 0] …/source3/nmbd/nmbd_become_lmb.c:533(become_local_master_browser)
Jan 04 21:35:30 craigcloudserver nmbd[27649]: become_local_master_browser: Error - cannot find server CRAIGCLOUDSERVER in workgroup SAMBA on subnet 10.0.1.154
Jan 04 21:40:19 craigcloudserver nmbd[27649]: [2020/01/04 21:40:19.068329, 0] …/source3/nmbd/nmbd_become_lmb.c:533(become_local_master_browser)
Jan 04 21:40:19 craigcloudserver nmbd[27649]: become_local_master_browser: Error - cannot find server CRAIGCLOUDSERVER in workgroup SAMBA on subnet 10.0.1.154
Jan 04 21:45:33 craigcloudserver nmbd[27649]: [2020/01/04 21:45:33.423609, 0] …/source3/nmbd/nmbd_become_lmb.c:533(become_local_master_browser)
Jan 04 21:45:33 craigcloudserver nmbd[27649]: become_local_master_browser: Error - cannot find server CRAIGCLOUDSERVER in workgroup SAMBA on subnet 10.0.1.154
Jan 04 21:50:48 craigcloudserver nmbd[27649]: [2020/01/04 21:50:48.709100, 0] …/source3/nmbd/nmbd_become_lmb.c:533(become_local_master_browser)
Jan 04 21:50:48 craigcloudserver nmbd[27649]: become_local_master_browser: Error - cannot find server CRAIGCLOUDSERVER in workgroup SAMBA on subnet 10.0.1.154

Hi @Rushby_Craig, and thanks for the additional outputs.

It seems the smb service fails to start due to the following:

I’m unfortunately not an expert in troubleshooting samba so I’m not sure why you’re having this issue. The error is rather explicit and seems to indicate communication issues. In this context, you could verify that by running the following:

smbtree
nmblookup -S CRAIGCLOUDSERVER

EDIT:
the following could also reveal some issue:

testparm -s

Hope this helps narrowing down the issue and provides more information for other forum users more knowledgeable in the matter.

Here is what I get from the commands that you suggested. I see that it is telling me that the netbios name (CRAIGCLOUDSERVER) has to many characters (15 max). Maybe that’s that problem?

[root@craigcloudserver ~]# nmblookup -S CRAIGCLOUDSERVER
The specified netbios name [CRAIGCLOUDSERVER] is too long!
[root@craigcloudserver ~]# testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section “[homes]”
Processing section “[printers]”
Processing section “[print$]”
Processing section “[Cams_Stuff]”
Processing section “[FamilyPics]”
Loaded services file OK.
WARNING: The ‘netbios name’ is too long (max. 15 chars).

Server role: ROLE_STANDALONE

Global parameters

[global]
workgroup = SAMBA
printcap name = cups
security = USER
idmap config * : backend = tdb
cups options = raw

[homes]
comment = Home Directories
browseable = No
inherit acls = Yes
read only = No
valid users = %S %D%w%S

[printers]
comment = All Printers
path = /var/tmp
browseable = No
printable = Yes
create mask = 0600

[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
create mask = 0664
directory mask = 0775
write list = root

[Cams_Stuff]
comment = Samba-Export
path = /mnt2/Cams_Stuff
root preexec = “/opt/rockstor/bin/mnt-share Cams_Stuff”
root preexec close = Yes
admin users = rushbycraig cameron
read only = No

[FamilyPics]
comment = Samba-Export
path = /mnt2/FamilyPics
root preexec = “/opt/rockstor/bin/mnt-share FamilyPics”
root preexec close = Yes
admin users = rushbycraig cameron
read only = No

Thanks a lot for the logs, @Rushby_Craig!

I was wondering about that specific point and that’s why I was curious about the testparm output.

This seems to make sense with the nmblookup error so I would try to use a shorter name and see how it goes.

This is simply your hostname so you can easily change that from Rockstor’s webUI. To do so:

  1. simply click on the hostname in the top left corner of the UI (right under the Rockstor logo) or go to “System” > “Appliances”.
  2. Click on the hostname (see screenshot below) and edit it to something shorter (less than 15 char).
    image
  3. Then, go back to the Services page, and try turning the Samba service ON again. I would recommend to keep an eye on the logs while doing so (journalctl -f -u smb -u nmb) to catch any other error that may pop out and verify that the new hostname has been used as it should.

Hope this helps,

1 Like