Updating the tracker from the panel
How to check for and install a new release on the Updates tab, and what the tracker does if the new version does not start.
A new tracker release is installed from the panel, in Settings → Updates («Настройки → Обновления»). The tab is visible to the owner and the admin, and only the installation owner can update. Before installing, the tracker saves a copy of the data and stops receiving clicks and postbacks while copying and installing, and on an error it brings back the previous version by itself.
Where the section is and who can update
The installation owner is the owner account set when the tracker was installed, see First-run wizard. Updating is not available in log in as user mode or with an API token. Other owners and admins see the message “Updates are available only to the installation owner” («Обновления доступны только владельцу установки»).
The top of the tab shows:
- Installed version («Установленная версия») and the “Client installation” («Клиентская установка») label;
- the “Last check” («Последняя проверка») line with a date, or “Check for a new release.” («Проверьте наличие нового выпуска.») if there have been no checks yet;
- the “Installation service” («Служба установки») line — the version of the service that performs updates on the server.
With the “Development environment” («Среда разработки») label, there is no Check for updates («Проверить обновления») button: updating from the panel does not apply in such an environment.
Checking for updates
- Open Settings → Updates.
- Click Check for updates.
- Wait until “Done” («Готово») appears in the “Update check” («Проверка обновлений») block.
The tracker loads the release list and checks its signature and validity period. Traffic does not stop during the check.
The result is one of two:
- a “Version … available” («Доступна версия …») card with the release description, a “Release size” («Размер выпуска») line and an Install… («Установить…») button;
- the line “The current release is installed.” («Установлен текущий выпуск.») — there is nothing to update.
If the Install… button is inactive and the message “First update the installation service on the server: bash install.sh --update-controller. The running tracker is kept.” («Сначала обновите службу установки на сервере: bash install.sh --update-controller. Работающий трекер сохраняется.») is shown above the card, follow the steps on the Updating the installation service page.
Installation
While copying and installation are in progress, campaign links and the postback URL respond with code 503: clicks and postbacks are not recorded during this time. The panel does not load data; only the update progress is shown. The length of the pause depends on the amount of data.
- Click Install… in the “Version … available” card.
- In the “Update to …?” («Обновить до …?») window, check the box “I allow receiving clicks and postbacks to be paused while copying and updating. The duration depends on the amount of data.” («На время копирования и обновления разрешаю приостановить приём кликов и постбеков. Длительность зависит от объёма данных.»)
- Click Create a copy and update («Создать копию и обновить»).
- Follow the stages in the “Updating to …” («Обновление до …») block.
| Stage | What happens | Traffic |
|---|---|---|
| Checking the release («Проверка выпуска») | The release list is loaded and checked again | Flowing |
| Downloading the release («Загрузка выпуска») | The archive is downloaded; its size, checksum, signature and compatibility with the installed version are verified | Flowing |
| Checking compatibility («Проверка совместимости») | The server, the tracker services and the free space for the copy are checked | Flowing |
| Creating a backup («Создание резервной копии») | Traffic intake is closed, services are stopped, and the data is copied to the server's disk | Paused |
| Installing the new version («Установка новой версии») | The installation files are replaced | Paused |
| Checking startup («Проверка запуска») | The new version starts; the services, databases and the panel login page are checked | Paused |
| Done | Traffic is open | Flowing |
You can leave the tab open: the update progress stays visible while the panel restarts. The line “Connection to the service is temporarily unavailable. Waiting for it to recover; this is not the result of the operation yet.” («Связь со службой временно недоступна. Ожидаем восстановления; это ещё не результат операции.») is not an error; wait for the next stage.
An error at any of the first three stages cancels the installation before the pause: the running version and traffic are not affected. The stage changes to “Not completed” («Не завершено»), and the reason appears below it — see Messages and what to do.
Check
- Wait for the “Done” stage.
- Make sure the Installed version field shows the new version and the line “The current release is installed.” appears below it.
- Expand Operation history («История операций»): the row with the version number shows the “Done” result.
For the state of the services after the update, see System status.
The copy made before the update
The copy is created while the services are stopped and is stored on this same server. It is needed for the automatic return and does not replace backups on a separate storage server. After the update, the copy stays on disk and is not deleted by itself. For how to check, pin and clean up such copies, see Local update copies.
Automatic rollback
If an error occurs after the pause has started, the tracker brings back the previous version by itself:
- an error while creating the copy — the services start again and traffic opens;
- an error during installation or the startup check — the previous installation files and the data from the copy are brought back, and the previous version starts.
In the operation block, the stage changes to “Returning the previous version” («Возвращаем предыдущую версию»), then to “Previous version restored” («Предыдущая версия восстановлена») with the text “The new version failed the check. The previous version and the data have been restored.” («Новая версия не прошла проверку. Предыдущая версия и данные восстановлены.») If the server rebooted during the update, the installation service performs the return after the server starts.
The rollback applies only to an installation that has not finished. After the “Done” stage, you cannot bring back the previous version from the panel, and the tracker does not accept an older release.
Lock
If the return to the previous version fails, the operation block shows the stage “Restore by the server administrator needed” («Нужно восстановление администратором сервера») and the text “Automatic restore did not complete. Traffic remains paused. A server administrator needs to check it.” («Автоматическое восстановление не завершилось. Трафик остаётся на паузе. Нужна проверка администратором сервера.») New checks and installations do not start until the lock is removed.
From here, the server administrator takes over. The update information is saved: once the cause is fixed, restart the installation service.
sudo systemctl restart micator-updates.serviceIn installations made before this release, the service is called tracker-updates.service, see names in such installations.
On startup, the service repeats the return to the previous version. After a successful return, traffic opens and the lock is removed. For how to view the service state, see Installation files, ports, services and logs.
Do not delete the .updates/journal.json file in the installation directory: the service uses it to bring back the previous version and the data.
Messages and what to do
| Message | What to do |
|---|---|
| “Update service unavailable” («Служба обновлений недоступна») | The installation service on the server does not respond. The server administrator checks its state — see systemd services |
| “Another operation is already running on the server. Wait for it to finish.” («На сервере уже выполняется другая операция. Дождитесь её завершения.») | Another operation is running, for example a backup or a restore. Try again later |
| “Could not download the release. The running version has been kept.” («Не удалось загрузить выпуск. Работающая версия сохранена.») | The server did not download the release list or the archive over HTTPS. Try again later |
| “The release list is outdated or failed verification. Check for updates again.” («Список выпусков устарел или не прошёл проверку. Проверьте обновления ещё раз.») | The list's validity period has expired, or the list does not fit this installation. Run the check again later |
| “The available release has changed. Check for updates again.” («Доступный выпуск изменился. Проверьте обновления ещё раз.») | A different release appeared in the list after the last check. Click Check for updates |
| “The release signature or integrity was not confirmed. Installation canceled.” («Подпись или целостность выпуска не подтверждена. Установка отменена.») | The release list or the archive failed signature verification. Run the check and the installation again |
| “Not enough space on the server for the release and the backup.” («На сервере недостаточно места для выпуска и резервной копии.») | Free up disk space, for example clean up old update copies |
| “This release requires a separate migration. Automatic update is unavailable.” («Для этого выпуска требуется отдельная миграция. Автоматическое обновление недоступно.») | The release cannot be installed from the panel over the installed version. The running version is not affected |
| “First update the installation service on the server: bash install.sh --update-controller. The running tracker is kept.” | Follow the steps on the Updating the installation service page |
| “The operation was interrupted before the version changed. You can run it again.” («Операция прервана до смены версии. Её можно запустить снова.») | The installation service restarted during the operation. Run the operation again |
| “The operation was not completed. Check the server state and try again.” («Операция не завершена. Проверьте состояние сервера и повторите попытку.») | Check on the System status page that all services are running, and that the disk has enough space for the data copy. Then try again |
| “The installation configuration has changed. A server administrator needs to check it.” («Конфигурация установки изменилась. Нужна проверка администратором сервера.») | The files in the installation directory do not match the installed release. Contact the server administrator |
| “Access to the operation progress has expired. Refresh the state after logging in to the panel.” («Срок доступа к ходу операции истёк. Обновите состояние после входа в панель.») | Refresh the page. The result is in the Operation history block |