It took me a while to find out, why this backup script would not start. Finally, I found this error message: sudo: sorry, you must have a tty to run sudo
. The sudo call is required to execute clustat
and find out, which machine is the current master.
sudo
is configured to execute clustat
without password and works fine on the command line - so what’s wrong here?
The solution is easy: some distributions enable the setting requiretty
. This looks like:
Defaults requiretty
in visudo
. After commenting out this setting (you must be root
for doing this), my cronjob started without any trouble.
Categories:
[Software]