Troubleshooting Tip: Upgrade stuck at ClickHouse database schema upgrade stage
| Description | This article describes how to troubleshoot issues where the upgrade hangs at the ClickHouse database schema upgrade stage. This occurs if the ClickHouse schema DB file is missing on the supervisor or worker nodes that are being upgraded. |
| Scope | FortiSIEM v7.X with ClickHouse as event storage. |
| Solution | Supervisor or worker node gets stuck while running the ClickHouse schema upgrade, as the following script would run and would go in loop if the/opt/phoenix/bin/clickhouse_config.db file is missing on the host that is being upgraded.
/opt/phoenix/deployment/clickhouse_upgrade/clickhouse_db_up_7.0.2_to_7.1.0.sh
Cause: Follower supervisor or worker nodes where storage was manually formatted and mounted before GUI configuration do not complete automatic ClickHouse initialization. This results in missing /opt/phoenix/bin/clickhouse_config.db file, which stores the ClickHouse schema version needed for upgrades.
Solution:
chown admin.admin /opt/phoenix/bin/clickhouse_config.db chmod 755 /opt/phoenix/bin/clickhouse_config.db
su -l admin -c '/usr/bin/sqlite3 /opt/phoenix/bin/clickhouse_config.db "SELECT * FROM configs"'
|
