[Samba] CTDB: Failed to connect client socket to daemon.

steve steve at steve-ss.com
Sat Aug 16 11:39:48 MDT 2014


On Sat, 2014-08-16 at 18:09 +0200, Achim Gottinger wrote:
> Am 16.08.2014 15:52, schrieb steve:
> > Ubuntu 14.04, ctdb 2.5.3, samba 4.1.11. CTDB is working with IP takeover
> > between the 2 nodes. The machine is joined to the domain.
> >
> > Any help with the following errors would be most gratefully received.
> >
> > 1. connect to socket error:
> > ctdb status
> > 2014/08/16 15:32:03.248034 [23255]: client/ctdb_client.c:267 Failed to
> > connect client socket to daemon. Errno:Connection refused(111)
> > common/cmdline.c:156 Failed to connect to daemon
> What's the output of ls -l /usr/local/var/run/ctdb/ ?
 ls -l /usr/local/var/run/ctdb
total 0
srwx------ 1 root root 0 ago 16 19:32 ctdbd.socket

The socket is there and is renewed upon each ctdb (re) start. smb.conf
refers to the same socket.


> > 2014/08/16 15:32:03.261221 [23255]: Failed to init ctdb
> >
> >   /etc/default/ctdb
> > CTDB_NODES=/etc/ctdb/nodes
> > CTDB_PUBLIC_ADDRESSES=/etc/ctdb/public_addresses
> > CTDB_MANAGES_SAMBA=yes
> > CTDB_SYSLOG=yes
> > CTDB_DEBUGLEVEL=NOTICE
> > CTDB_SOCKET=/usr/local/var/run/ctdb/ctdbd.socket
> >
> >
> > /usr/local/samba/etc/smb.conf
> > [global]
> > workgroup = ALTEAfrom /etc/defaults/
> > realm = ALTEA.SITE
> > security = ADS
> > kerberos method = secrets and keytab
> > netbios name = SMBCLUSTER
> > disable netbios = Yes
> > clustering = Yes
> > ctdbd socket = /usr/local/var/run/ctdb/ctdbd.socket
> > [users]
> > path = /cluster/users
> > read only = No
> >
> > **************
> > /etc/ctdb/50.samba
> >
> > ps aux|grep ctdbd
> > root     25902  3.3  3.6  26772 18460 ?        SLs  15:38
> > 0:08 /usr/sbin/ctdbd --pidfile=/var/run/ctdb/ctdbd.pid
> > --nlist=/etc/ctdb/nodes --socket=/usr/local/var/run/ctdb/ctdbd.socket
> > --public-addresses=/etc/ctdb/public_addresses -d NOTICE --syslog
> > root     25904  0.0  0.0   3012   396 ?        S    15:38
> > 0:00 /usr/sbin/ctdbd --pidfile=/var/run/ctdb/ctdbd.pid
> > --nlist=/etc/ctdb/nodes --socket=/usr/local/var/run/ctdb/ctdbd.socket
> > --public-addresses=/etc/ctdb/public_addresses -d NOTICE --syslog
> > root     26048  0.6  0.1  13404   792 ?        S    15:38
> > 0:01 /usr/sbin/ctdbd --pidfile=/var/run/ctdb/ctdbd.pid
> > --nlist=/etc/ctdb/nodes --socket=/usr/local/var/run/ctdb/ctdbd.socket
> > --public-addresses=/etc/ctdb/public_addresses -d NOTICE --syslog
> > **************
> >
> > 2. CTDB does not start smbd but is started correctly (with response from
> > ctdb) upon:
> > sudo service smbd start
> >
> > /etc/ctdb/events.d/50.samba
> > #!/bin/sh
> > # ctdb event script for Samba
> >
> > [ -n "$CTDB_BASE" ] || \
> >      export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD")
> >
> > . $CTDB_BASE/functions
> >
> > detect_init_style
> >
> > case $CTDB_INIT_STYLE in
> > 	suse)
> > 		CTDB_SERVICE_SMB=${CTDB_SERVICE_SMB:-smb}
> > 		CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-nmb}
> > 		;;
> > 	debian)
**comments
> > #		CTDB_SERVICE_SMB=${CTDB_SERVICE_SMB:-smbd}
> > #		CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-""}
**added
> > 		CTDB_SERVICE_SMB=smbd
> > 		;;
> > 	*)
> > 		# Use redhat style as default
**comments
> > #		CTDB_SERVICE_SMB=${CTDB_SERVICE_SMB:-smb}
> > #		CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-""}
**added
> > 		CTDB_SERVICE_SMB=smbd
> > 		;;
> > esac
> >
** changed samba to smbd
> > service_name="smbd"
> >
> > loadconfig
> >
> > ctdb_setup_service_state_dir
> >
> > CTDB_SERVICE_SMB=smbd
> > service_start ()
> > {
> >      # make sure samba is not already started
> > echo $CTDB_SERVICE_SMB
> > exit 1
> Is it intentional to echo "smbd" and exit here?
> Id verify maybe with an few echo statements that all the CTDB variables  
> from /etc/default/ctdb get passed to that script.
> Read you copied the samba start script from an wiki can be it assumes 
> variables in /etc/sysconfig/ctdb.
> 
Hi
The changes we made were necessary for ubuntu. In ubuntu smbd is called
smbd, not either samba or smb.

The script is from the standard Ubuntu ctdb and samba install using
synaptic. Because samba on ubuntu is not built with cluster support, we
built 4.1.11 from source. The script at /etc/init.d/smbd works fine
manually using:
sudo service smbd start
etc. etc.

Cheers,
Steve






More information about the samba mailing list