0

Here is the output from a tail -f /var/log/ctdb/log.ctdb

2020/01/27 18:52:52.317670 ctdbd[3330]: Running the "startup" event.
2020/01/27 18:53:22.323208 ctdbd[3330]: startup event failed
2020/01/27 18:53:22.439563 ctdb-eventd[3332]: event_debug: ===== Start of hung script debug for PID="3678", event="startup" =====
2020/01/27 18:53:22.439703 ctdb-eventd[3332]: event_debug: pstree -p -a 3678:
2020/01/27 18:53:22.439764 ctdb-eventd[3332]: event_debug: 50.samba.script,3678 /etc/ctdb/events/legacy/50.samba.script startup
2020/01/27 18:53:22.439822 ctdb-eventd[3332]: event_debug:   `-service,3758 /sbin/service nmbd start
2020/01/27 18:53:22.439877 ctdb-eventd[3332]: event_debug:       `-service,3762 /sbin/service nmbd start
2020/01/27 18:53:22.439953 ctdb-eventd[3332]: event_debug:           |-sed,3764 -ne s/\.socket\s*[a-z]*\s*$/.socket/p
2020/01/27 18:53:22.440012 ctdb-eventd[3332]: event_debug:           `-systemctl,3763 list-unit-files --full --type=socket
2020/01/27 18:53:22.440068 ctdb-eventd[3332]: event_debug: ---- ctdb scriptstatus startup: ----
2020/01/27 18:53:22.440133 ctdb-eventd[3332]: event_debug: 00.ctdb              OK         0.017 Mon Jan 27 18:52:52 2020
2020/01/27 18:53:22.440203 ctdb-eventd[3332]: event_debug: 01.reclock           OK         0.010 Mon Jan 27 18:52:52 2020
2020/01/27 18:53:22.440259 ctdb-eventd[3332]: event_debug: 05.system            OK         0.010 Mon Jan 27 18:52:52 2020
2020/01/27 18:53:22.440314 ctdb-eventd[3332]: event_debug: 10.interface         OK         0.064 Mon Jan 27 18:52:52 2020
2020/01/27 18:53:22.440382 ctdb-eventd[3332]: event_debug: 50.samba             TIMEDOUT   Mon Jan 27 18:52:52 2020
2020/01/27 18:53:22.440438 ctdb-eventd[3332]: event_debug:   OUTPUT:
2020/01/27 18:53:22.440492 ctdb-eventd[3332]: event_debug: event daemon helper failed with error 46
2020/01/27 18:53:22.440558 ctdb-eventd[3332]: event_debug: ===== End of hung script debug for PID="3678", event="startup" =====

The weird thing is this was happening on my two nodes last week but when I fired them both up again the first node worked and the second node gives me this error.

I am enabling the script with

ctdb event script enable legacy 50.samba

Here is my smb.conf

[global]
        workgroup = WORKGROUP2
        clustering = yes
        netbios name = gluster
        idmap backend = tdb2

[share]
        path = /mnt/gfs/share
        valid users = fsuser
        readonly = no
        browsable = yes

I am running ubuntu server 19.10 with the latest ctdb and samba. The shared file system is glusterfs and that portion is working as it should and passes the ping_pong test.

I also am seeing this message using journalctl -b

Dec 03 16:28:18 gfs1 systemd[1]: /lib/systemd/system/dbus.socket:4: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket; please update the unit file acc
Dec 03 16:28:18 gfs1 systemd[1]: /lib/systemd/system/smbd.service:9: PIDFile= references a path below legacy directory /var/run/, updating /var/run/samba/smbd.pid → /run/samba/smbd.pid; please update the unit file accordingly.
Dec 03 16:28:18 gfs1 systemd[1]: /lib/systemd/system/nmbd.service:9: PIDFile= references a path below legacy directory /var/run/, updating /var/run/samba/nmbd.pid → /run/samba/nmbd.pid; please update the unit file accordingly.
Dec 03 16:28:18 gfs1 systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
hcker2000
  • 101
  • 3

2 Answers2

0

The pstree output suggests that "service nmbd start" is hanging when it tries to do systemd things.

What happens if you try "service nmbd start" in a terminal? How about "systemctl start nmbd"?

  • When I run sudo systemctl start nmbd while ctdb is running it starts up fine. If I disable the ctdb samba script and restart ctdb and then start nmbd and smbd everything seems to work as it should. – hcker2000 Jan 28 '20 at 14:45
0

I have found a work around to this. I disable the ctdb samba legacy script and use the normal systemctl startup scripts.

sudo systemctl edit ctdb

Add the following and save and exit

[Unit]
Require=mnt-gfs.mount
After=mnt-gfs.mount

To find out your .mount you can run this command and switch out the mount patch with your glusterfs or other distributed files systems mount point.

sudo systemctl list-units | grep '/mnt/gfs' | awk '{ print $1 }'

Then its just a mater of editing the smbd and nmbd service files.

sudo systemctl edit smbd.service
sudo systemctl edit nmbd.service

Then add this to both of the above files, save and exit each one

[Unit]
After=ctdb.service

Make sure ctdb is up and running and run this command (start it with systemctl start ctdb if its not running)

sudo ctdb event script enable legacy 50.samba

Reboot your node and it should mount your distributed file system share, start ctdb and then start smbd and nmbd.

hcker2000
  • 101
  • 3