You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Attila Doroszlai (Jira)" <ji...@apache.org> on 2025/12/11 07:18:00 UTC

[jira] [Updated] (HDDS-14149) Prometheus servlet token parsing throws StringIndexOutOfBoundsException

     [ https://issues.apache.org/jira/browse/HDDS-14149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Attila Doroszlai updated HDDS-14149:
------------------------------------
    Component/s: server-framework

> Prometheus servlet token parsing throws StringIndexOutOfBoundsException
> -----------------------------------------------------------------------
>
>                 Key: HDDS-14149
>                 URL: https://issues.apache.org/jira/browse/HDDS-14149
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: server-framework
>            Reporter: Wei-Chiu Chuang
>            Priority: Major
>
> Trying to debug a Prometheus endpoint authorization issue and found this log message in the OM log:
> {noformat}
> 2025-12-09 20:22:11,390 WARN [qtp1790831319-402]-org.eclipse.jetty.server.HttpChannel: /prom
> java.lang.StringIndexOutOfBoundsException: begin 7, end 6, length 6
>         at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4606)
>         at java.base/java.lang.String.substring(String.java:2709)
>         at java.base/java.lang.String.substring(String.java:2682)
>         at org.apache.hadoop.hdds.server.http.PrometheusServlet.doGet(PrometheusServlet.java:53)
> {noformat}
> A typical Prometheus sends the following HTTP request to the endpoint:
> {noformat}
> User-Agent: Prometheus/2.45.3
> Accept: application/openmetrics-text;version=1.0.0,application/openmetrics-text;version=0.0.1;q=0.75,text/plain;version=0.0.4;q=0.5,*/*;q=0.1
> Accept-Encoding: gzip
> Authorization: Bearer <token>
> X-Prometheus-Scrape-Timeout-Seconds: 10
> {noformat}
> Apart from these log messages I don't have much clue.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org