java.lang.IllegalArgumentException: unknown setting [node.roles] please check that any required plugins are installed

Added node.roles: [ master ] in elasticsearch.yml configuration. Index or shard allocation is not done yet. Using 7.8.1 version of elastic search. However on starting the node I get the below exception
Caused by: java.lang.IllegalArgumentException: unknown setting [node.roles] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
        at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:544) ~[elasticsearch-7.8.1.jar:7.8.1]
        at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:489) ~[elasticsearch-7.8.1.jar:7.8.1]
        at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:460) ~[elasticsearch-7.8.1.jar:7.8.1]
        at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:431) ~[elasticsearch-7.8.1.jar:7.8.1]
        at org.elasticsearch.common.settings.SettingsModule.<init>(SettingsModule.java:149) ~[elasticsearch-7.8.1.jar:7.8.1]
        at org.elasticsearch.node.Node.<init>(Node.java:370) ~[elasticsearch-7.8.1.jar:7.8.1]
        at org.elasticsearch.node.Node.<init>(Node.java:266) ~[elasticsearch-7.8.1.jar:7.8.1]
        at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227) ~[elasticsearch-7.8.1.jar:7.8.1]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.8.1.jar:7.8.1]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.8.1.jar:7.8.1]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.8.1.jar:7.8.1]
        ... 6 more
uncaught exception in thread [main]
java.lang.IllegalArgumentException: unknown setting [node.roles] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
        at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:544)
        at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:489)
        at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:460)
        at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:431)
        at org.elasticsearch.common.settings.SettingsModule.<init>(SettingsModule.java:149)
        at org.elasticsearch.node.Node.<init>(Node.java:370)
        at org.elasticsearch.node.Node.<init>(Node.java:266)
        at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227)
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)
        at org.elasticsearch.cli.Command.main(Command.java:90)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)

Welcome to our community! :smiley:

Are you asking for assistance here or are you just posting part of your log file?

Hello, I need assistance . How to set master only or data only node. If I follow the documentation, then I see that I need to set node.roles: [ master ] in elasticsearch.yml file.
But when I do that, I get the above exception

Can you please share your elasticsearch.yml?

Please format your code/logs/config using the </> button, or markdown style back ticks. It helps to make things easy to read which helps us help you :slight_smile:

Hello,

The issue seems to have resolved when I updated from 7.8.1 to 7.9.
Thank you

I have the same issue. How to fix it?
I need to setup node role to data_hot

java.lang.IllegalArgumentException: unknown setting [node.roles] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
	at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:544)
	at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:489)
	at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:460)
	at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:431)
	at org.elasticsearch.common.settings.SettingsModule.<init>(SettingsModule.java:149)
	at org.elasticsearch.node.Node.<init>(Node.java:370)
	at org.elasticsearch.node.Node.<init>(Node.java:266)
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227)
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227)
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393)
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)
	at org.elasticsearch.cli.Command.main(Command.java:90)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
For complete error details, refer to the log at /usr/share/elasticsearch/logs/elastiflow.log

This is yaml conf of cluster data node, runned at docker container with docker-compose. I cannot use 7.9 it must be 7.8.1

version: '3'

services:
  elastiflow1:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.8.1
    container_name: elastiflow1
#    restart: 'unless-stopped'
    restart: 'no'
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 131072
        hard: 131072
      nproc: 8192
      fsize: -1
    network_mode: host
    volumes:
      # You will need to create the path and permissions on the local file system where Elasticsearch will store data.
      # For example...
      #   mkdir /var/lib/elastiflow_es && chown -R 1000:1000 /var/lib/elastiflow_es
      - /var/lib/elastiflow_es:/usr/share/elasticsearch/data
      - "/etc/localtime:/etc/localtime:ro"
    environment:
      # JVM Heap size
      #   - this should be at least 2GB for simple testing, receiving only a few flows per second.
      #   - for production environments upto 31GB is recommended.
      ES_JAVA_OPTS: '-Xms32766m -Xmx32766m'


      cluster.name: elastiflow

      bootstrap.memory_lock: 'true'

      node.master: "false"
      node.data: "true"
      node.ingest: "true"
      discovery.seed_hosts: '[zoo1.11.ru, zoo2.11.ru]'
      node.roles: '[data_hot]'
#      node.attr.box_type: hot
      network.host: 0.0.0.0
      http.port: 9200
      node.name: mon01.11.ru
      es_enable_xpack: "true"
      xpack.ml.enabled: "false"
      xpack.monitoring.collection.enabled: "true"
#      index.number_of_replicas: 1
#      xpack.security.enabled: "true"
#      action.auto_create_index: .security,.monitoring*,.watches,.triggered_watches,.watcher-history*,elastiflow-*
      es_java_install: "true"
#      cluster.initial_master_nodes: ["zoo1.11.ru", "zoo2.11.ru"]

      indices.query.bool.max_clause_count: 10240
      search.max_buckets: 250000
      action.destructive_requires_name: 'true'
      TZ: "Europe/Moscow"
#      index.max_result_window: 100000

  elastiflow-logstash:
    image: robcowart/elastiflow-logstash:4.0.1
    container_name: elastiflow-logstash
#    restart: 'unless-stopped'
    restart: 'no'
    depends_on:
      - elastiflow1
    network_mode: host
    environment:
      # JVM Heap size - this MUST be at least 3GB (4GB preferred)
      LS_JAVA_OPTS: '-Xms16g -Xmx16g'

      # ElastiFlow global configuration
      ELASTIFLOW_AGENT_ID: elastiflow
      ELASTIFLOW_GEOIP_CACHE_SIZE: 16384
      ELASTIFLOW_GEOIP_LOOKUP: 'true'
      ELASTIFLOW_ASN_LOOKUP: 'true'
      ELASTIFLOW_OUI_LOOKUP: 'false'
      ELASTIFLOW_POPULATE_LOGS: 'true'
      ELASTIFLOW_KEEP_ORIG_DATA: 'true'
      ELASTIFLOW_DEFAULT_APPID_SRCTYPE: 'cisco_nbar2'

      # Name resolution option
      ELASTIFLOW_RESOLVE_IP2HOST: 'true'
      ELASTIFLOW_NAMESERVER: '10.10.7.10'
      ELASTIFLOW_DNS_HIT_CACHE_SIZE: 25000
      ELASTIFLOW_DNS_HIT_CACHE_TTL: 900
      ELASTIFLOW_DNS_FAILED_CACHE_SIZE: 75000
      ELASTIFLOW_DNS_FAILED_CACHE_TTL: 3600
#      in opensource it ignored
      ELASTIFLOW_ES_HOST: '127.0.0.1:9200'
      ELASTIFLOW_ES_HOST_2: 'mon02.11.ru:9200'
      ELASTIFLOW_ES_USER: 'elastic'
      ELASTIFLOW_ES_PASSWD: 'changeme'
#      doc_as_upsert: "true"

      ELASTIFLOW_NETFLOW_IPV4_PORT: 2055
      ELASTIFLOW_NETFLOW_UDP_WORKERS: 4
      ELASTIFLOW_NETFLOW_UDP_QUEUE_SIZE: 40960
      ELASTIFLOW_NETFLOW_UDP_RCV_BUFF: 335544320

      ELASTIFLOW_SFLOW_IPV4_PORT: 6343
      ELASTIFLOW_SFLOW_UDP_WORKERS: 2
      ELASTIFLOW_SFLOW_UDP_QUEUE_SIZE: 4096
      ELASTIFLOW_SFLOW_UDP_RCV_BUFF: 33554432

      ELASTIFLOW_IPFIX_TCP_IPV4_PORT: 4739
      ELASTIFLOW_IPFIX_UDP_WORKERS: 2
      ELASTIFLOW_IPFIX_UDP_QUEUE_SIZE: 4096
      ELASTIFLOW_IPFIX_UDP_RCV_BUFF: 33554432

      TZ: "Europe/Moscow"

    volumes:
      - "/etc/localtime:/etc/localtime:ro"

Then you can not use this setting node.roles: '[data_hot]'

hi warkolm
I am also getting same error as above and I am using elastic 8.x . Do i need to add any external plugins as the error suggesting. if that is the solution pls suggest me the respective plugin which i need to install. Thankyou

Here is my Elasticsearch.yml file

cluster.name: cname
node.name: node-2
node.master: false
path.data: /var/lib/Elasticsearch
path.logs: /var/log/Elasticsearch
network.host: 0.0.0.0
http.port: 9200
discovery.seed_hosts: ["a1", "a2"]
cluster.initial_master_nodes: ["a1"]
http.host: 0.0.0.0
xpack.security.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.client_authentication: required
xpack.security.transport.ssl.keystore.path: /etc/Elasticsearch/certs/elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: /etc/Elasticsearch/certs/elastic-certificates.p12

1 Like