[jboss-jira] [JBoss JIRA] (WFLY-12413) IllegalStateException when bad metrics scope requested
Jan Stourac (Jira)
issues at jboss.org
Thu Aug 22 11:02:00 EDT 2019
Jan Stourac created WFLY-12413:
----------------------------------
Summary: IllegalStateException when bad metrics scope requested
Key: WFLY-12413
URL: https://issues.jboss.org/browse/WFLY-12413
Project: WildFly
Issue Type: Bug
Components: MP Metrics
Affects Versions: 18.0.0.Beta1
Reporter: Jan Stourac
Assignee: Jeff Mesnil
With WildFly build from master branch (commit {{0e13252d9e7a6c82e6e170bac1a2faf727287c1d}}), I can see following exception in log:
{code}
16:38:57,964 ERROR [io.undertow.request] (management I/O-1) UT005071: Undertow request failed HttpServerExchange{ GET /metrics/test}: java.lang.IllegalStateException: UT000002: The response has already been started
at io.undertow.server.HttpServerExchange.setStatusCode(HttpServerExchange.java:1406)
at org.wildfly.extension.microprofile.metrics.MetricsContextService$1.lambda$handleRequest$0(MetricsContextService.java:85)
at io.smallrye.metrics.MetricsRequestHandler.handleRequest(MetricsRequestHandler.java:142)
at io.smallrye.metrics.MetricsRequestHandler.handleRequest(MetricsRequestHandler.java:73)
at org.wildfly.extension.microprofile.metrics.MetricsContextService$1.handleRequest(MetricsContextService.java:84)
at org.jboss.as.domain.http.server.security.RealmReadinessHandler.handleRequest(RealmReadinessHandler.java:51)
at org.jboss.as.domain.http.server.security.ServerErrorReadinessHandler.handleRequest(ServerErrorReadinessHandler.java:35)
at io.undertow.server.handlers.PathHandler.handleRequest(PathHandler.java:91)
at io.undertow.server.handlers.ChannelUpgradeHandler.handleRequest(ChannelUpgradeHandler.java:211)
at io.undertow.server.handlers.cache.CacheHandler.handleRequest(CacheHandler.java:92)
at io.undertow.server.handlers.error.SimpleErrorPageHandler.handleRequest(SimpleErrorPageHandler.java:78)
at io.undertow.server.handlers.CanonicalPathHandler.handleRequest(CanonicalPathHandler.java:49)
at org.jboss.as.domain.http.server.ManagementHttpRequestHandler.handleRequest(ManagementHttpRequestHandler.java:57)
at org.jboss.as.domain.http.server.cors.CorsHttpHandler.handleRequest(CorsHttpHandler.java:75)
at org.jboss.as.domain.http.server.ManagementHttpServer$UpgradeFixHandler.handleRequest(ManagementHttpServer.java:664)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:376)
at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:255)
at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136)
at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:162)
at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:100)
at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:57)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:291)
at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.nio.QueuedNioTcpServer$1.run(QueuedNioTcpServer.java:132)
at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:612)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:479)
{code}
This exception is caused by following request:
{code}
$ curl -v http://localhost:9990/metrics/test
* Trying ::1:9990...
* TCP_NODELAY set
* connect to ::1 port 9990 failed: Connection refused
* Trying 127.0.0.1:9990...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 9990 (#0)
> GET /metrics/test HTTP/1.1
> Host: localhost:9990
> User-Agent: curl/7.65.3
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Connection: keep-alive
< Content-Length: 25
< Date: Thu, 22 Aug 2019 14:57:20 GMT
<
* Connection #0 to host localhost left intact
Bad scope requested: test
The 404 Not Found HTTP response code is expected and also 'Bad scope request: test' in this case. Although, I think that mentioned IllegalStateException should be avoided. Also, this exception is not thrown in WildFly 17.0.1.
{code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list