Many other failures including:

https://gradle-enterprise.elastic.co/s/7lahgua5jheji

https://gradle-enterprise.elastic.co/s/5cjldjf3c7t3m

https://gradle-enterprise.elastic.co/s/avrzglb2fmi5i

All with
```
"type" : "security_exception",	
            "reason" : "missing authentication credentials for REST request [/library/_doc/1?pretty]",
```

**Build scan:**
https://gradle-enterprise.elastic.co/s/xfmliqyqa5bwc/tests/:qa:os:destructiveDistroUpgradeTest.v8.1.1.default-deb/org.elasticsearch.packaging.test.PackageUpgradeTests/test21CheckUpgradedVersion

**Reproduction line:**
`null`

**Applicable branches:**
8.1, 8.0

**Reproduces locally?:**
Didn't try

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.packaging.test.PackageUpgradeTests&tests.test=test21CheckUpgradedVersion

**Failure excerpt:**
```
java.lang.RuntimeException: Request failed:
HTTP/1.1 401 Unauthorized
{
  "error" : {
    "root_cause" : [
      {
        "type" : "security_exception",
        "reason" : "missing authentication credentials for REST request [/library/_doc/1?pretty]",
        "header" : {
          "WWW-Authenticate" : [
            "Basic realm=\"security\" charset=\"UTF-8\"",
            "ApiKey"
          ]
        }
      }
    ],
    "type" : "security_exception",
    "reason" : "missing authentication credentials for REST request [/library/_doc/1?pretty]",
    "header" : {
      "WWW-Authenticate" : [
        "Basic realm=\"security\" charset=\"UTF-8\"",
        "ApiKey"
      ]
    }
  },
  "status" : 401
}

  at __randomizedtesting.SeedInfo.seed([E966C08FA96F984A:2C5542C3FE45F7A8]:0)
  at org.elasticsearch.packaging.util.ServerUtils.makeRequest(ServerUtils.java:362)
  at org.elasticsearch.packaging.util.ServerUtils.makeRequest(ServerUtils.java:354)
  at org.elasticsearch.packaging.test.PackageUpgradeTests.assertDocsExist(PackageUpgradeTests.java:116)
  at org.elasticsearch.packaging.test.PackageUpgradeTests.lambda$test21CheckUpgradedVersion$0(PackageUpgradeTests.java:112)
  at org.elasticsearch.packaging.test.PackagingTestCase.assertWhileRunning(PackagingTestCase.java:285)
  at org.elasticsearch.packaging.test.PackageUpgradeTests.test21CheckUpgradedVersion(PackageUpgradeTests.java:112)
  at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
  at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
  at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:568)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
  at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
  at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:375)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:831)
  at java.lang.Thread.run(Thread.java:833)

```
qa/os/src/test/java/org/elasticsearch/packaging/test/PackageUpgradeTests.java
.bodyString("{ \"title\": \"Elasticsearch - The Definitive Guide\"}", ContentType.APPLICATION_JSON)
        );
        ServerUtils.makeRequest(
            Request.Post("http://localhost:9200/library/_doc/2?refresh=true&pretty")
                .bodyString("{ \"title\": \"Brave New World\"}", ContentType.APPLICATION_JSON)
        );
        ServerUtils.makeRequest(
            Request.Post("http://localhost:9200/library2/_doc/1?refresh=true&pretty")
                .bodyString("{ \"title\": \"The Left Hand of Darkness\"}", ContentType.APPLICATION_JSON)
        );
        assertDocsExist();
        stopElasticsearch();
    }
    public void test20InstallUpgradedVersion() throws Exception {
        if (bwcDistribution.path.equals(distribution.path)) {
            
            installation = Packages.forceUpgradePackage(sh, distribution);
        } else {
            installation = Packages.upgradePackage(sh, distribution);
        }
        
        if (Version.fromString(bwcDistribution.baseVersion).before(Version.V_8_0_0)
            && Version.fromString(distribution.baseVersion).onOrAfter(Version.V_8_0_0)) {
            ServerUtils.addSettingToExistingConfiguration(installation, "xpack.security.enabled", "false");
        }
        assertInstalled(distribution);
        verifyPackageInstallation(installation, distribution, sh);
        verifySecurityNotAutoConfigured(installation);
    }
    @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/85386")