[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
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.', '']
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.
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
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:
simply click on the hostname in the top left corner of the UI (right under the Rockstor logo) or go to “System” > “Appliances”.
Click on the hostname (see screenshot below) and edit it to something shorter (less than 15 char).
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.