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

Achim Gottinger achim at ag-web.biz
Sat Aug 16 10:09:44 MDT 2014


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/ ?
> 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)
> #		CTDB_SERVICE_SMB=${CTDB_SERVICE_SMB:-smbd}
> #		CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-""}
> 		CTDB_SERVICE_SMB=smbd
> 		;;
> 	*)
> 		# Use redhat style as default:
> #		CTDB_SERVICE_SMB=${CTDB_SERVICE_SMB:-smb}
> #		CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-""}
> 		CTDB_SERVICE_SMB=smbd
> 		;;
> esac
>
> 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.




More information about the samba mailing list