Thanks,
i added "Environment=PATH=$PATH:/usr/local/samba/bin:/bin". Needed
also
to add "/bin" because couldnt find "sleep".
Thats the script now:
----
[Unit]
Description=CTDB
Documentation=man:ctdbd(1) man:ctdb(7)
After=network-online.target time-sync.target
ConditionFileNotEmpty=/usr/local/samba/etc/ctdb/nodes
[Service]
Environment=PATH=$PATH:/usr/local/samba/bin:/bin
Type=forking
LimitCORE=infinity
LimitNOFILE=1048576
PIDFile=/usr/local/samba/var/run/ctdb/ctdbd.pid
ExecStart=/usr/local/samba/sbin/ctdbd_wrapper start
ExecStop=/usr/local/samba/sbin/ctdbd_wrapper stop
KillMode=control-group
Restart=no
[Install]
WantedBy=multi-user.target
----
The errors has gone, but still throwing:
Mar? 3 10:31:52 ctdb1 systemd[1]: Starting CTDB...
Mar? 3 10:31:52 ctdb1 ctdbd[1375]: CTDB starting on node
Mar? 3 10:31:52 ctdb1 ctdbd[1385]: Starting CTDBD (Version 4.11.6) as
PID: 1385
Mar? 3 10:31:52 ctdb1 ctdbd[1385]: Created PID file
/usr/local/samba/var/run/ctdb/ctdbd.pid
Mar? 3 10:31:52 ctdb1 ctdbd[1385]: Removed stale socket
/usr/local/samba/var/run/ctdb/ctdbd.socket
Mar? 3 10:31:52 ctdb1 ctdbd[1385]: Listening to ctdb socket
/usr/local/samba/var/run/ctdb/ctdbd.socket
Mar? 3 10:31:52 ctdb1 ctdbd[1385]: Set real-time scheduler priority
Mar? 3 10:31:52 ctdb1 ctdbd[1385]: Starting event daemon
/usr/local/samba/libexec/ctdb/ctdb-eventd -P 1385 -S 13
Mar? 3 10:31:52 ctdb1 ctdb-eventd[1386]: daemon started, pid=1386
Mar? 3 10:31:52 ctdb1 ctdb-eventd[1386]: startup completed successfully
Mar? 3 10:31:52 ctdb1 ctdb-eventd[1386]: listening on
/usr/local/samba/var/run/ctdb/eventd.socket
Mar? 3 10:31:52 ctdb1 ctdbd[1385]: Set runstate to INIT (1)
*Mar? 3 10:31:52 ctdb1 ctdb-eventd[1386]: 00.ctdb: true**
**Mar? 3 10:31:52 ctdb1 ctdb-eventd[1386]: 00.ctdb: Persistent database
/usr/local/samba/var/lib/ctdb/persistent/account_policy.tdb.0 is
corrupted! CTDB will not start.*
Mar? 3 10:31:52 ctdb1 ctdb-eventd[1386]: init event failed
Mar? 3 10:31:52 ctdb1 ctdbd[1385]: ctdb exiting with error: Failed to
run init event
Mar? 3 10:31:52 ctdb1 ctdbd[1385]:
Mar? 3 10:31:52 ctdb1 ctdbd[1385]: CTDB daemon shutting down
Thanks.
Am 03.03.2020 um 10:19 schrieb L.P.H. van Belle via
samba:> Ah, yes, thats it Ralph.. Good one.
>
> Then in the systemd.service file you need to add.
>
> [Service]
> Environment=PATH=$PATH:/usr/local/samba/bin
>
>
>
>> -----Oorspronkelijk bericht-----
>> Van: samba [mailto:samba-bounces at lists.samba.org] Namens
>> Ralph Boehme via samba
>> Verzonden: dinsdag 3 maart 2020 10:13
>> Aan: Micha Ballmann; Anoop C S
>> CC: samba at lists.samba.org
>> Onderwerp: Re: [Samba] start/stop ctdb
>>
>> Am 3/3/20 um 10:05 AM schrieb Micha Ballmann via samba:
>>> Mar? 3 09:50:50 ctdb1 systemd[1]: Starting CTDB...
>>> Mar? 3 09:50:50 ctdb1 ctdbd[24663]: CTDB starting on node
>>> Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Starting CTDBD (Version
>> 4.11.6) as
>>> PID: 24667
>>> Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Created PID file
>>> /usr/local/samba/var/run/ctdb/ctdbd.pid
>>> Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Removed stale socket
>>> /usr/local/samba/var/run/ctdb/ctdbd.socket
>>> Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Listening to ctdb socket
>>> /usr/local/samba/var/run/ctdb/ctdbd.socket
>>> Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Set real-time scheduler
priority
>>> Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Starting event daemon
>>> /usr/local/samba/libexec/ctdb/ctdb-eventd -P 24667 -S 13
>>> Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: daemon started, pid=24671
>>> Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: startup completed
>> successfully
>>> Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: listening on
>>> /usr/local/samba/var/run/ctdb/eventd.socket
>>> Mar? 3 09:50:50 ctdb1 ctdbd[24667]: Set runstate to INIT (1)
>>> *Mar? 3 09:50:50 ctdb1 ctdb-eventd[24671]: 00.ctdb:
>>> /usr/local/samba/etc/ctdb/events/legacy/00.ctdb.script: 24:
>>> /usr/local/samba/etc/ctdb/events/legacy/00.ctdb.script: tdbtool:
not
>>> found**
>> you need a
>>
>> PATH=$PATH:/usr/local/samba/bin
>>
>> somewhere in you startup stuff.
>>
>> -slow
>>
>> --
>> Ralph Boehme, Samba Team https://samba.org/
>> Samba Developer, SerNet GmbH https://sernet.de/en/samba/
>> GPG-Fingerprint FAE2C6088A24252051C559E4AA1E9B7126399E46
>>
>> --
>> To unsubscribe from this list go to the following URL and read the
>> instructions: https://lists.samba.org/mailman/options/samba
>>
>>
>