I migrated to a new server (Almalinux 9, MW 1.39, ElasticSearch 7.10.2) and when I run php ForceSearchIndex.php --skipLinks --indexOnSkip
I get the above error message.
Then I ran php UpdateSearchIndexConfig.php --startOver
and I was able to (apparently) create an index with
php ForceSearchIndex.php --skipLinks --indexOnSkip php ForceSearchIndex.php --skipParse
But checking no autocomplete or search results appeared. Checking the indexes path, there were very small files.