I am currently upgrading my ELK stack from version 8.19.14 to version 9.3.3.
After setting up Windows Task Scheduler to start the services automatically, I found that Kibana reports the following error in kibana.log. However, if I manually execute kibana.bat, Kibana starts without any issue.
Has anyone encountered this before, or does anyone know what might be causing the difference between starting Kibana manually and starting it through Windows Task Scheduler?
[2026-05-15T09:34:42.299+08:00][INFO ][root] Kibana is shutting down
[2026-05-15T09:34:42.300+08:00][FATAL][root] Reason: Unable to complete saved object migrations for the [.kibana_usage_counters] index. Please check the health of your Elasticsearch cluster and try again. Unexpected Elasticsearch ResponseError: statusCode: 404, method: DELETE, url: /_pit error: [undefined]: {"succeeded":false,"num_freed":0},
Error: Unable to complete saved object migrations for the [.kibana_usage_counters] index. Please check the health of your Elasticsearch cluster and try again. Unexpected Elasticsearch ResponseError: statusCode: 404, method: DELETE, url: /_pit error: [undefined]: {"succeeded":false,"num_freed":0},
*at migrationStateActionMachine (D:\\ELK\\kibana-9.3.3\\node_modules\\@kbn\\core-saved-objects-migration-server-internal\\src\\migrations_state_action_machine.js:118:13)*
*at processTicksAndRejections (node:internal/process/task_queues:105:5)*
*at D:\\ELK\\kibana-9.3.3\\node_modules\\@kbn\\core-saved-objects-migration-server-internal\\src\\run_v2_migration.js:162:22*
*at async Promise.all (index 1)*
*at KibanaMigrator.runMigrationsInternal (D:\\ELK\\kibana-9.3.3\\node_modules\\@kbn\\core-saved-objects-migration-server-internal\\src\\kibana_migrator.js:172:16)*
*at SavedObjectsService.start (D:\\ELK\\kibana-9.3.3\\node_modules\\@kbn\\core-saved-objects-server-internal\\src\\saved_objects_service.js:215:7)*
*at Server.start (D:\\ELK\\kibana-9.3.3\\node_modules\\@kbn\\core-root-server-internal\\src\\server.js:437:31)*
*at Root.start (D:\\ELK\\kibana-9.3.3\\node_modules\\@kbn\\core-root-server-internal\\src\\root\\index.js:67:14)*
*at bootstrap (D:\\ELK\\kibana-9.3.3\\node_modules\\@kbn\\core-root-server-internal\\src\\bootstrap.js:119:5)*
*at Command.<anonymous> (D:\\ELK\\kibana-9.3.3\\src\\cli\\serve\\serve.js:236:5)*