Elasticsearch installation error

Hello everyone

we run the gitlab enterprise (13.3.4-ee) and we want to install elasticsearch with gitlab for a more detailed research

we got a few problems while installing elasticsearch on gitlab.
I followed this documentation on Elasticsearch integration | GitLab

the installation was successfull with this trace :

install -d /usr/local/bin
install -m755 bin/gitlab-elasticsearch-indexer /usr/local/bin

in the same time we completed the gitlab.rb with those lines :

ElasticSearch (EE only)

gitlab_rails[‘elasticsearch_enabled’] = true
gitlab_rails[‘elasticsearch_host’] = “lda1i185.server.lan”
gitlab_rails[‘elasticsearch_port’] = 9200

the next step would be to create a new index with sudo gitlab-rake gitlab:elastic:create_empty_index

we had the following error when we execute it :

Elasticsearch::Transport::Transport::Errors::ServiceUnavailable: [503]
/opt/gitlab/embedded/service/gitlab-rails/ee/lib/gitlab/elastic/helper.rb:91:in index_exists?' /opt/gitlab/embedded/service/gitlab-rails/ee/lib/gitlab/elastic/helper.rb:34:in create_empty_index’
/opt/gitlab/embedded/service/gitlab-rails/ee/lib/tasks/gitlab/elastic.rake:69:in block (3 levels) in <top (required)>' /opt/gitlab/embedded/bin/bundle:23:in load’
/opt/gitlab/embedded/bin/bundle:23:in `’
Tasks: TOP => gitlab:elastic:create_empty_index

we don’t understand this error, can someone help us ?

Thank you for your help

Kind regards

Hi there,

Could you please confirm which install type your GitLab instance is based on?

Looking at doc/integration/elasticsearch.md · v13.3.4-ee · GitLab.org / GitLab · GitLab it seems like the in gitlab-elasticsearch-indexer-related instructions are similar to what we document for the source install, but that would not have a gitlab.rb file.

Next, if you set up lda1i185.server.lan:9200 in the web interface instead, does it work then?


Generally, it’s best to switch our docs site to the documentation version that matches your instance (note the dropdown menu in the header). If you’re running a different GitLab version than any we have online or in the Docker archive, there are two alternatives:

  1. Find them via your instance’s /help page, or
  2. Go to Find File · v12.3.4-ee · GitLab.org / GitLab · GitLab, select your GitLab version via the dropdown there, and search for doc/<filename-on-docs.GitLab.com>.md or related keywords (in case a page was renamed).

It’s not always necessary but often better to use the documentation version that matches your instance, because product behaviour and features may be different.

Kind regards!