We are deploying FDB 6.2 on Ubuntu 16.04. When restarting the service, I got the following error:
root@nontls62-storage-02-7d9d989ffd-d9cpv:~# service foundationdb restart
/etc/init.d/foundationdb: line 94: log_daemon_msg: command not found
command terminated with exit code 137
506 k8s $
In addition to the error, the restart also exited the Shell. In the above the first line is my Kubernetes pod’s Shell, and the fourth line is my local Mac Shell.
log_daemon_msg comes from /lib/lsb/init-functions, and /etc/init.d/founationdb has commented out:
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
# Installation failed on Ubuntu 16.04 or later due to init-functions calling systemctl which tries to find foundationdb.service
# under /lib/systemd/system. Hence comment out it for now.
# . /lib/lsb/init-functions
So you can try uncommenting that include, and see what happens. In general, our Ubuntu packages have been kind of stranded by the init system change, as trying to keep one package compatible across both has been… rather challenging.
The definitions of the log_* functions aren’t that complicated either, and other projects have just copied them into the init script, which we could also do. If you copy the definition of log_daemon_msg and log_end_msg from wherever they’re defined in /lib/init/ , does the script then run and work for you?
Thanks for the tips. I tried them and also with a new OS version. Here is what I’ve found out.
With Ubuntu 16.04, uncommenting the line of /lib/lsb/init-functions would get rid of the log_daemon_msg errors, but it would still exit the shell.
Copying specific functions to /etc/init.d/foundationdb has the same behavior.
I built another Docker image with “Ubuntu 18.04.3 LTS”, and uncommented the line. This would get rid of the error msgs AND stay in the shell! That’s nice.
My question now: is Ubuntu 18.04 a good version for FDB 6.2?
I met the same problem running service foundationdb restart on a local dockerized container running on Ubuntu 20.04:
root@b5e2288f16ba:/# service foundationdb restart
/etc/init.d/foundationdb: line 94: log_daemon_msg: command not found
/etc/init.d/foundationdb: line 100: log_end_msg: command not found
I resolved the issue running instead: service foundationdb stop && sudo service foundationdb start. It seems that & two-steps process is working.