Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.
Commentaire: Published by Scroll Versions from space DA and version BM-3.5
Sv translation
languagefr
Volet

Sommaire
maxLevel2
minLevel2

Symptômes

La barre de recherche ne propose pas l'option pour rechercher dans tous les dossiers

Pour l'ensemble des utilisateurs

Si c'est le cas pour l'ensemble des utilisateurs, cela fait probablement suite à une migration des mails au niveau du système de fichier. Cela signifie que l'index de recherche d'Elasticsearch n'existe pas : vous pouvez exécuter la tâche ConsolidateMailSpoolIndexJob pour créer l'index et indexer l'ensemble des mails du serveur :

  • se rendre dans la console d'administration > Gestion du système > Planification > exécuter la tâche ConsolidateMailSpoolIndexJob

ou

  • grâce à l'outil en ligne de commande exécuter l'opération de maintenance consolidateIndex :

    Bloc de code
    bm-cli maintenance consolidateIndex domain.net

    Cette opération étant lourde en consommation de ressource, il est possible à partir de BlueMind 3.5.12 de l'exécuter par groupes d'utilisateurs grâce à l'option --match :

    Bloc de code
    bm-cli maintenance consolidateIndex --match "a.*" domain.net
    bm-cli maintenance consolidateIndex --match "[b-c].*" domain.net

Pour quelques utilisateurs

Si le problème ne concerne qu'un ou quelques utilisateurs, cela signifie que l'index ElasticSearch les concernant est inexistant ou corrompu, il faut le recréer :

  • soit en se rendant sur la fiche d'administration de chaque utilisateur et en cliquant sur "Valider et réparer" puis "Consolider l'index" puis, si pas d'amélioration, "Reconstruire l'index"
  • soit grâce à l'outil en ligne de commande :

    Bloc de code
    bm-cli maintenance repair user@domain.net
    bm-cli maintenance consolidateIndex user@domain.net 

Il manque des résultats dans la recherche

Lorsqu'un ou quelques utilisateurs signalent des problèmes de recherches incomplètes, de même que pour le problème précédent cela signifie que leur index ElasticSearch est corrompu ou doit simplement être mis à jour, il suffit alors d'agir sur le ou les utilisateurs concernés :

  • soit en se rendant sur la fiche d'administration de chaque utilisateur et en cliquant sur "Valider et réparer" puis "Consolider l'index" puis, si pas d'amélioration, "Reconstruire l'index"
  • soit grâce à l'outil en ligne de commande :

    Bloc de code
    bm-cli maintenance repair user@domain.net
    bm-cli maintenance consolidateIndex user@domain.net 

Une erreur s'affiche lors d'une recherche

Cela peut provenir d'une incohérence entre la liste des dossiers au niveau IMAP et dans la base de données, l'action de maintenance "Valider et Réparer" accessible depuis l'onglet Maintenance de la fiche utilisateur permet de reconstruire cette liste, une ré-indexation de la boite de messagerie doit ensuite corriger le problème : exécuter l'action "Reconstruire l'index" plus bas dans la même page.

Si ce n'est pas le cas, les logs /var/log/bm-webmail.errors peuvent indiquer l'origine du problème.

Une erreur s'affiche lors de l'accès à un message trouvé par une recherche

Il s'agit probablement d'un défaut d'indexation lorsque qu'un message a été déplacé, l'action de maintenance "Consolider la boite mail" accessible depuis l'onglet Maintenance de la fiche utilisateur permet de mettre à jour l'index de recherche.

Problème/Confirmation

Si vous constatez un dysfonctionnement de la recherche dans BlueMind vous pouvez en déterminer la cause avec la commande :

Bloc de code
curl -XGET --silent 'http://localhost:9200/_cluster/health'

Cette commande permet d'afficher l'état du cluster ElasticSearch, si le statut est 'green' tout va bien, s'il est 'red' cela signifie qu'il y a un problème au niveau d'Elasticsearch. Cette information remonte également dans la console de monitoring.

Résolution

Plusieurs conditions peuvent empêcher le fonctionnement d'ElasticSearch :

  • une corruption des index : principalement à cause d'un manque d'espace disque, il faut au minimum 10% d'espace disque libre. Si le disque contenant les données d'ES (/var/spool/bm-elasticsearch) a manqué d'espace il est possible que les index de recherche soient corrompus. Dans les logs ES, cela se traduit par une erreur lors du démarrage du service :

    Bloc de code
    [2017-01-26 20:06:54,764][WARN ][cluster.action.shard] [Bill Foster] [mailspool][0] received shard failed for [mailspool][0], node[PcC6eICxRAajmWioK1mhDA], [P], s[INITIALIZING], indexUUID 
    [IEJHQkOnTtOcdY0bMMIFRA], reason [master [Bill Foster][PcC6eICxRAajmWioK1mhDA][bluemind.exa.net.uk][inet[/82.219.13.101:9300]] marked shard as initializing, but shard is marked as failed, resend shard failure]
    [2016-01-26 20:06:55,828][WARN ][indices.cluster] [Bill Foster] [mailspool][0] failed to start shard
    org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException: [mailspool][0] failed to recover shard
            at org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:287)
            at org.elasticsearch.index.gateway.IndexShardGatewayService$1.run(IndexShardGatewayService.java:132)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
            at java.lang.Thread.run(Thread.java:745)

    Il faut alors supprimer l'index  :

    Bloc de code
    languagebash
    cd /var/spool/bm-elasticsearch/data/bluemind-c68b34ff-ccf4-49f8-9456-e8db902e8f66/nodes/0/indices/
    service bm-elasticsearch stop
    rm -fr mailspool/
    service bm-elasticsearch start
    

    Puis lancer une nouvelle indexation depuis la gestion des tâches planifiées > lancer la tâche ConsolidateMailSpoolIndexJob

    Avertissement

    Attention cependant, l'indexation des mails est une opération consommatrice en IO et il est préférable de lancer cette tâche en soirée ou en week-end. Vous pouvez également lancer la réindexation par lot en utilisant bm-cli.

  • une corruption du translog : cela peut se produire en cas de crash du serveur ou de manque de mémoire. Dans ce cas l'index général n'est pas corrompu et seule l'indexation des derniers documents non encore écrits sur le disque sera perdue.
    Dans les logs ES, cela se traduit par cette erreur lors du démarrage du service :

    Bloc de code
    [2017-09-04 19:24:38,340][WARN ][indices.cluster          ] [Hebe] [mailspool][1] failed to start shard
    org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException: [mailspool][1] failed to recover shard
    	at org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:287)
    	at org.elasticsearch.index.gateway.IndexShardGatewayService$1.run(IndexShardGatewayService.java:132)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    	at java.lang.Thread.run(Thread.java:745)
    Caused by: org.elasticsearch.index.translog.TranslogCorruptedException: translog corruption while reading from stream
    	at org.elasticsearch.index.translog.ChecksummedTranslogStream.read(ChecksummedTranslogStream.java:70)
    	at org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:257)
    	... 4 more

    Pour supprimer les translog corrompu :

    Bloc de code
    service bm-elasticsearch stop
    rm -rf /var/spool/bm-elasticsearch/data/bluemind-5da5da65-b2e8-4b1e-afb2-f26792f66ac4/nodes/0/indices/mailspool/*/translog
    service bm-elasticsearch start

    L’exécution de la tâche ConsolidateMailSpoolIndexJob va ré-indexer les mails manquants

Sv translation
languageen

Symptoms

The search bar does not include the option to search all folders 

This can happen, for example, if you have migrated email messages within the file system.

This means that the Elasticsearch research index does not exist. You can run the job ReconstructMailSpoolIndexJob to create the index and index all the email messages on the server.

Some search results are missing

In case of temporary issues with the indexing service, some messages sent or received during that period may not have been indexed. Simply run the job ConsolidateMailSpoolIndexJob which calculates the difference between messages within IMAP and the index, and then indexes the missing messages only.

Error message during searches

This may be caused by an inconsistency between the list of IMAP folders and the database, the maintenance operation "check&repair", which can be accessed from the Maintenance tab in the user page can be used to rebuild this list. Then re-indexing the mailbox should fix the issue.

A error is displayed when trying to access a message found by search

This is probably due to an indexation fault when the message was moved. The maintenance operation "Consolider la boite mail" which can be accessed from the Maintenance tab in the user page can be used to update the search index.

Issue/Confirmation

If you detect a search malfunction in BlueMind, you can find the cause using the command:

Bloc de code
curl -XGET --silent 'http://localhost:9200/_cluster/health'

This command displays the status of the cluster ElasticSearch. If the status is 'green' then everything is fine, if it is 'red', this means there is an issue with Elasticsearch. Cette information remonte également dans la console de monitoring.

Resolution

Several issues may stop ElasticSearch from working:

  • index corruption: mainly due to low disk space. You need at least 10% of free disk space. If the disk containing ES data (/var/spool/bm-elasticsearch) has lacked space, search indexes may have become corrupted. In ES logs, this translates as a error on service start up:

    Bloc de code
    [2017-01-26 20:06:54,764][WARN ][cluster.action.shard] [Bill Foster] [mailspool][0] received shard failed for [mailspool][0], node[PcC6eICxRAajmWioK1mhDA], [P], s[INITIALIZING], indexUUID 
    [IEJHQkOnTtOcdY0bMMIFRA], reason [master [Bill Foster][PcC6eICxRAajmWioK1mhDA][bluemind.exa.net.uk][inet[/82.219.13.101:9300]] marked shard as initializing, but shard is marked as failed, resend shard failure]
    [2016-01-26 20:06:55,828][WARN ][indices.cluster] [Bill Foster] [mailspool][0] failed to start shard
    org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException: [mailspool][0] failed to recover shard
            at org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:287)
            at org.elasticsearch.index.gateway.IndexShardGatewayService$1.run(IndexShardGatewayService.java:132)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
            at java.lang.Thread.run(Thread.java:745)

    You must therefore remove the index:

    Bloc de code
    languagebash
    cd /var/spool/bm-elasticsearch/data/bluemind-c68b34ff-ccf4-49f8-9456-e8db902e8f66/nodes/0/indices/
    service bm-elasticsearch stop
    rm -fr mailspool/
    service bm-elasticsearch start

    Then start indexing again from scheduled jobs > run ReconstructMailSpoolIndexJob

    Avertissement

    Be careful, however, email indexing is a IO-consuming job and it is preferable to perform it in the evening or at the weekend. .

  • translog corruption: this can happen if the server has crashed or because of low memory. In this case, the general index is not corrupted and only the indexing of documents not written to the disk yet will be lost.
    In ES logs, this translates as the following error during service restart:

    Bloc de code
    [2017-09-04 19:24:38,340][WARN ][indices.cluster          ] [Hebe] [mailspool][1] failed to start shard
    org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException: [mailspool][1] failed to recover shard
    	at org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:287)
    	at org.elasticsearch.index.gateway.IndexShardGatewayService$1.run(IndexShardGatewayService.java:132)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    	at java.lang.Thread.run(Thread.java:745)
    Caused by: org.elasticsearch.index.translog.TranslogCorruptedException: translog corruption while reading from stream
    	at org.elasticsearch.index.translog.ChecksummedTranslogStream.read(ChecksummedTranslogStream.java:70)
    	at org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:257)
    	... 4 more

    To remove the translogs corrupted:

    Bloc de code
    service bm-elasticsearch stop
    rm -rf /var/spool/bm-elasticsearch/data/bluemind-5da5da65-b2e8-4b1e-afb2-f26792f66ac4/nodes/0/indices/mailspool/*/translog
    service bm-elasticsearch start

    Running the job ConsolidateMailSpoolIndexJob re-indexes the missing messages.