Description
On a minimal Ubuntu 24.04 installation, the http-host-autoupdate command completes successfully and installs /etc/cron.d/ofm_http_host, but automatic synchronization never runs because the cron package is not installed.
The installer does not report an error or warning about the missing cron daemon.
Environment
- Ubuntu 24.04 LTS minimal installation
- OpenFreeMap commit:
8892fc6e1dd7433826c9e9b88f3b9915c7e7e135
- Installation command:
python init-server.py http-host-autoupdate --user root -y SERVER_IP
Actual behavior
The cron file is installed correctly at:
/etc/cron.d/ofm_http_host
Its contents are:
* * * * * ofm /usr/bin/flock -n /tmp/http_host.lockfile -c 'sudo /data/ofm/venv/bin/python -u /data/ofm/http_host/bin/http_host.py sync >> /data/ofm/http_host/logs/http_host_sync.log 2>&1'
However, the cron service does not exist:
$ systemctl is-enabled cron
not-found
$ systemctl is-active cron
inactive
No automatic synchronization is executed and http_host_sync.log is not created.
Despite this, http-host-autoupdate exits successfully.
Expected behavior
Running http-host-autoupdate should install and enable the cron daemon, or fail with a clear error if no cron daemon is available.
Workaround
Installing and enabling cron fixes the issue:
sudo apt-get install -y cron
sudo systemctl enable --now cron
After this, the synchronization job runs successfully every minute and writes to:
/data/ofm/http_host/logs/http_host_sync.log
Suggested fix
Add cron to the base package list and ensure that the service is enabled:
sudo apt-get install -y cron
sudo systemctl enable --now cron
It may also be useful for http-host-autoupdate to verify that the cron service is active after installing /etc/cron.d/ofm_http_host.
Description
On a minimal Ubuntu 24.04 installation, the
http-host-autoupdatecommand completes successfully and installs/etc/cron.d/ofm_http_host, but automatic synchronization never runs because thecronpackage is not installed.The installer does not report an error or warning about the missing cron daemon.
Environment
8892fc6e1dd7433826c9e9b88f3b9915c7e7e135Actual behavior
The cron file is installed correctly at:
Its contents are:
However, the cron service does not exist:
No automatic synchronization is executed and
http_host_sync.logis not created.Despite this,
http-host-autoupdateexits successfully.Expected behavior
Running
http-host-autoupdateshould install and enable the cron daemon, or fail with a clear error if no cron daemon is available.Workaround
Installing and enabling
cronfixes the issue:sudo apt-get install -y cron sudo systemctl enable --now cronAfter this, the synchronization job runs successfully every minute and writes to:
Suggested fix
Add
cronto the base package list and ensure that the service is enabled:sudo apt-get install -y cron sudo systemctl enable --now cronIt may also be useful for
http-host-autoupdateto verify that the cron service is active after installing/etc/cron.d/ofm_http_host.