(virtually) Impossible to turn off "Enable All Statistics" in > Server status > System Status
Description
Environment
This Geoserver is setup in Tomcat 9.0.62 with Temurin JRE 11 in a docker container with a Traefik container in front and has the `GEOSERVER_CSRF_WHITELIST
environment variable set to AAAAAAAA.tailormap.nl
Attachments
Activity

Molly Foley August 10, 2024 at 4:47 PM(edited)
Oddly, I am experiencing this same behavior in 2.25.3. I am on RHEL 9 using Tomcat 9.0.87 and OpenJDK Java 11. I enabled statistics and now the page refreshes before I can even scroll down to the bottom, and every time I uncheck the checkbox, the page still refreshes every one second and the checkbox is checked again automatically with the statistics updated. There is no way for me to turn them off.
We also have the GEOSERVER_CRSF_WHITELIST java system property set, as well as ALLOW_ENV_PARAMETRIZATION=true, and GEOSERVER_DATA_DIR set to a specific directory if any of that matters. We have also enabled Tomcat CORS in the GeoServer web.xml file. We have set the proxy base URL in global settings. Outside of those things, we haven’t really done any other configuration. There is only one user for our server; an administrative one. We have the default ADMIN and GROUP_ADMIN roles as well.
The only way I have been able to turn it off is by restarting tomcat, thus restarting geoserver.
Jody Garnett July 10, 2022 at 3:39 PM
While I have addressed the short term need, I think more could be done:
Allow the display to show the prior statistics, with the “Updated at” indicating when they were obtained
Display the stats collected when the page is first displayed
Change Enable all statistics to Collect statistics to start/stop thread in background
Jody Garnett July 9, 2022 at 5:44 AM
Did a check for 5 seconds (or give times the amount of time required to collect metrics).
Jody Garnett July 8, 2022 at 1:46 PM
What got me was when enabled I could not even scroll down the page to read everything.
Mark Prins July 8, 2022 at 7:52 AM(edited)
So I think the problem originates here: that sets a 1 second refresh on the panel
and I don’t think it considers the state of the checkbox
In / a checkbox was added to enable all statistics,
however this option is basically impossible to deactivate once activated because the page is (still) refreshed every second using an ajax call.
Related to this or maybe the cause of it is that un-checking the checkbox results in a POST that errors out in a 403 (but this could be a setup thing as well). I’m logged in as “admin” and no other users have been defined.
(note that server url and all auth params/cookies have been changed in the above, but are identical to those of the GET request that successfully reloads the metrics panel.