- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Magento 2.4 : impossible d’ajouter un produit et d'indexer catalogue
Bonjour
J'ai installé une nouvelle boutique.
Le tout (presque) fonctionne.
J'ai supprimé tous les produits, mais dès que je veux créer un nouveau j'ai une erreur de stock et aussi j'ai le message en haut :
Un ou plusieurs indexes sont invalides. Assurez-vous que le CRON Magento est lancé.
Via la commande, je lance :
bin/magento cron:run
Ran jobs by schedule.
Qu'est ce je dois faire pour que ça fonctionne svp.
Merci infiniment
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento 2.4 : impossible d’ajouter un produit et d'indexer catalogue
Hello @khalid_khalid2 ,
Run below command :
php bin/magento indexer:reindex
php bin/magento cache:flush
Hope it helps !
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento 2.4 : impossible d’ajouter un produit et d'indexer catalogue
Hello @gaurav_harsh1
Thank you for all.
When i run this, i had : No Alive nodes in your cluster
I search in community, i have this solution :
sudo systemctl restart elasticsearch
I check status, it's ok and i have :
curl -X GET 'http://localhost:9200' { "name" : "Magento Node", "cluster_name" : "Magento Cluster", "cluster_uuid" : "D5D8eUEVTxKGv69AI6Mpyw", "version" : { "number" : "7.6.0", "build_flavor" : "default", "build_type" : "deb", "build_hash" : "7f634e9f44834fbc12724506cc1da681b0c3b1e3", "build_date" : "2020-02-06T00:09:00.449973Z", "build_snapshot" : false, "lucene_version" : "8.4.0", "minimum_wire_compatibility_version" : "6.8.0", "minimum_index_compatibility_version" : "6.0.0-beta1" }, "tagline" : "You Know, for Search" }
But when i check connexion with my site (admin) i have : No alive nodes found in your cluster
your help please.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento 2.4 : impossible d’ajouter un produit et d'indexer catalogue
Hello @mitsi ,
It is probably because Magento is unable to communicate with your elasticsearch server, you need to do below things :
To configure Magento to use Elasticsearch:
- Log in to the Magento Admin as an administrator.
- Click Stores > Settings > Configuration > Catalog > Catalog > Catalog Search.
- From the Search Engine list, select your Elasticsearch version.
- Fill the required details of server where elasticsearch is hosted,
ex: Elasticsearch Server Hostname, Elasticsearch Server Port, Elasticsearch Index Prefix, Enable Elasticsearch HTTP Auth
After you fill details, click on test connection, if it works then your issue is resolved.
Hope it helps ~
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento 2.4 : impossible d’ajouter un produit et d'indexer catalogue
Hello @gaurav_harsh1
All conf it's ok, only "l’authentification HTTP Elasticsearch" is NO.
but test connexion is KO.
http://elma-nettoyage.fr/magento_error_2.png
http://elma-nettoyage.fr/magento_error.png
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento 2.4 : impossible d’ajouter un produit et d'indexer catalogue
Hello @mitsi ,
The configuration looks good, Can you try replacing the host from localhost to the real IP ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento 2.4 : impossible d’ajouter un produit et d'indexer catalogue
@gaurav_harsh1 with IP i have a some error
sudo service elasticsearch status
● elasticsearch.service - Elasticsearch
Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Fri 2021-07-16 14:09:05 UTC; 13ms ago
Docs: ...
Process: 3959305 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet (code=killed, >
Main PID: 3959305 (code=killed, signal=KILL)
Tasks: 2 (limit: 4682)
Memory: 5.7M
CGroup: /system.slice/elasticsearch.service
└─3959396 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller
Jul 16 14:08:35 h systemd[1]: Starting Elasticsearch...
Jul 16 14:08:36 h elasticsearch[3959305]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC wa>
Jul 16 14:08:48 h systemd[1]: Started Elasticsearch.
Jul 16 14:09:05 h systemd[1]: elasticsearch.service: Main process exited, code=killed, status=9/KILL
Jul 16 14:09:05 h systemd[1]: elasticsearch.service: Failed with result 'signal'.
lines 1-16/16 (END)