[Samba] testparm: /var/run/ctdb/ctdb.socket missing

Martin Schwenke martin at meltin.net
Fri Jan 18 06:33:12 UTC 2019


Hi Neil,

On Thu, 17 Jan 2019 22:22:35 -0800, "Neil Richardson \(mail filter\)
via samba" <samba at lists.samba.org> wrote:

> Apologies in advance, but I have been banging my head against this
> and the only Google results I've found are from 2014, and don't work
> (or apply).
> 
> OS: Ubuntu 18.04 bionic
> smbd: 4.9.4-Debian (the apt.van-belle.nl version)
> 
> 
> 
> When I run `testparm` I get:
> 	rlimit_max: increasing rlimit_max (8192) to minimum Windows limit
> (16384)
> 	WARNING: The "syslog" option is deprecated
> 	connect(/var/run/ctdb/ctdbd.socket) failed: No such file or directory
> 	ctdbd_connect failed: No such file or directory
> 	ctdbd_init_connection: ctdbd_init_connection_internal failed (No
> such file or directory)
> 	Unable to initialize messaging context!
> 
> 
> Yet:
> 	$ ls -Fla /var/run/ctdb/
> 	total 0
> 	drwxrwxrwx  2 root root   40 Jan 15 21:56 ./
> 	drwxr-xr-x 30 root root 1100 Jan 15 21:29 ../
> 
> 
> As you can see, I even made the directory world-writeable in case it
> was a problem with ctdb/samba somehow now being able to write into
> the folder.
> 
> I've seen lots of threads [1][2] where they say "Just `mkdir -p` the
> directory" but those are typically referring to `/var/lib/run/ctdb`
> (which I also tried creating, but it didn't help).
> 
> 
> [1] https://ubuntuforums.org/showthread.php?t=2317968
> [2]
> https://lists.samba.org/archive/samba-technical/2014-August/101726.html
> 
> 
> 
> It seems to have everything it's asking for but is still not
> happy...what am I missing?

I'm going to assume that you actually want CTDB, that clustering is
enabled in your smb.conf (given that you're getting this error) and
that ctdbd is actually running.  That last might be worth
double-checking...

If all that is true, then something is probably "interesting" with the
packaging for CTDB in 4.9.  :-)

If you run CTDB with NOTICE level logging - that is, with this
is /etc/ctdb/ctdb.conf (or similar, depending on packaging)

  [logging]
     log level = NOTICE

then the location of the socket will be logged when ctdbd starts.
Something like this:

  2019-01-10T17:41:27.186765+11:00 m1n3 ctdbd[10156]: CTDB starting on node
  2019-01-10T17:41:27.194064+11:00 m1n3 ctdbd[10157]: Starting CTDBD (Version 4.10.0pre1.GIT.345317c) as PID: 10157
  2019-01-10T17:41:27.194156+11:00 m1n3 ctdbd[10157]: Created PID file /var/run/ctdb/ctdbd.pid
  2019-01-10T17:41:27.194218+11:00 m1n3 ctdbd[10157]: Removed stale socket /var/run/ctdb/ctdbd.socket
  2019-01-10T17:41:27.194290+11:00 m1n3 ctdbd[10157]: Listening to ctdb socket /var/run/ctdb/ctdbd.socket

You should then be able to see if the socket location being used by
ctdbd is what testparm/smbd/smb.conf expects.

peace & happiness,
martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba/attachments/20190118/0f14649c/attachment.sig>


More information about the samba mailing list