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 won't start because of Unrecognized VM option 'UseConcMarkSweepGC' #70

Closed
geerlingguy opened this issue Sep 26, 2020 · 3 comments
Labels

Comments

@geerlingguy
Copy link
Owner

Currently the role is not completing CI tests successfully—ES installs, but won't start:

# journalctl -u elasticsearch
-- Logs begin at Sat 2020-09-26 04:08:07 UTC, end at Sat 2020-09-26 04:10:49 UTC. --
Sep 26 04:10:48 instance systemd[1]: Starting Elasticsearch...
Sep 26 04:10:49 instance systemd-entrypoint[4660]: Exception in thread "main" java.lang.RuntimeException: starting java failed with [1]
Sep 26 04:10:49 instance systemd-entrypoint[4660]: output:
Sep 26 04:10:49 instance systemd-entrypoint[4660]: error:
Sep 26 04:10:49 instance systemd-entrypoint[4660]: Unrecognized VM option 'UseConcMarkSweepGC'
Sep 26 04:10:49 instance systemd-entrypoint[4660]: Error: Could not create the Java Virtual Machine.
Sep 26 04:10:49 instance systemd-entrypoint[4660]: Error: A fatal exception has occurred. Program will exit.
Sep 26 04:10:49 instance systemd-entrypoint[4660]:         at org.elasticsearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:126)
Sep 26 04:10:49 instance systemd-entrypoint[4660]:         at org.elasticsearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:88)
Sep 26 04:10:49 instance systemd-entrypoint[4660]:         at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:59)
Sep 26 04:10:49 instance systemd-entrypoint[4660]:         at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:137)
Sep 26 04:10:49 instance systemd-entrypoint[4660]:         at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:95)
Sep 26 04:10:49 instance systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Sep 26 04:10:49 instance systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Sep 26 04:10:49 instance systemd[1]: Failed to start Elasticsearch.

The error from the role is:

RUNNING HANDLER [geerlingguy.elasticsearch : restart elasticsearch] ************
fatal: [instance]: FAILED! => {"changed": false, "msg": "Unable to start service elasticsearch: Job for elasticsearch.service failed because the control process exited with error code. See \"systemctl status elasticsearch.service\" and \"journalctl -xe\" for details.\n"}

See failed build: https://travis-ci.org/github/geerlingguy/ansible-role-elasticsearch/builds/730446020

Related: elastic/elasticsearch#62716

@Karimus
Copy link

Karimus commented Sep 28, 2020

@geerlingguy related to openJDK : elastic/elasticsearch#51361

@geerlingguy
Copy link
Owner Author

@Karimus - It looks like the main problem is my role is currently overriding the entire jvm.options file inside /etc/elasticsearch. All I want to do is override the min/max heap size, so instead of overriding the entire jvm.options file, I should place a file with just the overrides inside /etc/elasticsearch/jvm.options.d/, so I'm working on doing that now.

@mourareaupro
Copy link

mourareaupro commented Sep 30, 2020

I still have the problem too @geerlingguy . i run
ansible-galaxy install -r requirements.yml to update the repo and get the tag 5.0.0

  • extracting geerlingguy.elasticsearch to /home/mathieu/.ansible/roles/geerlingguy.elasticsearch
  • geerlingguy.elasticsearch (5.0.0) was installed successfully

run again the playbook

TASK [geerlingguy.elasticsearch : Configure Elasticsearch.] ************************************************************
ok: [elasticserver] => (item=/etc/elasticsearch/elasticsearch.yml)
changed: [elasticserver] => (item=/etc/elasticsearch/jvm.options.d/heap.options)

RUNNING HANDLER [geerlingguy.elasticsearch : restart elasticsearch] ****************************************************
fatal: [elasticserver]: FAILED! => {"changed": false, "msg": "Unable to start service elasticsearch: Job for elasticsearch.service failed because the control process exited with error code. See \"systemctl status elasticsearch.service\" and \"journalctl -xe\" for details.\n"}

prompt output :

Sep 30 16:25:14 SRVLAPES1 systemd[1]: Starting Elasticsearch...
Sep 30 16:25:16 SRVLAPES1 systemd-entrypoint[25730]: Exception in thread "main" java.lang.RuntimeException: starting jav
Sep 30 16:25:16 SRVLAPES1 systemd-entrypoint[25730]: output:
Sep 30 16:25:16 SRVLAPES1 systemd-entrypoint[25730]: error:
Sep 30 16:25:16 SRVLAPES1 systemd-entrypoint[25730]: Unrecognized VM option 'UseConcMarkSweepGC'
Sep 30 16:25:16 SRVLAPES1 systemd-entrypoint[25730]: Error: Could not create the Java Virtual Machine.
Sep 30 16:25:16 SRVLAPES1 systemd-entrypoint[25730]: Error: A fatal exception has occurred. Program will exit.
Sep 30 16:25:16 SRVLAPES1 systemd-entrypoint[25730]: at org.elasticsearch.tools.launchers.JvmErgonomics.flagsFinal(JvmEr
Sep 30 16:25:16 SRVLAPES1 systemd-entrypoint[25730]: at org.elasticsearch.tools.launchers.JvmErgonomics.finalJvmOptions(
Sep 30 16:25:16 SRVLAPES1 systemd-entrypoint[25730]: at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgono
Sep 30 16:25:16 SRVLAPES1 systemd-entrypoint[25730]: at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(Jv
Sep 30 16:25:16 SRVLAPES1 systemd-entrypoint[25730]: at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptio
Sep 30 16:25:16 SRVLAPES1 systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Sep 30 16:25:16 SRVLAPES1 systemd[1]: Failed to start Elasticsearch.
Sep 30 16:25:16 SRVLAPES1 systemd[1]: Unit elasticsearch.service entered failed state.
Sep 30 16:25:16 SRVLAPES1 systemd[1]: elasticsearch.service failed.
Sep 30 16:29:34 SRVLAPES1 systemd[1]: Starting Elasticsearch...
Sep 30 16:29:36 SRVLAPES1 systemd-entrypoint[26602]: Exception in thread "main" java.lang.RuntimeException: starting jav
Sep 30 16:29:36 SRVLAPES1 systemd-entrypoint[26602]: output:
Sep 30 16:29:36 SRVLAPES1 systemd-entrypoint[26602]: error:
Sep 30 16:29:36 SRVLAPES1 systemd-entrypoint[26602]: Unrecognized VM option 'UseConcMarkSweepGC'
Sep 30 16:29:36 SRVLAPES1 systemd-entrypoint[26602]: Error: Could not create the Java Virtual Machine.
Sep 30 16:29:36 SRVLAPES1 systemd-entrypoint[26602]: Error: A fatal exception has occurred. Program will exit.
Sep 30 16:29:36 SRVLAPES1 systemd-entrypoint[26602]: at org.elasticsearch.tools.launchers.JvmErgonomics.flagsFinal(JvmEr
Sep 30 16:29:36 SRVLAPES1 systemd-entrypoint[26602]: at org.elasticsearch.tools.launchers.JvmErgonomics.finalJvmOptions(
Sep 30 16:29:36 SRVLAPES1 systemd-entrypoint[26602]: at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgono
Sep 30 16:29:36 SRVLAPES1 systemd-entrypoint[26602]: at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(Jv
Sep 30 16:29:36 SRVLAPES1 systemd-entrypoint[26602]: at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptio
Sep 30 16:29:36 SRVLAPES1 systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Sep 30 16:29:36 SRVLAPES1 systemd[1]: Failed to start Elasticsearch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants