LigeroSmart / ligerosmart

LigeroSmart code
GNU General Public License v3.0
10 stars 11 forks source link

Erro na criação do mapeamento no elasticsearch #234

Closed mfmatos closed 1 year ago

mfmatos commented 1 year ago

Na versão 6.1.18 o comando para criar o mapeamento não está funcionando. O comando encontra-se no passo 3 da documentação abaixo:

https://docs.ligerosmart.org/kb/customer-portal-search-troubleshoot/

O esperado é que os índices sejam criados na base do elasticsearch.


otrs@rel.qa.ligerosmart.com ~ ((HEAD detached at 6.1.18))$ /app-init.d/10-elasticsearch.sh 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   212  100   126  100    86  15750  10750 --:--:-- --:--:-- --:--:-- 26500
Updating setting value...

Done.
Updating setting value...

Done.
Rebuilding the system configuration...
Done.
Creating Elasticsearch Mappings...
ERROR: OTRS-otrs.Console.pl-Admin::Ligero::Elasticsearch::MappingInstall-10 Perl: 5.30.0 OS: linux Time: Tue Jan 24 23:26:02 2023

 Message: [NoNodes] ** No nodes are available: [http://elasticsearch:9200], called from sub Search::Elasticsearch::Role::Client::Direct::__ANON__ at /opt/otrs/Kernel/System/LigeroSmart.pm line 664.

 Traceback (272): 
   Module: Kernel::System::LigeroSmart::catch {...}  Line: 670
   Module: Try::Tiny::try (v0.30) Line: 123
   Module: Kernel::System::LigeroSmart::IngestPipelineInstall Line: 672
   Module: Kernel::System::Console::Command::Admin::Ligero::Elasticsearch::MappingInstall::Run Line: 88
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs/bin/otrs.Console.pl Line: 36

ERROR: OTRS-otrs.Console.pl-Admin::Ligero::Elasticsearch::MappingInstall-10 Perl: 5.30.0 OS: linux Time: Tue Jan 24 23:26:02 2023

 Message: [NoNodes] ** No nodes are available: [http://elasticsearch:9200], called from sub Search::Elasticsearch::Role::Client::Direct::__ANON__ at /opt/otrs/Kernel/System/LigeroSmart.pm line 664.

 Traceback (272): 
   Module: Kernel::System::LigeroSmart::catch {...}  Line: 670
   Module: Try::Tiny::try (v0.30) Line: 123
   Module: Kernel::System::LigeroSmart::IngestPipelineInstall Line: 672
   Module: Kernel::System::Console::Command::Admin::Ligero::Elasticsearch::MappingInstall::Run Line: 88
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs/bin/otrs.Console.pl Line: 36

[Tue Jan 24 23:26:02 2023] otrs.Console.pl: Use of uninitialized value $Result in numeric eq (==) at /opt/otrs/Kernel/System/Console/Command/Admin/Ligero/Elasticsearch/MappingInstall.pm line 89.
[Tue Jan 24 23:26:02 2023] otrs.Console.pl: Use of uninitialized value $Result in numeric eq (==) at /opt/otrs/Kernel/System/Console/Command/Admin/Ligero/Elasticsearch/MappingInstall.pm line 91.
Failed to create Ingest pipelines.
ERROR: OTRS-otrs.Console.pl-Admin::Ligero::Elasticsearch::MappingInstall-10 Perl: 5.30.0 OS: linux Time: Tue Jan 24 23:26:02 2023

 Message: [NoNodes] ** No nodes are available: [http://elasticsearch:9200], called from sub Search::Elasticsearch::Role::Client::Direct::__ANON__ at /opt/otrs/Kernel/System/LigeroSmart.pm line 481.

 Traceback (272): 
   Module: Kernel::System::LigeroSmart::catch {...}  Line: 517
   Module: Try::Tiny::try (v0.30) Line: 123
   Module: Kernel::System::LigeroSmart::IndexCreate Line: 519
   Module: Kernel::System::Console::Command::Admin::Ligero::Elasticsearch::MappingInstall::Run Line: 122
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs/bin/otrs.Console.pl Line: 36

Index created: 0
ERROR: OTRS-otrs.Console.pl-Admin::Ligero::Elasticsearch::MappingInstall-10 Perl: 5.30.0 OS: linux Time: Tue Jan 24 23:26:02 2023

 Message: [NoNodes] ** No nodes are available: [http://elasticsearch:9200], called from sub Search::Elasticsearch::Role::Client::Direct::__ANON__ at /opt/otrs/Kernel/System/LigeroSmart.pm line 481.

 Traceback (272): 
   Module: Kernel::System::LigeroSmart::catch {...}  Line: 517
   Module: Try::Tiny::try (v0.30) Line: 123
   Module: Kernel::System::LigeroSmart::IndexCreate Line: 519
   Module: Kernel::System::Console::Command::Admin::Ligero::Elasticsearch::MappingInstall::Run Line: 127
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs/bin/otrs.Console.pl Line: 36

Index created: 0
Done.
mfmatos commented 1 year ago

Apesar do alerta "No nodes are available: [http://elasticsearch:9200]", o elasticsearch responde às chamadas via console.


otrs@rel.qa.ligerosmart.com ~ (rel-6_1)$ curl elasticsearch:9200
{
  "name" : "IILds6I",
  "cluster_name" : "otrs-cluster",
  "cluster_uuid" : "lHUKP_qjSLOAPU7PjZV84g",
  "version" : {
    "number" : "6.8.23",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "4f67856",
    "build_date" : "2022-01-06T21:30:50.087716Z",
    "build_snapshot" : false,
    "lucene_version" : "7.7.3",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}
mfmatos commented 1 year ago

Versão do módulo Search::Elasticsearch na imagem estava na 8.0. Fazendo a correção para a 7.30

https://github.com/LigeroSmart/docker-ligerosmart/commit/e7e9d6952b716a1e29e6e4a23a5e306120c9761d

mfmatos commented 1 year ago

Testado no ambiente de QA. Problema resolvido