Wiremock: Jetty QueuedThreadPool warnings in logs when running junit tests

Created on 6 Jan 2017  路  5Comments  路  Source: tomakehurst/wiremock

WireMock 2.4.1

when runnning junit tests using wiremock, I see some random jetty warnings in the logs :

2017-01-06 17:49:27,788 -  INFO - org.eclipse.jetty.server.ServerConnector : Stopped ServerConnector@3dd1dc90{HTTP/1.1}{0.0.0.0:8080}
2017-01-06 17:49:27,788 -  INFO - o.e.jetty.server.handler.ContextHandler  : Stopped o.e.j.s.ServletContextHandler@320de594{/,null,UNAVAILABLE}
2017-01-06 17:49:27,788 -  INFO - o.e.jetty.server.handler.ContextHandler  : Stopped o.e.j.s.ServletContextHandler@3e7634b9{/__admin,null,UNAVAILABLE}
2017-01-06 17:49:27,789 -  WARN - o.e.jetty.util.thread.QueuedThreadPool   : qtp2116179210{STOPPING,8<=8<=10,i=8,q=7} Couldn't stop Thread[qtp2116179210-22,5,]
2017-01-06 17:49:27,790 -  WARN - o.e.jetty.util.thread.QueuedThreadPool   : qtp2116179210{STOPPING,8<=8<=10,i=2,q=7} Couldn't stop Thread[qtp2116179210-23,5,]
2017-01-06 17:49:27,790 -  WARN - o.e.jetty.util.thread.QueuedThreadPool   : qtp2116179210{STOPPING,8<=8<=10,i=0,q=6} Couldn't stop Thread[qtp2116179210-26,5,]

is this a known issue ? is there a clean way to avoid theses warnings, without setting the log level in logback.xml ?

Most helpful comment

Currently I'm using the following settings in a logback-test.xml which is used only when runnnig tests.

<!-- for wiremock standard jar -->
<logger name="org.eclipse.jetty.util.thread.QueuedThreadPool" level="ERROR" />
<!-- for wiremock standalone shaded jar -->
<logger name="wiremock.org.eclipse.jetty.util.thread.QueuedThreadPool" level="ERROR" />

Of course, there is also a lockback.xml without these settings for production runs.

All 5 comments

Not sure, but I suspect these are due to WireMock attempting to fairly aggressively shut down, on the basis that it's better for it to happen fast rather than cleanly (I've never found this to affect my actual tests).

If it's a problem for you I think suppressing it via the log config is probably the easiest solution.

Thank you for the explaination.
I suppressed the warnings in the test log configuration (was easy ;-)

Hi, I'm getting the same kind of problem where I receive anywhere between approximately 1 - 4 "Couldn't stop thread" warnings, i.e.
[main] QueuedThreadPool WARN qtp1983025922{STOPPING,8<=8<=10,i=0,q=1} Couldn't stop Thread[qtp1983025922-12,5,]
Is there any solution to this other than suppressing the warnings? I'm not too keen on doing this.

Currently, there isn't. As discussed above this is a tradeoff I think makes sense, and adding a log config line to suppress it isn't much effort.

Currently I'm using the following settings in a logback-test.xml which is used only when runnnig tests.

<!-- for wiremock standard jar -->
<logger name="org.eclipse.jetty.util.thread.QueuedThreadPool" level="ERROR" />
<!-- for wiremock standalone shaded jar -->
<logger name="wiremock.org.eclipse.jetty.util.thread.QueuedThreadPool" level="ERROR" />

Of course, there is also a lockback.xml without these settings for production runs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rugden picture rugden  路  3Comments

wujimin picture wujimin  路  4Comments

jaina00 picture jaina00  路  4Comments

OllyAndJo picture OllyAndJo  路  5Comments

karolzmuda picture karolzmuda  路  5Comments