I have read a lot (everywhere) and tried a lot but I keep getting the message:
One or more indexers are invalid. Make sure your Magento cron job is running.
And this only counts for Catalog Search, if I try in SSH I get this error:
Catalog Search index process error during indexation process:
405 Method Not Allowed
Hello Lightme,
I hope you are doing well!
The 405 error is caused merely by a server-side problem. If it displays the 405 Not Allowed error message, you will have several options to solve this problem. You can resolve the error in the following ways,
Enable HTTP methods:
Look upon the settings of the software components that are responsible for responding to HTTP requests. It can be controlled using the AllowMethods directive in the <Location> containers, which is needed to define settings for one or more desired URLs. You will have to implement the following entry:
<Location "/">
AllowMethods GET POST OPTIONS
</Location>
Change up the source code:
/etc/apache2/sites-available/elasticsearch.conf
=> paste this code:
<VirtualHost *:8080>
ProxyPass "/" "http://localhost:9200/"
ProxyPassReverse "/" "http://localhost:9200/"
</VirtualHost>
sudo a2ensite elasticsearch.conf
Please change all indexers as Update by Schedule mode in system-> index management.
Review if you have a named “default” stock source on your admin. Under Stores > Inventory > Sources. If you don’t have this one, let’s create it. If the problem persists, try running the following commands below:
rm -rf generated/*
php bin/magento indexer:reset
php bin/magento indexer:reindex
php bin/magento cache:clean
I hope the above fixes help you resolve the 405 http error.
----------------------------
Regards,
Rex M