Created on
04-25-2023
03:22 AM
Edited on
05-29-2025
06:53 AM
By
Stephen_G
| Description | This articles describes troubleshooting steps to resolve the cause of missing logs in FortiAnalyzer. |
| Scope | FortiAnalyzer. |
| Solution |
diagnose sql show db-size ERROR: Failed to connect to server. Command fail. Return code -1002
diagnose sql process list ERROR: Failed to connect to server. Command fail. Return code -1002
diag debug application sqlplugind 8 sqlplugind debug filter: ""
diag debug enable
FAZ # [1681699040] DEBUG: sqlplugind(1361):dbplugin.c:2879: Waiting for postgres server up... [1681699040] WARNING: sqlplugind(1350):pgsvr_main.c:1432: Postgres is not running. [1681699042] INFO: sqlplugind(1350):pgsvr_main.c:1496: Starting postgres server... [1681699044] INFO: sqlplugind(1350):pgsvr_main.c:817: creating airflow folder. [1681699046] DEBUG: sqlplugind(1361):pq_plugin.c:19: set PQconnectdb options parameter=[options='-c TimeZone=Asia/Kuala_Lumpur'] [1681699046] ERROR: sqlplugind(1361):pq_plugin.c:24: Cannot connect to database, error: FATAL: the database system is starting up [1681699046] INFO: sqlplugind(1361):dbplugin.c:2889: Retry on connecting db... [1681699051] DEBUG: sqlplugind(1361):pq_plugin.c:19: set PQconnectdb options parameter=[options='-c TimeZone=Asia/Kuala_Lumpur'] [1681699051] ERROR: sqlplugind(1361):pq_plugin.c:24: Cannot connect to database, error: FATAL: the database system is starting up [1681699051] INFO: sqlplugind(1361):dbplugin.c:2889: Retry on connecting db...
If the FortiAnalyzer is hardware, also check the raid status:
diag system raid status
Mega RAID: RAID Level: Raid-50 RAID Status: Degraded
execute sql-local rebuild-db <-- will trigger a reboot of the device.
diag sql status rebuild-db <-- rebuild % will gradually increase.
diagnose sql remove rebuild-db-flag
Then change the start-time from the default value. For example, if the analytics policy is set for 60 days, it is recommended to change the start-time to count 60 days before the current day.
set start-time <for ex:00:00 2023/01/01> end
|
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.