Web lists-archives.com

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




Hai, 


> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces@xxxxxxxxxxxxxxx] Namens 
> Martin Schwenke via samba
> Verzonden: vrijdag 18 januari 2019 7:33
> Aan: Neil Richardson (mail filter)
> CC: samba@xxxxxxxxxxxxxxx
> Onderwerp: Re: [Samba] testparm: /var/run/ctdb/ctdb.socket missing
> 
> Hi Neil,
> 
> On Thu, 17 Jan 2019 22:22:35 -0800, "Neil Richardson \(mail filter\)
> via samba" <samba@xxxxxxxxxxxxxxx> 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/10
1726.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.  :-)

I did few small tests here. 

Jan 18 09:21:47 ubuntu1804 ctdbd: CTDB logging to location file:/var/log/ctdb/log.ctdb
Jan 18 09:21:48 ubuntu1804 systemd[1]: Started CTDB.
root@ubuntu1804:~# cat /var/log/ctdb/log.ctdb
2019/01/18 09:21:47.393471 ctdbd[1749]: CTDB starting on node
2019/01/18 09:21:47.393496 ctdbd[1749]: Recovery lock not set
2019/01/18 09:21:47.395036 ctdbd[1750]: Starting CTDBD (Version 4.9.4.Debian) as PID: 1750
2019/01/18 09:21:47.395116 ctdbd[1750]: Created PID file /var/run/ctdb/ctdbd.pid
2019/01/18 09:21:47.395156 ctdbd[1750]: Listening to ctdb socket /var/run/ctdb/ctdbd.socket
2019/01/18 09:21:47.395177 ctdbd[1750]: Set real-time scheduler priority
2019/01/18 09:21:47.395406 ctdbd[1750]: Starting event daemon /usr/lib/x86_64-linux-gnu/ctdb/ctdb-eventd -P 1750 -S 14
2019/01/18 09:21:47.398607 ctdbd[1750]: Set runstate to INIT (1)

ls -Fal /var/run/ctdb/
total 8
drwxr-xr-x  2 root root 140 Jan 18 09:51 ./
drwxr-xr-x 21 root root 660 Jan 18 09:51 ../
-rw-r--r--  1 root root   5 Jan 18 09:51 ctdbd.pid
srwx------  1 root root   0 Jan 18 09:51 ctdbd.socket=
-rw-r--r--  1 root root   5 Jan 18 09:51 eventd.pid
srwxr-xr-x  1 root root   0 Jan 18 09:51 eventd.socket=
-rw-r--r--  1 root root   0 Jan 18 09:51 .socket_lock

So, your doing something wrong somewhere, but i dont know ctdb that good. 
But the packages are fine. 

> 
> 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.

The defaults 
        ctdbd socket =
        ctdb locktime warn threshold = 0
        ctdb timeout = 0

Imo he has forgoten to set, or he did set this but, ctdb is not running. 

        ctdbd socket = /var/run/ctdb/ctdbd.socket

Greetz, 

Louis


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba