Conversation
* Use log4j2.properties instead of logging.yml * Add jvm.options * Use bootstrap.memory_lock instead of bootstrap.mlockall * Get rid of work directory * Executable does not accept `-D` anymore, replace with `-E` and `-p` * Get rid of 5.x default (file)s
Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run. |
I misunderstood how This is fixed now |
+1 |
When this can be merged? we need it |
I do not know, but you can always checkout my branch and us that (same we are doing ATM... ;) ) |
@veger Thanks for this PR, very much appreciated.
Yes, we need to keep backwards compatibility. 1.x will be EOL in January 2017 but 2.x will stay for quite some time
@gingerwizard any resources/tips you could provide? |
Jenkins, test it! |
Ok, good the existing test are all green, so backwards compatibility seems to be fine. I'm just not sure if we should merge this in Just from top of my head and a quick test, these things are missing:
It should be easy to add once this PR is in, I just fear that some users will see this merged in master and think it's 5.0 ready yet. @gingerwizard @jpcarey @veger what do you guys think? |
I currently override the URL in my play, but I am happy to move it into this PR
(I use Ubuntu 16.04... ;) ) Easy solution: Add a note in the README. Hard(er) solution: Add Java 8 repo/ppa if required for OS/version/etc.
I do not know about 'bootstrap checks'... So I cannot help with this.
I suppose the maintainer(s) of this repo should decide what is best. I am fine with both. |
Hi @veger I had a little doubt in setting up ES 5.0 and I am using your git branch (fix_es5_issues) to start elasticsearch and I am getting the below error,
Though I have given the es_heap_size value in my playbook but still getting the error. I have attached the my playbook for your reference and somewhere I am doing mistake & pls correct me rdaas-elasticsearch.zip Note:- We are in developing stage of setting up ES 5.0.0 |
You did not specify which OS you are using. I only tested it with Ubuntu 16.04 (using systemd service manager). The error originates from either the Debian or Redhat init.d service file. So I guess that is untested... 2 Choices (I am no ES expert so I do not know which is better):
For now I would say, try both and see whether either or both are working for you. (Please report your findings ;) ) It would be great if a ES expert could give his opinion which one is better! So the PR can be updated! |
@veger, base on the document of jvm.options.
In case when set es_instance_name variable will move this file into {es_config_dir}/{es_instance_name} so that all the java options will not be read by elasticsearch wrapper by default as mention in the document. |
@Jazznight so you are basically saying that jvm.options must be installed in Now that I think about it, it might be possible that I create the jvm.options myself later (in my playbook)... I'll check when I am back at work tomorrow! |
Hi @veger , I'm setting multiple node in one host so that I'll have multiple instances in I think |
Hi @veger As per your 2 choices I have tried both the settings but its unable to start ES either I am getting one of the error during the playbook run,
Let me know your suggestions. Hi @Jazznight I am trying the same by setting up multiple node in the same host. so I defined the conf_dir path as /etc/elasticsearch and so jvm.options file will copied to the same. But I am getting the below error when its trying to up the ES service
When I debug the elasticsearch file under bin folder & I could see its expecting jvm options file in any of the below path
Let me know your thoughts.. |
@GaneshbabuRamamoorthy Looks like elasticsearch wrapper still not found the base on the veger:fix_es5_issues it will remove |
@Jazznight Ya I think so its not working even I changed the conf_dir to this path "$ES_HOME"/config/jvm.options* but still elasticsearch service failed to start up. |
@GaneshbabuRamamoorthy FYI, I just modified and made another fork. It's working for my case which have multi-node in same host deployment. |
It has been a while since I made these changes, and I have been making loads of Ansible roles last couple of weeks. So things a bit blurred... :/ I do know it is working for Ubuntu 16.04/systemd, you guys still have not said which OS/service manager/Elasticsearch version you are targeting. The role installs jvm.options in Using Again, please provide these details (maybe even include some of the generated files), so we can get a better view what is going wrong..? |
Hi @veger @Jazznight I forked ansible elasticsearch project in which I am trying to setup ES 5.0 in Linux machine. ES5.0 setup use the rdaas-elasticsearch.yml (playbook) and check you able to up the ES 5.x cluster with that settings. Please kindly let me your thoughts and it would be very helpful. Note:- @Jazznight I forked your project with your recent changes but still unable to start the ES cluster Regards, |
Hi @veger Did you get any chance to try and up ES 5.x using my playbook? I am trying to setup in ES 5.x (Red Hat Enterprise Linux Server release 6.7 (Santiago)) |
ES_HEAP_SIZE is not used for ES5.x anymore, instead ES_JAVA_OPTS 'Xms' and 'Xmx' are used
Thanks for telling which OS you use, it helped with finding the/a issue. I have added a new commit which disabled the check. I use in my playbook: es_java_opts:
- "-Xms{{ es_heap_size }}"
- "-Xmx{{ es_heap_size }}" But maybe it needs to be included in the role? (I did not try your playbook, as I do not have access to a RedHat machine ATM) |
I tried the same settings in my playbook and after completion of playbook I could see elasticsearch_started message but ES is not up & running
I am unable to figure out the issue but I suspect ES is not able to find the log4j properties because after ES installation I manually tried to start the ES (./elasticsearch) in the bin folder (usr/share/elasticsearch/bin) and I am getting the error,
Do I need to do any configuration change related to log4j properties? Attached my playbook with the latest changes.. |
I am not a support forum, but I am merely trying to get a PR accepted (which is not going to happen at this rate, since the maintainer probably does not like to read through all of this mess, at least I would not if I would have been the maintainer). Please do not dump a complete project but provide a minimal example, I am not going to read all files (let alone install VM(s) and run your playbook) in order to try and figure out what is happening (especially since I suspect that this has nothing to do with this PR, but more about not reading ES/Ansible/YML/etc documentation). I am no expert in ES and/or Ansible and/or Redhat, and I simply do not have the time to read the Internet in order to find out what is happening with your setup. That said: When looking at your provided log, I see a big exception telling
Did you check if this file indeed is not available? If so, it has nothing to do with this PR as it does not change installation locations (using apt/debian package, the binaries are installed in that location and stay there). About log4j.properties (which are 'merely' a warning): I have not idea what you are doing/using due to lack of details. Are you still using you own branch, or the one of this PR? In your own branch the location of log4j.properties is changed... Maybe this is the reason that they cannot be found? Again, please try to find a more suitable setting to get help to install ElasticSearch using Ansible, this PR is polluted already as it is... |
I'm going to be starting on ES on RHEL7 now, and would like to use 5.0 versions. I can also help with this if needed from that perspective. Can we perhaps merge this into a 5.0 branch for now, and work off that? Or just work off veger's branch? |
@pdaugavietis Yes, I just created a |
Added 2 PRs #206 and #207, both fixes for 5.x. I think this is all for Hopefully, we'll be able to confirm this is all working in different situations and get the support merged back into the master branch! :) |
closing in favor of #206 |
Check out the branch v5.x We able to setup ES 5.0 cluster in Redhat with the help of @veger PR Hope you able to setup the same !! |
In order to be able to install a Elasticsearch cluster using version 5.0.0, I had to add the following v5.x support (next to the other PRs I submitted today and yesterday):
-D
anymore, replace with-E
and-p
---help
of executable--
anymore, replace with-E
- https://www.elastic.co/guide/en/elasticsearch/reference/5.0/breaking_50_settings_changes.html#_removed_using_double_dashes_to_configure_elasticsearchAdditional remarks: