Follow

does anyone know anything about this elastisearch issue and how to resolve it?

/home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/elasticsearch-transport-7.13.3/lib/elasticsearch/transport/transport/base.rb:218:in `__raise_transport_error': [401] {"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/chewy_specifications/_search]","header":{"WWW-Authenticate":"Basic realm=\\"security\\" charset=\\"UTF-8\\""}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/chewy_specifications/_search]","header":{"WWW-Authenticate":"Basic realm=\\"security\\" charset=\\"UTF-8\\""}},"status":401} (Elasticsearch::Transport::Transport::Errors::Unauthorized)

@hankhill and where to enter the password, i mean in what file?

@a @hankhill
ES_ENABLED=true
ES_HOST=http://127.0.0.1
ES_PORT=9200
ES_USER=elastic
ES_PASS=xxxx
ES_PREFIX=

sudo /usr/share/elasticsearch/bin/elasticsearch-setup-passwords auto

curl localhost:9200 -u elastic:xxxx

@a You might be better off using Kibana. it's a UI client

@a your first error was a 401 meaning authentication issue. second error was 404 meaning your URL or endpoint is wrong. 500 internal error means something went wrong with the elasticsearch server.

@hankhill yeah, 500 internal gone for now, but 404 still here.

@noellabo @hankhill i got it now, first i have to run sudo /usr/share/elasticsearch/bin/elasticsearch-setup-passwords auto

@a @hankhill You can delete it if you don't need it. You may want to set something. I set ES_PREFIX=fedibird

@noellabo @hankhill let me see because i still have issue with search deploying

RAILS_ENV=production bin/tootctl search deploy
/home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/elasticsearch-transport-7.13.3/lib/elasticsearch/transport/transport/base.rb:218:in `__raise_transport_error': [404] {"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [accounts]","resource.type":"index_or_alias","resource.id":"accounts","index_uuid":"_na_","index":"accounts"}],"type":"index_not_found_exception","reason":"no such index [accounts]","resource.type":"index_or_alias","resource.id":"accounts","index_uuid":"_na_","index":"accounts"},"status":404} (Elasticsearch::Transport::Transport::Errors::NotFound)
from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/elasticsearch-transport-7.13.3/lib/elasticsearch/transport/transport/base.rb:347:in `perform_request'
from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/elasticsearch-transport-7.13.3/lib/elasticsearch/transport/transport/http/faraday.rb:37:in `perform_request'
from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/elasticsearch-transport-7.13.3/lib/elasticsearch/transport/client.rb:192:in `perform_request'
from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/elasticsearch-api-7.13.3/lib/elasticsearch/api/namespace/common.rb:38:in `perform_request'
from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/elasticsearch-api-7.13.3/lib/elasticsearch/api/actions/indices/put_settings.rb:55:in `put_settings'
from /home/mastodon/live/app/lib/importer/base_importer.rb:31:in `optimize_for_search!'
from /home/mastodon/live/lib/mastodon/search_cli.rb:99:in `ensure in block in deploy'
from /home/mastodon/live/lib/mastodon/search_cli.rb:99:in `block in deploy'
from /home/mastodon/live/lib/mastodon/search_cli.rb:74:in `each'
from /home/mastodon/live/lib/mastodon/search_cli.rb:74:in `deploy'
from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:116:in `invoke'
from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.1/lib/thor.rb:243:in `block in subcommand'
from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
from bin/tootctl:8:in `<main>'

Sign in to participate in the conversation
Mastodon Zone

We are a free speech and censorship-free zone. As long as your comments are appropriate and respectful, you won't be banned from the server. Feel free to discuss anything you want and to say whatever you want.