Samba doesn't start

Hi,

samba doesn’t start on a new install:

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

[root@rockstor ~]# systemctl status smb.service
smb.service - Samba SMB Daemon
   Loaded: loaded (/etc/systemd/system/smb.service; enabled)
   Active: failed (Result: exit-code) since Thu 2015-12-03 19:52:19 CET; 21s ago
  Process: 4593 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
 Main PID: 4593 (code=exited, status=1/FAILURE)

Dec 03 19:52:19 rockstor.local systemd[1]: smb.service: main process exited, code=exited, status=1/FAILURE
Dec 03 19:52:19 rockstor.local systemd[1]: Failed to start Samba SMB Daemon.
Dec 03 19:52:19 rockstor.local systemd[1]: Unit smb.service entered failed state.

`[root@rockstor ~]# journalctl -xn
– Logs begin at Thu 2015-12-03 19:34:53 CET, end at Thu 2015-12-03 19:52:19 CET. –
Dec 03 19:50:40 rockstor.local avahi-daemon[4547]: Registering new address record for fe80::5451:10ff:fefe:f0a5 on ens18.*.
Dec 03 19:50:40 rockstor.local avahi-daemon[4547]: Registering new address record for 192.168.1.60 on ens18.IPv4.
Dec 03 19:50:40 rockstor.local avahi-daemon[4547]: Registering HINFO record with values ‘X86_64’/‘LINUX’.
Dec 03 19:50:41 rockstor.local avahi-daemon[4547]: Server startup complete. Host name is rockstor.local. Local service cookie is 76967241.
Dec 03 19:52:19 rockstor.local systemd[1]: Reloading.
Dec 03 19:52:19 rockstor.local systemd[1]: Reloading.
Dec 03 19:52:19 rockstor.local systemd[1]: Starting Samba SMB Daemon…
– Subject: Unit smb.service has begun with start-up
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit smb.service has begun starting up.
Dec 03 19:52:19 rockstor.local systemd[1]: smb.service: main process exited, code=exited, status=1/FAILURE
Dec 03 19:52:19 rockstor.local systemd[1]: Failed to start Samba SMB Daemon.
– Subject: Unit smb.service has failed
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit smb.service has failed.

– The result is failed.
Dec 03 19:52:19 rockstor.local systemd[1]: Unit smb.service entered failed state.
`

Any ideas? Haven’t done anything else besides configuring a new pool and adding a samba share.

Cheers and thanks for reading!

Thanks for sending the logs @Cipher! I haven’t had the chance to reproduce the problem, but will do soon after the current pull request I am working on.

Have you tried stopping and starting again? Is it consistently erroring out?

Yes, both the service and the VM @suman

Thanks for sending the logs, but there’s no clue in them. My guess is that rockstor-bootstrap service may have bombed. I assume you are on Testing update channel, if so, first update to latest(3.8-9.08, as of now). Then, try to reproduce the problem. If it’s still there, send us the output of `systemctl status -l rockstor-pre rockstor rockstor-bootstrap1

I appear to be having this exact same problem on 3.8-12.
Here is the output of systemctl status nmb.service

● nmb.service - Samba NMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/nmb.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2016-04-19 17:35:54 NZST; 41min ago
  Process: 16174 ExecStart=/usr/sbin/nmbd $NMBDOPTIONS (code=exited, status=1/FAILURE)
 Main PID: 16174 (code=exited, status=1/FAILURE)

Apr 19 17:35:54 nas.local systemd[1]: Starting Samba NMB Daemon...
Apr 19 17:35:54 nas.local systemd[1]: nmb.service: main process exited, code=exited, status=1/FAILURE
Apr 19 17:35:54 nas.local systemd[1]: Failed to start Samba NMB Daemon.
Apr 19 17:35:54 nas.local systemd[1]: Unit nmb.service entered failed state.
Apr 19 17:35:54 nas.local systemd[1]: nmb.service failed.

And journalctl -xe

Apr 19 18:29:51 nas.local systemd[1]: Reloading.
Apr 19 18:29:51 nas.local systemd[1]: Configuration file /usr/lib/systemd/system/auditd.service is marked world-inaccessible. This has no effect as configura
Apr 19 18:29:51 nas.local systemd[1]: Configuration file /usr/lib/systemd/system/wpa_supplicant.service is marked executable. Please remove executable permis
Apr 19 18:29:51 nas.local systemd[1]: Starting Samba NMB Daemon...
-- Subject: Unit nmb.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nmb.service has begun starting up.
Apr 19 18:29:51 nas.local systemd[1]: nmb.service: main process exited, code=exited, status=1/FAILURE
Apr 19 18:29:51 nas.local systemd[1]: Failed to start Samba NMB Daemon.
-- Subject: Unit nmb.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nmb.service has failed.
--
-- The result is failed.
Apr 19 18:29:51 nas.local systemd[1]: Unit nmb.service entered failed state.
Apr 19 18:29:51 nas.local systemd[1]: nmb.service failed.
Apr 19 18:30:19 nas.local sshd[5349]: Accepted password for root from 10.1.1.27 port 61593 ssh2
Apr 19 18:30:19 nas.local systemd[1]: Created slice user-0.slice.
-- Subject: Unit user-0.slice has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has finished starting up.
--
-- The start-up result is done.
Apr 19 18:30:19 nas.local systemd[1]: Starting user-0.slice.
-- Subject: Unit user-0.slice has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit user-0.slice has begun starting up.
Apr 19 18:30:19 nas.local systemd-logind[2867]: New session 3 of user root.
-- Subject: A new session 3 has been created for user root
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A new session with the ID 3 has been created for the user root.
--
-- The leading process of the session is 5349.
Apr 19 18:30:19 nas.local systemd[1]: Started Session 3 of user root.
-- Subject: Unit session-3.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-3.scope has finished starting up.
--
-- The start-up result is done.
Apr 19 18:30:19 nas.local systemd[1]: Starting Session 3 of user root.
-- Subject: Unit session-3.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-3.scope has begun starting up.
Apr 19 18:30:19 nas.local sshd[5349]: pam_unix(sshd:session): session opened for user root by (uid=0)
Apr 19 18:30:53 nas.local sshd[5410]: Accepted password for root from 10.1.1.27 port 61603 ssh2
Apr 19 18:30:53 nas.local systemd-logind[2867]: New session 4 of user root.
-- Subject: A new session 4 has been created for user root
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A new session with the ID 4 has been created for the user root.
--
-- The leading process of the session is 5410.
Apr 19 18:30:53 nas.local systemd[1]: Started Session 4 of user root.
-- Subject: Unit session-4.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-4.scope has finished starting up.
--
-- The start-up result is done.
Apr 19 18:30:53 nas.local systemd[1]: Starting Session 4 of user root.
-- Subject: Unit session-4.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

This is on a new 12 disk, RAID6 pool on a brand new install, I have tried restarting Samba and Rockstor, and even re-installing Rockstor to no avail.

Update: the problem persists on a clean install of version 3.8-13.

I have tried to reproduce this. I have tested on my development machine
and also by doing a fresh install (version 3.8-13)on the VM.
In neither of the two tests, I could spot this issue. Still able to start and stop the Samba service without any error.

I still can’t enable samba even updated to latest version as 3.8-13.07

[root@rockstor ~]# systemctl status -l rockstor-pre rockstor rockstor-bootstrap
● rockstor-pre.service - Tasks required prior to starting Rockstor
Loaded: loaded (/etc/systemd/system/rockstor-pre.service; enabled; vendor preset: disabled)
Active: active (exited) since Wed 2016-05-04 16:43:47 MYT; 1 day 22h ago
Main PID: 3746 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/rockstor-pre.service

May 04 16:43:43 rockstor initrock[3746]: 2016-05-04 03:43:43,552: Changed timezone from America/Chicago to Asia/Kuala_Lumpur
May 04 16:43:43 rockstor initrock[3746]: 2016-05-04 03:43:43,554: Updating sshd_config
May 04 16:43:43 rockstor initrock[3746]: 2016-05-04 03:43:43,555: sshd_config already has the updates. Leaving it unchanged.
May 04 16:43:43 rockstor initrock[3746]: 2016-05-04 03:43:43,556: Running prepdb…
May 04 16:43:45 rockstor initrock[3746]: 2016-05-04 03:43:45,248: stopping firewalld…
May 04 16:43:45 rockstor initrock[3746]: 2016-05-04 03:43:45,361: firewalld stopped and disabled
May 04 16:43:45 rockstor initrock[3746]: 2016-05-04 03:43:45,430: Registered task: fs.btrfs.start_balance
May 04 16:43:47 rockstor initrock[3746]: 2016-05-04 03:43:47,407: rockstor service looks correct. Not updating.
May 04 16:43:47 rockstor initrock[3746]: 2016-05-04 03:43:47,407: rockstor-bootstrap.service looks correct. Not updating.
May 04 16:43:47 rockstor systemd[1]: Started Tasks required prior to starting Rockstor.

● rockstor.service - RockStor startup script
Loaded: loaded (/etc/systemd/system/rockstor.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2016-05-04 18:34:37 MYT; 1 day 20h ago
Main PID: 14118 (supervisord)
CGroup: /system.slice/rockstor.service
├─14118 /usr/bin/python /opt/rockstor/bin/supervisord -c /opt/rockstor/etc/supervisord.conf
├─14122 nginx: master process /usr/sbin/nginx -c /opt/rockstor/etc/nginx/nginx.con
├─14123 /usr/bin/python /opt/rockstor/bin/gunicorn --bind=127.0.0.1:8000 --pid=/run/gunicorn.pid --workers=2 --log-file=/opt/rockstor/var/log/gunicorn.log --pythonpath=/opt/rockstor/src/rockstor --settings=settings --timeout=120 --graceful-timeout=120 wsgi:application
├─14124 /usr/bin/python /opt/rockstor/bin/data-collector
├─14125 /usr/bin/python /opt/rockstor/bin/django ztaskd --noreload --replayfailed -f /opt/rockstor/var/log/ztask.log
├─14126 nginx: worker process
├─14127 nginx: worker process
├─14130 /usr/bin/python /opt/rockstor/bin/gunicorn --bind=127.0.0.1:8000 --pid=/run/gunicorn.pid --workers=2 --log-file=/opt/rockstor/var/log/gunicorn.log --pythonpath=/opt/rockstor/src/rockstor --settings=settings --timeout=120 --graceful-timeout=120 wsgi:application
└─14131 /usr/bin/python /opt/rockstor/bin/gunicorn --bind=127.0.0.1:8000 --pid=/run/gunicorn.pid --workers=2 --log-file=/opt/rockstor/var/log/gunicorn.log --pythonpath=/opt/rockstor/src/rockstor --settings=settings --timeout=120 --graceful-timeout=120 wsgi:application

May 04 18:34:37 rockstor supervisord[14118]: 2016-05-04 18:34:37,306 CRIT Server ‘unix_http_server’ running without any HTTP authentication checking
May 04 18:34:37 rockstor supervisord[14118]: 2016-05-04 18:34:37,306 INFO supervisord started with pid 14118
May 04 18:34:38 rockstor supervisord[14118]: 2016-05-04 18:34:38,309 INFO spawned: ‘nginx’ with pid 14122
May 04 18:34:38 rockstor supervisord[14118]: 2016-05-04 18:34:38,313 INFO spawned: ‘gunicorn’ with pid 14123
May 04 18:34:38 rockstor supervisord[14118]: 2016-05-04 18:34:38,316 INFO spawned: ‘data-collector’ with pid 14124
May 04 18:34:38 rockstor supervisord[14118]: 2016-05-04 18:34:38,319 INFO spawned: ‘ztask-daemon’ with pid 14125
May 04 18:34:40 rockstor supervisord[14118]: 2016-05-04 18:34:40,367 INFO success: data-collector entered RUNNING state, process has stayed up for > than 2 seconds (startsecs)
May 04 18:34:40 rockstor supervisord[14118]: 2016-05-04 18:34:40,367 INFO success: ztask-daemon entered RUNNING state, process has stayed up for > than 2 seconds (startsecs)
May 04 18:34:43 rockstor supervisord[14118]: 2016-05-04 18:34:43,371 INFO success: nginx entered RUNNING state, process has stayed up for > than 5 seconds (startsecs)
May 04 18:34:43 rockstor supervisord[14118]: 2016-05-04 18:34:43,371 INFO success: gunicorn entered RUNNING state, process has stayed up for > than 5 seconds (startsecs)

● rockstor-bootstrap.service - Rockstor bootstrapping tasks
Loaded: loaded (/etc/systemd/system/rockstor-bootstrap.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Wed 2016-05-04 18:31:54 MYT; 1 day 20h ago
Main PID: 3827 (code=exited, status=0/SUCCESS)

May 04 16:43:47 rockstor systemd[1]: Starting Rockstor bootstrapping tasks…
May 04 16:44:02 rockstor bootstrap[3827]: BTRFS device scan complete
May 04 16:44:02 rockstor bootstrap[3827]: Exception occured while bootstrapping. This could be because rockstor.service is still starting up. will wait 2 seconds and try again. Exception: Exception while setting access_token for url(http://127.0.0.1:8000): HTTPConnectionPool(host=‘127.0.0.1’, port=8000): Max retries exceeded with url: /o/token/ (Caused by <class ‘socket.error’>: [Errno 111] Connection refused). content: None
May 04 16:44:02 rockstor bootstrap[3827]: Bootstrapping complete
May 04 16:44:02 rockstor bootstrap[3827]: Running qgroup cleanup. /opt/rockstor/bin/qgroup-clean
May 04 16:44:02 rockstor bootstrap[3827]: Running qgroup limit maxout. /opt/rockstor/bin/qgroup-maxout-limit
May 04 16:44:02 rockstor systemd[1]: Started Rockstor bootstrapping tasks.
May 04 18:31:54 rockstor systemd[1]: Stopped Rockstor bootstrapping tasks.
May 04 18:31:54 rockstor systemd[1]: Stopping Rockstor bootstrapping tasks…
[root@rockstor ~]#

i just disabled or out into permissive the selinux config then everything is running now.

1 Like