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

Every time Elasticsearch is updated it fails to start #20321

Closed
jazoom opened this issue Sep 5, 2016 · 5 comments · Fixed by #23597
Closed

Every time Elasticsearch is updated it fails to start #20321

jazoom opened this issue Sep 5, 2016 · 5 comments · Fixed by #23597
Labels
:Core/Infra/Plugins Plugin API and infrastructure >docs General docs changes help wanted adoptme

Comments

@jazoom
Copy link

jazoom commented Sep 5, 2016

Elasticsearch version: 2.0 - 2.4

Plugins installed: [cloud-aws, head, kopf]

JVM version: 1.8.0_101

OS version: Ubuntu 14.04

Description of the problem including expected versus actual behavior:
Elasticsearch servers are updated via Ansible script:

- name: import the Elasticsearch public GPG key into apt
  apt_key: url=https://packages.elastic.co/GPG-KEY-elasticsearch state=present
- name: create Elasticsearch source list
  apt_repository: repo='deb http://packages.elastic.co/elasticsearch/2.x/debian stable main' state=present
- name: install Elasticsearch
  apt: name=elasticsearch state=present update_cache=yes
- name: send Elasticsearch configuration template
  template: src=elasticsearch.j2 dest=/etc/elasticsearch/elasticsearch.yml mode=0644
- name: make Elasticsearch start on system boot
  command: update-rc.d elasticsearch defaults 95 10
- name: start Elasticsearch service
  service: name=elasticsearch state=started

- name: install AWS plugin for Elasticsearch
  elasticsearch_plugin: state=present name="cloud-aws" plugin_bin="/usr/share/elasticsearch/bin/plugin"

- name: restart Elasticsearch service
  service: name=elasticsearch state=restarted

This updates Elasticsearch just fine, but the old version of cloud-aws hangs around. This causes Elasticsearch to fail to start up. This has been causing a headache for every Elasticsearch version for a while now and makes updates a pain.

Is the expected behaviour to remove the plugin before every update?

Steps to reproduce:

  1. Run the Ansible task above
@dadoonet
Copy link
Member

dadoonet commented Sep 5, 2016

Please prefer asking questions on discuss.elastic.co.

Yes it's the expected behavior. You need to upgrade the plugin as well.
Don't start Elasticsearch before upgrading the plugin.

@dadoonet dadoonet closed this as completed Sep 5, 2016
@jazoom
Copy link
Author

jazoom commented Sep 5, 2016

This isn't just a question. I actually thought this was a bug since even if I (manually) update the plugin it still doesn't work. I could find nowhere in the documentation to suggest that plugins should be removed before updating them.

@dadoonet
Copy link
Member

dadoonet commented Sep 5, 2016

Fair enough. The only moment we explained that is in dev guide: https://www.elastic.co/guide/en/elasticsearch/plugins/2.4/plugin-authors.html

We should add this in the main plugin doc probably.

Reopening to fix the doc.

@dadoonet dadoonet reopened this Sep 5, 2016
@jazoom
Copy link
Author

jazoom commented Sep 5, 2016

That sounds like a good idea. I never wanted to author a plugin so I didn't read the dev guide. This knowledge would have saved me quite a lot of debugging time.

@clintongormley clintongormley added >docs General docs changes :Core/Infra/Plugins Plugin API and infrastructure help wanted adoptme labels Sep 7, 2016
@clintongormley
Copy link
Contributor

@jazoom fancy sending a docs PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Plugins Plugin API and infrastructure >docs General docs changes help wanted adoptme
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants