Skip to main content

Posts

Showing posts with the label elasticsearch

Ansible issues

is not a valid attribute for a Play When ever you get the above error firstly crosscheck that the ansible attribute you have mentioned is correct. If it is correct then the issue probably is that you have created tasks as follows: --- - vars_prompt: - name: "var1" prompt: "Please pass variable" private: no - fail: msg="var1 is not passed or blank" when: var1 is undefined or ( var1 is defined and storeid == "" ) when it should be as follows: --- vars_prompt: - name: "var1" prompt: "Please pass variable" private: no tasks: - fail: msg="var1 is not passed or blank" when: var1 is undefined or ( var1 is defined and storeid == "" ) the example referenced is just a task. It is not a valid playbook because it is missings a hosts declaration and the module call is not under a tasks section. ERROR! conflicting action statements: fail, ...

ElasticSearch Issues

java.lang.IllegalArgumentException: unknown setting [node.rack] please check that any required plugins are installed, or check the breaking changes documentation for removed settings Node level attributes used for allocation filtering, forced awareness or other node identification / grouping must be prefixed with  node.attr . In previous versions it was possible to specify node attributes with the  node.  prefix. All node attributes except of  node.master ,  node.data  and  node.ingest  must be moved to the new  node.attr.  namespace. Unknown setting mlockall Replace the bootstrap.mlockall with bootstrap.memory_lock Unable to lock JVM Memory: error=12, reason=Cannot allocate memory Edit:   /etc/security/limits.conf  and add the following lines elasticsearch soft memlock unlimited elasticsearch hard memlock unlimited Edit:  /usr/lib/systemd/system/elasticsearch.service  uncomment the line Limi...

Salt stack formulas:

Add all the configurations in pillar.sls into the target file: 1 2 3 4 5 6 7 8 9 10 11 {%- if salt['pillar.get']('elasticsearch:config') %} /etc/elasticsearch/elasticsearch.yml:    file.managed:      - source: salt://elasticsearch/files/elasticsearch.yml      - user: root      - template: jinja      - require:        - sls: elasticsearch.pkg      - context:          config: {{ salt['pillar.get']('elasticsearch:config', '{}') }} {%- endif %} 2. Create multiple directories if it does not exists 1 2 3 4 5 6 7 8 9 10 11 12 {% for dir in (data_dir, log_dir) %} {% if dir %} {{ dir }}:    file.directory:      - user: elasticsearch      - group: elasticsearch  ...