Cache Statistics Dashboard doesn't work with Java 17 but works with Java 11 on Windows

XMLWordPrintable

    • 38
    • Severity 2 - Major
    • 172

      Issue Summary

      Accessing the Cache statistics page on Confluence installed on Windows Operating System and with Java version 17 results in 'Fetch of cache statistics failed' error message.

      When the below curl command is used to refresh the cache statistics, the page works for a few minutes and results in the same error message.

        curl -u <adminUsername>:<adminPassword> -X DELETE "<base_url}/rest/cacheManagement/1.0/cacheEntries" 

       

      This is reproducible on Data Center: yes

      Steps to Reproduce

      1. Install Confluence v8.3.1 on Windows Server 2019.
      2. Download and install Java version 17 on Windows.
      3. Configure Confluence to use Java version 17.
      4. Navigate to General Configuration -> Cache Management

      Expected Results

      The Cache Management page displays the cache statistics.

       

      Actual Results

      We get to see the 'Fetch of cache statistics failed' error message.

      Workaround

      • No proper workaround is available at the moment. Below command helps to view the page for a very short period.
         curl -u <adminUsername>:<adminPassword> -X DELETE "<base_url>/rest/cacheManagement/1.0/cacheEntries" 

        PowerShell

        cURL.exe --request DELETE --url '<base_url>/rest/cacheManagement/1.0/cacheEntries' --user <adminUsername>:<adminPassword>
      • Alternate workaround is to use Java11.

      Edit: a workaround is to add `--add-opens java.base/java.util.concurrent=ALL-UNNAMED` to the jpms.txt file, and restart Confluence.

        1. image-2023-08-02-18-33-20-501.png
          59 kB
          Sunil Kumar C
        2. image-2023-08-02-18-33-40-614.png
          59 kB
          Sunil Kumar C

            Assignee:
            Jing Zheng
            Reporter:
            Sunil Kumar C
            Votes:
            34 Vote for this issue
            Watchers:
            59 Start watching this issue

              Created:
              Updated:
              Resolved: