Moved to OSS...xpack settings left behind. How to remove?

We upgraded from 6.8.1 default to 7.7.1 oss (unintentionally, but whats done is done).
Now the issue is that there are xpack settings left behind. How to remove these?
Specifically, in our cluster settings:

curl -X GET "localhost:9200/_cluster/settings?pretty"
{
  "persistent" : {
    "archived" : {
      "xpack" : {
        "monitoring" : {
          "collection" : {
            "enabled" : "true"
          }
        }
      }
    },
    "cluster" : {
      "routing" : {
        "allocation" : {
          "enable" : "primaries"
        }
      }
    }
  },
  "transient" : { }
}

No changes can be made to cluster settings because we always get this error:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "unknown setting [archived.xpack.monitoring.collection.enabled] 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.xpack.monitoring.collection.enabled] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
  },
  "status" : 400
}

You have to remove all the unrecognised "archived" settings at once:

PUT _cluster/settings
{"persistent":{"archived.*":null}}

Elasticsearch doesn't do this automatically in case archiving them was a mistake, so you need to remove them explicitly before you can do anything else.

2 Likes

You are the man!
I could not find this info anywhere. This has also solved my cluster replication issues.

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