Próbuję uruchomić projekt, ale wszystko, co używa elastycznego wyszukiwania, zawiesza się z tym błędem:
Elasticsearch::Transport::Transport::Errors::NotAcceptable: [406] {"error":"Content-Type header [] is not supported","status":406}
/Users/bob/.rvm/gems/ruby-2.4.3/gems/elasticsearch-transport-2.0.0/lib/elasticsearch/transport/transport/base.rb:201:in `__raise_transport_error"
/Users/bob/.rvm/gems/ruby-2.4.3/gems/elasticsearch-transport-2.0.0/lib/elasticsearch/transport/transport/base.rb:312:in `perform_request"
/Users/bob/.rvm/gems/ruby-2.4.3/gems/elasticsearch-transport-2.0.0/lib/elasticsearch/transport/transport/http/faraday.rb:20:in `perform_request"
/Users/bob/.rvm/gems/ruby-2.4.3/gems/elasticsearch-transport-2.0.0/lib/elasticsearch/transport/client.rb:128:in `perform_request"
/Users/bob/.rvm/gems/ruby-2.4.3/gems/elasticsearch-api-2.0.0/lib/elasticsearch/api/namespace/common.rb:21:in `perform_request"
/Users/bob/.rvm/gems/ruby-2.4.3/gems/elasticsearch-api-2.0.0/lib/elasticsearch/api/actions/indices/create.rb:84:in `create"
/Users/bob/.rvm/gems/ruby-2.4.3/gems/searchkick-1.4.0/lib/searchkick/index.rb:13:in `create"
/Users/bob/.rvm/gems/ruby-2.4.3/gems/searchkick-1.4.0/lib/searchkick/index.rb:147:in `create_index"
/Users/bob/.rvm/gems/ruby-2.4.3/gems/searchkick-1.4.0/lib/searchkick/index.rb:198:in `reindex_scope"
/Users/bob/.rvm/gems/ruby-2.4.3/gems/searchkick-1.4.0/lib/searchkick/model.rb:53:in `searchkick_reindex"
/Users/bob/.rvm/gems/ruby-2.4.3/gems/searchkick-1.4.0/lib/searchkick/tasks.rb:26:in `block (4 levels) in <top (required)>"
/Users/bob/.rvm/gems/ruby-2.4.3/gems/searchkick-1.4.0/lib/searchkick/tasks.rb:24:in `each"
/Users/bob/.rvm/gems/ruby-2.4.3/gems/searchkick-1.4.0/lib/searchkick/tasks.rb:24:in `block (3 levels) in <top (required)>"
/Users/bob/.rvm/gems/ruby-2.4.3/gems/bugsnag-6.2.0/lib/bugsnag/integrations/rake.rb:16:in `execute_with_bugsnag"
/Users/bob/.rvm/gems/ruby-2.4.3/gems/rake-12.3.0/exe/rake:27:in `<top (required)>"
/Users/bob/.rvm/gems/ruby-2.4.3/bin/ruby_executable_hooks:15:in `eval"
/Users/bob/.rvm/gems/ruby-2.4.3/bin/ruby_executable_hooks:15:in `<main>"
Nie mam pojęcia, co się dzieje. Zainstalowałem przez brew install elasticsearch@2.4
i biegnij obok brew services start elasticsearch@2.4
Jakieś pomysły?
Odpowiedzi:
0 dla odpowiedzi № 1W końcu tam dotarłem. W przypadku innych osób z tym problemem:
Możesz potrzebować konkretnej wersji elasticsearch (potrzebowałem 2.4):
brew uninstall elasticsearch
brew install elasticsearch@2.4
pkill -f elasticsearch
# Specyficzne dla OSXbrew services start elasticsearch@2.4
# możesz potrzebować poczekać kilka minutcurl "http://localhost:9200/?pretty"
# to test, jeśli elasticsearch jest uruchomiony