Modify the max bucket to report an error

I use the following command to modify max bucket:

PUT _cluster/settings
{
  "persistent": {
    "search.max_buckets": 500000
  }
}

But received the following error message:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "unknown setting [archived.opendistro.index_state_management.metadata_migration.status] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "unknown setting [archived.opendistro.index_state_management.metadata_migration.status] please check that any required plugins are installed, or check the breaking changes documentation for removed settings",
    "suppressed" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "unknown setting [archived.opendistro.index_state_management.template_migration.control] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
      }
    ]
  },
  "status" : 400
}

OpenSearch/OpenDistro are AWS run products and differ from the original Elasticsearch and Kibana products that Elastic builds and maintains. You may need to contact them directly for further assistance.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

I'm not using an aws product, this is my es cluster info:

{
  "name" : "xy",
  "cluster_name" : "z",
  "cluster_uuid" : "Q9u-VrpcQqC0DisbxMgQjw",
  "version" : {
    "number" : "7.16.0",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "6fc81662312141fe7691d7c1c91b8658ac17aa0d",
    "build_date" : "2021-12-02T15:46:35.697268109Z",
    "build_snapshot" : false,
    "lucene_version" : "8.10.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

This seems to indicate that you either are running a different version compared to what you are reporting or have third-party plugins installed that are causing this error. Installed plugin should be included in the cluster stats API, so you may want to check that.

cluster stats:

{
  "_nodes" : {
    "total" : 5,
    "successful" : 5,
    "failed" : 0
  },
  "cluster_name" : "z",
  "cluster_uuid" : "Q9u-VrpcQqC0DisbxMgQjw",
  "timestamp" : 1670074628649,
  "status" : "green",
  "indices" : {
    "count" : 945,
    "shards" : {
      "total" : 1890,
      "primaries" : 945,
      "replication" : 1.0,
      "index" : {
        "shards" : {
          "min" : 2,
          "max" : 2,
          "avg" : 2.0
        },
        "primaries" : {
          "min" : 1,
          "max" : 1,
          "avg" : 1.0
        },
        "replication" : {
          "min" : 1.0,
          "max" : 1.0,
          "avg" : 1.0
        }
      }
    },
   
...

    "analysis" : {
      "char_filter_types" : [ ],
      "tokenizer_types" : [ ],
      "filter_types" : [ ],
      "analyzer_types" : [ ],
      "built_in_char_filters" : [ ],
      "built_in_tokenizers" : [ ],
      "built_in_filters" : [ ],
      "built_in_analyzers" : [ ]
    },
    "versions" : [
      {
        "version" : "7.10.2",
        "index_count" : 401,
        "primary_shard_count" : 401,
        "total_primary_bytes" : 870673664
      },
      {
        "version" : "7.16.0",
        "index_count" : 544,
        "primary_shard_count" : 544,
        "total_primary_bytes" : ...
      }
    ]
  },
  "nodes" : {
    "count" : {
      "total" : 5,
      "coordinating_only" : 0,
      "data" : 2,
      "data_cold" : 0,
      "data_content" : 0,
      "data_frozen" : 0,
      "data_hot" : 0,
      "data_warm" : 0,
      "ingest" : 0,
      "master" : 3,
      "ml" : 0,
      "remote_cluster_client" : 0,
      "transform" : 0,
      "voting_only" : 0
    },
    "versions" : [
      "7.16.0"
    ],
    "os" : {
      "available_processors" : 22,
      "allocated_processors" : 22,
      "names" : [
        {
          "name" : "Linux",
          "count" : 5
        }
      ],
      "pretty_names" : [
        {
          "pretty_name" : "Ubuntu 20.04.3 LTS",
          "count" : 5
        }
      ],
      "architectures" : [
        {
          "arch" : "amd64",
          "count" : 5
        }
      ],
      "mem" : {
        "total_in_bytes" : 78764953600,
        "free_in_bytes" : 1518587904,
        "used_in_bytes" : 77246365696,
        "free_percent" : 2,
        "used_percent" : 98
      }
    },
    "process" : {
      "cpu" : {
        "percent" : 21
      },
      "open_file_descriptors" : {
        "min" : 403,
        "max" : 7966,
        "avg" : 3425
      }
    },
    "jvm" : {
      "max_uptime_in_millis" : 30684532577,
      "versions" : [
        {
          "version" : "17.0.1",
          "vm_name" : "OpenJDK 64-Bit Server VM",
          "vm_version" : "17.0.1+12",
          "vm_vendor" : "Eclipse Adoptium",
          "bundled_jdk" : true,
          "using_bundled_jdk" : true,
          "count" : 5
        }
      ],
      "mem" : {
        "heap_used_in_bytes" : 15521692360,
        "heap_max_in_bytes" : 40613445632
      },
      "threads" : 467
    },
    "fs" : {
      "total_in_bytes" : 1210521587712,
      "free_in_bytes" : 919984099328,
      "available_in_bytes" : 866213122048
    },
    "plugins" : [
      {
        "name" : "repository-s3",
        "version" : "7.16.0",
        "elasticsearch_version" : "7.16.0",
        "java_version" : "1.8",
        "description" : "The S3 repository plugin adds S3 repositories",
        "classname" : "org.elasticsearch.repositories.s3.S3RepositoryPlugin",
        "extended_plugins" : [ ],
        "has_native_controller" : false,
        "licensed" : false,
        "type" : "isolated"
      }
    ],
    "network_types" : {
      "transport_types" : {
        "security4" : 5
      },
      "http_types" : {
        "security4" : 5
      }
    },
    "discovery_types" : {
      "zen" : 5
    },
    "packaging_types" : [
      {
        "flavor" : "default",
        "type" : "deb",
        "count" : 5
      }
    ],
    "ingest" : {
      "number_of_pipelines" : 2,
      "processor_stats" : {
        "gsub" : {
          "count" : 0,
          "failed" : 0,
          "current" : 0,
          "time_in_millis" : 0
        },
        "script" : {
          "count" : 0,
          "failed" : 0,
          "current" : 0,
          "time_in_millis" : 0
        }
      }
    }
  }
}

Has this cluster been migrated from a cluster that had third party plugins installed?

yes, this cluster was migrated from AWS OpenSearch.

Exactly which version was it migrated from? Exactly how was it migrated?

This was migrated from aws opensearch a year ago. I can’t remember the details, but it seems to be using the snapshot and restore tools. Something like this method:

Can you please run the get cluster settings API and post the output here? I now see there are indices from version 7.10.2, which could very well be an OpenDistro cluster. I wonder if the migration may have snapshotted and restored cluster settings and not just data.

Thank you very much for your reply.

The cluster settings are as follows, there are indeed OpenDistro(OpenSearch) related settings:

{
  "persistent" : {
    "archived" : {
      "opendistro" : {
        "index_state_management" : {
          "metadata_migration" : {
            "status" : "1"
          },
          "template_migration" : {
            "control" : "-1"
          }
        }
      }
    },
    "cluster" : {
      "routing" : {
        "allocation" : {
          "cluster_concurrent_rebalance" : "2",
          "disk" : {
            "watermark" : {
              "low" : "25.0gb",
              "flood_stage" : "1.0gb",
              "high" : "22.0gb"
            }
          }
        }
      }
    },
    "search" : {
      "max_buckets" : "100000"
    }
  },
  "transient" : { }
}

That seems to be the problem. Am not sure how to get rid of them. Maybe someone else has a suggestion.

When I removed all settings of opendistro, everything worked fine.
Thanks again.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.