Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch fails to start #168

Open
tylers-username opened this issue Jul 21, 2022 · 0 comments
Open

Elasticsearch fails to start #168

tylers-username opened this issue Jul 21, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@tylers-username
Copy link

tylers-username commented Jul 21, 2022

Issue Description

Elasticsearch (maybe just version 7?) fails to start.

Re-create the issue

Create a Lando-compatible PHP project and add the following service:

magento_search:
  type: elasticsearch:7.7
  disk: 256
  configuration:
    plugins:
      - analysis-icu
      - analysis-phonetic

Then, lando start.

lando logs -s magento_search outputs:

magento_search_1  | NameError: 'all_node_ips' is not defined
magento_search_1  | Traceback (most recent call last):
magento_search_1  |   File "/usr/lib/python2.7/dist-packages/platformsh/agent/service.py", line 379, in generate_config_files
magento_search_1  |     safe_write(path, template.render(**self.config), mode=output_mode)
magento_search_1  |   File "/usr/lib/python2.7/dist-packages/mako/template.py", line 462, in render
magento_search_1  |     return runtime._render(self, self.callable_, args, data)
magento_search_1  |   File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 838, in _render
magento_search_1  |     **_kwargs_for_callable(callable_, data))
magento_search_1  |   File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 873, in _render_context
magento_search_1  |     _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
magento_search_1  |   File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 899, in _exec_template
magento_search_1  |     callable_(context, *args, **kwargs)
magento_search_1  |   File "_etc_elasticsearch_elasticsearch_yml_psh_tmpl", line 23, in render_body

With a partial fix implemented (described below), a refreshed log contains:

magento_search_1  | NameError: 'all_hostnames' is not defined
magento_search_1  | Traceback (most recent call last):
magento_search_1  |   File "/usr/lib/python2.7/dist-packages/platformsh/agent/service.py", line 379, in generate_config_files
magento_search_1  |     safe_write(path, template.render(**self.config), mode=output_mode)
magento_search_1  |   File "/usr/lib/python2.7/dist-packages/mako/template.py", line 462, in render
magento_search_1  |     return runtime._render(self, self.callable_, args, data)
magento_search_1  |   File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 838, in _render
magento_search_1  |     **_kwargs_for_callable(callable_, data))
magento_search_1  |   File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 873, in _render_context
magento_search_1  |     _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
magento_search_1  |   File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 899, in _exec_template
magento_search_1  |     callable_(context, *args, **kwargs)
magento_search_1  |   File "_etc_elasticsearch_elasticsearch_yml_psh_tmpl", line 23, in render_body

Solution

  1. lando ssh -s magento_search -c 'nano /etc/elasticsearch/elasticsearch.yml.psh-tmpl'
  2. remove the line containing all_node_ips and then remove the line containing all_hostnames
  3. lando restart
@tylers-username tylers-username added the bug Something isn't working label Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant