I have already setup elasticsearch and kibana using docker. And running on port 9200 and 5601.
container names are elastic and kibana. elastic url also gives a json response.
I was trying to run Enterrpise Search using the docker file. But It was unable to connect to elasticsearch using the following command as shown in bold letters. Also when I run this command, elasticsearch stops working and elastic url doesn't give a response How should I resolve this ?
Overwriting the default Enterprise Search configuration file: /usr/share/enterprise-search/config/enterprise-search.yml (if it fails, please make sure it is writeable)
Found java executable in PATH
Java version detected: 11.0.19 (major version: 11)
Enterprise Search is starting...
[2023-06-09T09:27:54.248+00:00][7][4004][app-server][INFO]: Elastic Enterprise Search version=8.8.0, JRuby version=9.3.3.0, Ruby version=2.6.8, Rails version=6.0.6.1
[2023-06-09T09:27:55.985+00:00][7][4004][app-server][INFO]: Performing pre-flight checks for Elasticsearch running on http://host.docker.internal:9200...
[2023-06-09T09:27:56.322+00:00][7][4004][app-server][WARN]: Failed to connect to Elasticsearch backend. Make sure it is running and healthy.
[2023-06-09T09:27:56.324+00:00][7][4004][app-server][INFO]: Error: /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:179: Connect to host.docker.internal:9200 [host.docker.internal/192.168.65.2] failed: Connection refused (Connection refused) (Faraday::ConnectionFailed)
[2023-06-09T09:28:01.336+00:00][7][4004][app-server][WARN]: Failed to connect to Elasticsearch backend. Make sure it is running and healthy.
[2023-06-09T09:28:01.337+00:00][7][4004][app-server][INFO]: Error: /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:179: Connect to host.docker.internal:9200 [host.docker.internal/192.168.65.2] failed: Connection refused (Connection refused) (Faraday::ConnectionFailed)
[2023-06-09T09:28:06.345+00:00][7][4004][app-server][WARN]: Failed to connect to Elasticsearch backend. Make sure it is running and healthy.
[2023-06-09T09:28:06.346+00:00][7][4004][app-server][INFO]: Error: /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:179: Connect to host.docker.internal:9200 [host.docker.internal/192.168.65.2] failed: Connection refused (Connection refused) (Faraday::ConnectionFailed)
[2023-06-09T09:28:11.355+00:00][7][4004][app-server][WARN]: Failed to connect to Elasticsearch backend. Make sure it is running and healthy.
[2023-06-09T09:28:11.356+00:00][7][4004][app-server][INFO]: Error: /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:179: Connect to host.docker.internal:9200 [host.docker.internal/192.168.65.2] failed: Connection refused (Connection refused) (Faraday::ConnectionFailed)
From the logs, Enterprise Search cannot reach Elasticsearch. It seems to be a communication issue between the two Docker containers.
If both Elasticsearch and Enterprise Search are on the same elastic network could you assign a name to both and try to reach Elasticsearch using the container name instead of using host.docker.internal?
I'd recommend the documentation provided setup for Docker, as it is a tested way of getting Elasticsearch, Kibana and Enterprise Search running.
Yes they are on the same network that is elastic. Now I tried using the container name as host in the docker command configuration. Still I get errors.
docker run --name "enterprise-search" --network "elastic" --publish "3002:3002" --volume "es-config:/usr/share/enterprise-search/es-config:ro" --interactive --tty --rm --env "secret_management.encryption_keys=[c34d38b3a14956121ff2170e5030b471551370178f43e5626eec58b04a30fae2]" --env "allow_es_settings_modification=true" --env "elasticsearch.host=http://elastic:9200" --env "elasticsearch.ssl.enabled=false" --env "kibana.external_url=http://kibana:5601" "docker.elastic.co/enterprise-search/enterprise-search:8.8.0"
Overwriting the default Enterprise Search configuration file: /usr/share/enterprise-search/config/enterprise-search.yml (if it fails, please make sure it is writeable)
Found java executable in PATH
Java version detected: 11.0.19 (major version: 11)
Enterprise Search is starting...
[2023-06-09T09:59:47.206+00:00][7][4004][app-server][INFO]: Elastic Enterprise Search version=8.8.0, JRuby version=9.3.3.0, Ruby version=2.6.8, Rails version=6.0.6.1
[2023-06-09T09:59:48.489+00:00][7][4004][app-server][INFO]: Performing pre-flight checks for Elasticsearch running on http://elastic:9200...
[2023-06-09T09:59:48.821+00:00][7][4004][app-server][WARN]: Failed to connect to Elasticsearch backend. Make sure it is running and healthy.
[2023-06-09T09:59:48.826+00:00][7][4004][app-server][INFO]: Error: /usr/share/enterprise-search/lib/war/gems/gems/manticore-0.7.1-java/lib/faraday/adapter/manticore.rb:88:in `block in call': elastic: Name or service not known (Manticore::ResolutionFailure)
from /usr/share/enterprise-search/lib/war/gems/gems/manticore-0.7.1-java/lib/manticore/response.rb:79:in `call'
from /usr/share/enterprise-search/lib/war/gems/gems/manticore-0.7.1-java/lib/faraday/adapter/manticore.rb:92:in `call'
from /usr/share/enterprise-search/lib/war/lib/middleware/request_logging_middleware.class:27:in `call'
from /usr/share/enterprise-search/lib/war/gems/gems/faraday-1.10.3/lib/faraday/rack_builder.rb:154:in `build_response'
from /usr/share/enterprise-search/lib/war/gems/gems/faraday-1.10.3/lib/faraday/connection.rb:516:in `run_request'
from /usr/share/enterprise-search/lib/war/gems/gems/faraday-1.10.3/lib/faraday/connection.rb:202:in `get'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch.class:730:in `block in get_raw'
from /usr/share/enterprise-search/lib/war/lib/apm_helpers.class:41:in `es_action_instrument'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch.class:828:in `instrument'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch.class:729:in `get_raw'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:134:in `check_es_connection_with_retries!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:32:in `check_es_connection!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:19:in `block in run!'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:80:in `block in tagged'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:28:in `tagged'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:80:in `tagged'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:18:in `run!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:14:in `run!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo.class:291:in `configure_elasticsearch!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo.class:270:in `configure!'
from /usr/share/enterprise-search/lib/war/config/application.class:21:in `<main>'
from org/jruby/RubyKernel.java:1059:in `load'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:318:in `block in load'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:291:in `load_dependency'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:318:in `load'
from /usr/share/enterprise-search/lib/war/config/application.rb:1:in `<main>'
from org/jruby/RubyKernel.java:1017:in `require'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:324:in `block in require'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:291:in `load_dependency'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:324:in `require'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli/command.class:36:in `initialize'
from org/jruby/RubyClass.java:879:in `new'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli/command.class:10:in `run_and_exit'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:148:in `run_supported_command'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:130:in `run_command'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:112:in `run!'
from bin/enterprise-search-internal:15:in `<main>'
[2023-06-09T09:59:53.840+00:00][7][4004][app-server][WARN]: Failed to connect to Elasticsearch backend. Make sure it is running and healthy.
[2023-06-09T09:59:53.842+00:00][7][4004][app-server][INFO]: Error: /usr/share/enterprise-search/lib/war/gems/gems/manticore-0.7.1-java/lib/faraday/adapter/manticore.rb:88:in `block in call': elastic (Manticore::ResolutionFailure)
from /usr/share/enterprise-search/lib/war/gems/gems/manticore-0.7.1-java/lib/manticore/response.rb:79:in `call'
from /usr/share/enterprise-search/lib/war/gems/gems/manticore-0.7.1-java/lib/faraday/adapter/manticore.rb:92:in `call'
from /usr/share/enterprise-search/lib/war/lib/middleware/request_logging_middleware.class:27:in `call'
from /usr/share/enterprise-search/lib/war/gems/gems/faraday-1.10.3/lib/faraday/rack_builder.rb:154:in `build_response'
from /usr/share/enterprise-search/lib/war/gems/gems/faraday-1.10.3/lib/faraday/connection.rb:516:in `run_request'
from /usr/share/enterprise-search/lib/war/gems/gems/faraday-1.10.3/lib/faraday/connection.rb:202:in `get'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch.class:730:in `block in get_raw'
from /usr/share/enterprise-search/lib/war/lib/apm_helpers.class:41:in `es_action_instrument'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch.class:828:in `instrument'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch.class:729:in `get_raw'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:134:in `check_es_connection_with_retries!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:32:in `check_es_connection!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:19:in `block in run!'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:80:in `block in tagged'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:28:in `tagged'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:80:in `tagged'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:18:in `run!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:14:in `run!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo.class:291:in `configure_elasticsearch!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo.class:270:in `configure!'
from /usr/share/enterprise-search/lib/war/config/application.class:21:in `<main>'
from org/jruby/RubyKernel.java:1059:in `load'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:318:in `block in load'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:291:in `load_dependency'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:318:in `load'
from /usr/share/enterprise-search/lib/war/config/application.rb:1:in `<main>'
from org/jruby/RubyKernel.java:1017:in `require'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:324:in `block in require'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:291:in `load_dependency'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:324:in `require'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli/command.class:36:in `initialize'
from org/jruby/RubyClass.java:879:in `new'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli/command.class:10:in `run_and_exit'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:148:in `run_supported_command'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:130:in `run_command'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:112:in `run!'
from bin/enterprise-search-internal:15:in `<main>'
[2023-06-09T09:59:58.901+00:00][7][4004][app-server][WARN]: Failed to connect to Elasticsearch backend. Make sure it is running and healthy.
[2023-06-09T09:59:58.903+00:00][7][4004][app-server][INFO]: Error: /usr/share/enterprise-search/lib/war/gems/gems/manticore-0.7.1-java/lib/faraday/adapter/manticore.rb:88:in `block in call': elastic: Name or service not known (Manticore::ResolutionFailure)
from /usr/share/enterprise-search/lib/war/gems/gems/manticore-0.7.1-java/lib/manticore/response.rb:79:in `call'
from /usr/share/enterprise-search/lib/war/gems/gems/manticore-0.7.1-java/lib/faraday/adapter/manticore.rb:92:in `call'
from /usr/share/enterprise-search/lib/war/lib/middleware/request_logging_middleware.class:27:in `call'
from /usr/share/enterprise-search/lib/war/gems/gems/faraday-1.10.3/lib/faraday/rack_builder.rb:154:in `build_response'
from /usr/share/enterprise-search/lib/war/gems/gems/faraday-1.10.3/lib/faraday/connection.rb:516:in `run_request'
from /usr/share/enterprise-search/lib/war/gems/gems/faraday-1.10.3/lib/faraday/connection.rb:202:in `get'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch.class:730:in `block in get_raw'
from /usr/share/enterprise-search/lib/war/lib/apm_helpers.class:41:in `es_action_instrument'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch.class:828:in `instrument'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch.class:729:in `get_raw'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:134:in `check_es_connection_with_retries!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:32:in `check_es_connection!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:19:in `block in run!'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:80:in `block in tagged'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:28:in `tagged'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:80:in `tagged'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:18:in `run!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:14:in `run!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo.class:291:in `configure_elasticsearch!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo.class:270:in `configure!'
from /usr/share/enterprise-search/lib/war/config/application.class:21:in `<main>'
from org/jruby/RubyKernel.java:1059:in `load'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:318:in `block in load'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:291:in `load_dependency'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:318:in `load'
from /usr/share/enterprise-search/lib/war/config/application.rb:1:in `<main>'
from org/jruby/RubyKernel.java:1017:in `require'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:324:in `block in require'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:291:in `load_dependency'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:324:in `require'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli/command.class:36:in `initialize'
from org/jruby/RubyClass.java:879:in `new'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli/command.class:10:in `run_and_exit'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:148:in `run_supported_command'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:130:in `run_command'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:112:in `run!'
from bin/enterprise-search-internal:15:in `<main>'
[2023-06-09T10:00:03.909+00:00][7][4004][app-server][WARN]: Failed to connect to Elasticsearch backend. Make sure it is running and healthy.
[2023-06-09T10:00:03.910+00:00][7][4004][app-server][INFO]: Error: /usr/share/enterprise-search/lib/war/gems/gems/manticore-0.7.1-java/lib/faraday/adapter/manticore.rb:88:in `block in call': elastic (Manticore::ResolutionFailure)
from /usr/share/enterprise-search/lib/war/gems/gems/manticore-0.7.1-java/lib/manticore/response.rb:79:in `call'
from /usr/share/enterprise-search/lib/war/gems/gems/manticore-0.7.1-java/lib/faraday/adapter/manticore.rb:92:in `call'
from /usr/share/enterprise-search/lib/war/lib/middleware/request_logging_middleware.class:27:in `call'
from /usr/share/enterprise-search/lib/war/gems/gems/faraday-1.10.3/lib/faraday/rack_builder.rb:154:in `build_response'
from /usr/share/enterprise-search/lib/war/gems/gems/faraday-1.10.3/lib/faraday/connection.rb:516:in `run_request'
from /usr/share/enterprise-search/lib/war/gems/gems/faraday-1.10.3/lib/faraday/connection.rb:202:in `get'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch.class:730:in `block in get_raw'
from /usr/share/enterprise-search/lib/war/lib/apm_helpers.class:41:in `es_action_instrument'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch.class:828:in `instrument'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch.class:729:in `get_raw'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:134:in `check_es_connection_with_retries!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:32:in `check_es_connection!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:19:in `block in run!'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:80:in `block in tagged'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:28:in `tagged'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/tagged_logging.rb:80:in `tagged'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:18:in `run!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/elasticsearch_checks.class:14:in `run!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo.class:291:in `configure_elasticsearch!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo.class:270:in `configure!'
from /usr/share/enterprise-search/lib/war/config/application.class:21:in `<main>'
from org/jruby/RubyKernel.java:1059:in `load'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:318:in `block in load'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:291:in `load_dependency'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:318:in `load'
from /usr/share/enterprise-search/lib/war/config/application.rb:1:in `<main>'
from org/jruby/RubyKernel.java:1017:in `require'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:324:in `block in require'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:291:in `load_dependency'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:324:in `require'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli/command.class:36:in `initialize'
from org/jruby/RubyClass.java:879:in `new'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli/command.class:10:in `run_and_exit'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:148:in `run_supported_command'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:130:in `run_command'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:112:in `run!'
from bin/enterprise-search-internal:15:in `<main>'
Also I tried to install enterprise-search using .deb package. After configuration and running, I get the following error:
Found java executable in PATH
Java version detected: 11.0.19 (major version: 11)
Enterprise Search is starting...
[2023-06-09T09:55:34.802+00:00][84437][4004][app-server][INFO]: Elastic Enterprise Search version=8.8.1, JRuby version=9.3.3.0, Ruby version=2.6.8, Rails version=6.0.6.1
[2023-06-09T09:55:35.353+00:00][84437][4004][app-server][INFO]: Performing pre-flight checks for Elasticsearch running on http://127.0.0.1:9200...
[2023-06-09T09:55:35.489+00:00][84437][4004][app-server][INFO]: Elasticsearch cluster is ready
[2023-06-09T09:55:35.490+00:00][84437][4004][app-server][INFO]: Successfully connected to Elasticsearch
[2023-06-09T09:55:35.520+00:00][84437][4004][app-server][INFO]: Successfully loaded Elasticsearch plugin information for all nodes
[2023-06-09T09:55:35.529+00:00][84437][4004][app-server][INFO]: Elasticsearch running with an active trial license
[2023-06-09T09:55:35.541+00:00][84437][4004][app-server][ERROR]:
--------------------------------------------------------------------------------
Elasticsearch API key service must be enabled. It is enabled automatically when you configure Elasticsearch to use TLS on the HTTP interface.
Alternatively, you can explicitly enable the setting within Elasticsearch by opening config/elasticsearch.yml and adding:
xpack.security.authc.api_key.enabled: true
Also I have already applied this option xpack.security.authc.api_key.enabled: true in the elastic configuration file.
cluster.name: "docker-cluster"
network.host: 0.0.0.0
#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically
# generated to configure Elasticsearch security features on 06-06-2023 07:29:13
#
# --------------------------------------------------------------------------------
# Enable security features
xpack.security.enabled: false
xpack.security.enrollment.enabled: false
xpack.security.authc.api_key.enabled: true
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
enabled: false
keystore.path: certs/http.p12
# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
enabled: true
verification_mode: certificate
keystore.path: certs/transport.p12
truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["9db31476c90c"]
#----------------------- END SECURITY AUTO CONFIGURATION -------------------------
@Carlos_D ingore previous replies. I think ssl was required for Enterprise search. It successfully connects to elasticsearch. But still get errors:
Found java executable in PATH
Java version detected: 11.0.19 (major version: 11)
Enterprise Search is starting...
[2023-06-09T11:57:12.981+00:00][168302][4004][app-server][INFO]: Elastic Enterprise Search version=8.8.1, JRuby version=9.3.3.0, Ruby version=2.6.8, Rails version=6.0.6.1
[2023-06-09T11:57:14.630+00:00][168302][4004][app-server][INFO]: Performing pre-flight checks for Elasticsearch running on https://127.0.0.1:9200...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.javasupport.binding.ConstantField (file:/usr/share/enterprise-search/lib/war/lib/jruby-core-9.3.3.0-complete.jar) to field sun.security.x509.X509CertImpl.SIG
WARNING: Please consider reporting this to the maintainers of org.jruby.javasupport.binding.ConstantField
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[2023-06-09T11:57:15.043+00:00][168302][4004][app-server][INFO]: Elasticsearch cluster is ready
[2023-06-09T11:57:15.045+00:00][168302][4004][app-server][INFO]: Successfully connected to Elasticsearch
[2023-06-09T11:57:15.094+00:00][168302][4004][app-server][INFO]: Successfully loaded Elasticsearch plugin information for all nodes
[2023-06-09T11:57:15.105+00:00][168302][4004][app-server][INFO]: Elasticsearch running with an active trial license
[2023-06-09T11:57:15.130+00:00][168302][4004][app-server][INFO]: Elasticsearch API key service is enabled
[2023-06-09T11:57:15.140+00:00][168302][4004][app-server][INFO]: Elasticsearch will be used for authentication
[2023-06-09T11:57:15.141+00:00][168302][4004][app-server][INFO]: Elasticsearch looks healthy and configured correctly to run Enterprise Search
[2023-06-09T11:57:15.143+00:00][168302][4004][app-server][INFO]: Performing pre-flight checks for Kibana running on http://localhost:5601...
[2023-06-09T11:57:15.218+00:00][168302][4004][app-server][INFO]: Successfully connected to Kibana
[2023-06-09T11:57:15.281+00:00][168302][4004][app-server][INFO]: Kibana looks healthy and configured correctly to run Enterprise Search
[2023-06-09T11:57:19.425+00:00][168302][4004][app-server][INFO]: Elastic APM agent is disabled
[2023-06-09T11:57:27.848+00:00][168302][4004][app-server][WARN]: Index .elastic-connectors-v1 creation failed with an unknown error. Retrying in 1 seconds...
[2023-06-09T11:57:28.869+00:00][168302][4004][app-server][WARN]: Index .elastic-connectors-v1 creation failed with an unknown error. Retrying now...
[2023-06-09T11:57:28.883+00:00][168302][4004][app-server][WARN]: Index .elastic-connectors-v1 creation failed with an unknown error. Retrying now...
[2023-06-09T11:57:28.898+00:00][168302][4004][app-server][WARN]: Index .elastic-connectors-v1 creation failed with an unknown error. Retrying now...
[2023-06-09T11:57:28.919+00:00][168302][4004][app-server][WARN]: Index .elastic-connectors-v1 creation failed with an unknown error. Retrying now...
[2023-06-09T11:57:28.939+00:00][168302][4004][app-server][WARN]: Index .elastic-connectors-v1 creation failed with an unknown error. Retrying now...
[2023-06-09T11:57:28.958+00:00][168302][4004][app-server][WARN]: Index .elastic-connectors-v1 creation failed with an unknown error. Retrying now...
[2023-06-09T11:57:28.978+00:00][168302][4004][app-server][WARN]: Index .elastic-connectors-v1 creation failed with an unknown error. Retrying now...
[2023-06-09T11:57:29.001+00:00][168302][4004][app-server][WARN]: Index .elastic-connectors-v1 creation failed with an unknown error. Retrying now...
[2023-06-09T11:57:29.020+00:00][168302][4004][app-server][WARN]: Index .elastic-connectors-v1 creation failed with an unknown error. Retrying now...
[2023-06-09T11:57:29.020+00:00][168302][4004][app-server][ERROR]: Retried index creation for index .elastic-connectors-v1 too many times (11). Giving up...
[2023-06-09T11:57:29.042+00:00][168302][4004][app-server][ERROR]: Exception: Unexpected exception while running Enterprise Search: Swiftype::ES::Index::IndexCreationRetryError: Failed to create index .elastic-connectors-v1 after 11 attempts!
/usr/share/enterprise-search/lib/war/lib/swiftype/es/index.class:285:in `ensure_with_retries': Failed to create index .elastic-connectors-v1 after 11 attempts! (Swiftype::ES::Index::IndexCreationRetryError)
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/crawler2/connector.class:172:in `create_connector_index_if_missing'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo.class:654:in `setup_connectors_index'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo.class:445:in `block in install!'
from /usr/share/enterprise-search/lib/war/lib/db_lock.class:171:in `with_lock'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo.class:440:in `install!'
from /usr/share/enterprise-search/lib/war/config/application.class:109:in `block in Application'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/lazy_load_hooks.rb:68:in `block in execute_hook'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
from org/jruby/RubyArray.java:1865:in `each'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
from /usr/share/enterprise-search/lib/war/gems/gems/railties-6.0.6.1/lib/rails/application/finisher.rb:129:in `block in Finisher'
from org/jruby/RubyBasicObject.java:2673:in `instance_exec'
from /usr/share/enterprise-search/lib/war/gems/gems/railties-6.0.6.1/lib/rails/initializable.rb:32:in `run'
from /usr/share/enterprise-search/lib/war/gems/gems/railties-6.0.6.1/lib/rails/initializable.rb:61:in `block in run_initializers'
from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/tsort.rb:228:in `block in tsort_each'
from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/tsort.rb:350:in `block in each_strongly_connected_component'
from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/tsort.rb:431:in `each_strongly_connected_component_from'
from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/tsort.rb:349:in `block in each_strongly_connected_component'
from org/jruby/RubyArray.java:1865:in `each'
from org/jruby/RubyMethod.java:131:in `call'
from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/tsort.rb:347:in `each_strongly_connected_component'
from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/tsort.rb:226:in `tsort_each'
from uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/tsort.rb:205:in `tsort_each'
from /usr/share/enterprise-search/lib/war/gems/gems/railties-6.0.6.1/lib/rails/initializable.rb:60:in `run_initializers'
from /usr/share/enterprise-search/lib/war/gems/gems/railties-6.0.6.1/lib/rails/application.rb:363:in `initialize!'
from org/jruby/RubyKernel.java:2003:in `public_send'
from /usr/share/enterprise-search/lib/war/gems/gems/railties-6.0.6.1/lib/rails/railtie.rb:190:in `method_missing'
from /usr/share/enterprise-search/lib/war/config/environment.class:11:in `<main>'
from org/jruby/RubyKernel.java:1059:in `load'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:318:in `block in load'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:291:in `load_dependency'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:318:in `load'
from /usr/share/enterprise-search/lib/war/config/environment.rb:1:in `<main>'
from org/jruby/RubyKernel.java:1017:in `require'
from /usr/share/enterprise-search/lib/war/gems/gems/elastic-apm-4.3.0/lib/elastic_apm/spies.rb:111:in `require'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:324:in `block in require'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:291:in `load_dependency'
from /usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:324:in `require'
from /usr/share/enterprise-search/lib/war/gems/gems/railties-6.0.6.1/lib/rails/application.rb:339:in `require_environment!'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli/command.class:37:in `initialize'
from org/jruby/RubyClass.java:879:in `new'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli/command.class:10:in `run_and_exit'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:148:in `run_supported_command'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:130:in `run_command'
from /usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:112:in `run!'
from bin/enterprise-search-internal:15:in `<main>'
Unexpected exception while running Enterprise Search:
Error: Failed to create index .elastic-connectors-v1 after 11 attempts! at /usr/share/enterprise-search/lib/war/lib/swiftype/es/index.class:285:in `ensure_with_retries'
/usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/crawler2/connector.class:172:in `create_connector_index_if_missing'
/usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo.class:654:in `setup_connectors_index'
/usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo.class:445:in `block in install!'
/usr/share/enterprise-search/lib/war/lib/db_lock.class:171:in `with_lock'
/usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo.class:440:in `install!'
/usr/share/enterprise-search/lib/war/config/application.class:109:in `block in Application'
/usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/lazy_load_hooks.rb:68:in `block in execute_hook'
/usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
/usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
/usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
org/jruby/RubyArray.java:1865:in `each'
/usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
/usr/share/enterprise-search/lib/war/gems/gems/railties-6.0.6.1/lib/rails/application/finisher.rb:129:in `block in Finisher'
org/jruby/RubyBasicObject.java:2673:in `instance_exec'
/usr/share/enterprise-search/lib/war/gems/gems/railties-6.0.6.1/lib/rails/initializable.rb:32:in `run'
/usr/share/enterprise-search/lib/war/gems/gems/railties-6.0.6.1/lib/rails/initializable.rb:61:in `block in run_initializers'
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/tsort.rb:228:in `block in tsort_each'
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/tsort.rb:350:in `block in each_strongly_connected_component'
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/tsort.rb:431:in `each_strongly_connected_component_from'
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/tsort.rb:349:in `block in each_strongly_connected_component'
org/jruby/RubyArray.java:1865:in `each'
org/jruby/RubyMethod.java:131:in `call'
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/tsort.rb:347:in `each_strongly_connected_component'
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/tsort.rb:226:in `tsort_each'
uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/tsort.rb:205:in `tsort_each'
/usr/share/enterprise-search/lib/war/gems/gems/railties-6.0.6.1/lib/rails/initializable.rb:60:in `run_initializers'
/usr/share/enterprise-search/lib/war/gems/gems/railties-6.0.6.1/lib/rails/application.rb:363:in `initialize!'
org/jruby/RubyKernel.java:2003:in `public_send'
/usr/share/enterprise-search/lib/war/gems/gems/railties-6.0.6.1/lib/rails/railtie.rb:190:in `method_missing'
/usr/share/enterprise-search/lib/war/config/environment.class:11:in `<main>'
org/jruby/RubyKernel.java:1059:in `load'
/usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:318:in `block in load'
/usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:291:in `load_dependency'
/usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:318:in `load'
/usr/share/enterprise-search/lib/war/config/environment.rb:1:in `<main>'
org/jruby/RubyKernel.java:1017:in `require'
/usr/share/enterprise-search/lib/war/gems/gems/elastic-apm-4.3.0/lib/elastic_apm/spies.rb:111:in `require'
/usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:324:in `block in require'
/usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:291:in `load_dependency'
/usr/share/enterprise-search/lib/war/gems/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:324:in `require'
/usr/share/enterprise-search/lib/war/gems/gems/railties-6.0.6.1/lib/rails/application.rb:339:in `require_environment!'
/usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli/command.class:37:in `initialize'
org/jruby/RubyClass.java:879:in `new'
/usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli/command.class:10:in `run_and_exit'
/usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:148:in `run_supported_command'
/usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:130:in `run_command'
/usr/share/enterprise-search/lib/war/shared_togo/lib/shared_togo/cli.class:112:in `run!'
bin/enterprise-search-internal:15:in `<main>'
Anyways, Enterprise Server is running on console not throwing any errors.
Probably I need to pass authentication in kibana.yml or elasticsearch.yml. But I am not sure.
@Carlos_D Since Kibana was dockerized and enterprise search was installed directly, I set the url as http://host.docker.internal:3002. Then it started working!
Thanks for patience and help.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.