question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can not work with jetty 9.4.35.v20201120

See original GitHub issue

Bug reports

  • Which version of WireMock you’re using 2.27.2
    jetty version: 9.4.35.v20201120 jetty is not the default 9.4.30.v20200611, because jetty old version have some vulnerability problem.
  • How you’re starting and configuring WireMock, including configuration or CLI the command line
        WireMockConfiguration config = WireMockConfiguration.wireMockConfig()
            .dynamicPort() // proxy port
            .dynamicHttpsPort()// mocker port
            .enableBrowserProxying(true);
        mockServer = new WireMockServer(config);
        mockServer.start();
  • A failing test case that demonstrates the problem * set log level to debug * register any stub * set web browser proxy to the proxy port * send request from web browser will print ClassCastException
java.lang.ClassCastException: class org.eclipse.jetty.io.ssl.SslConnection cannot be cast to class org.eclipse.jetty.server.HttpConnection (org.eclipse.jetty.io.ssl.SslConnection and org.eclipse.jetty.server.HttpConnection are in unnamed module of loader 'app')
	at org.eclipse.jetty.server.HttpInputOverHTTP.produceContent(HttpInputOverHTTP.java:33)
	at org.eclipse.jetty.server.HttpInput.consumeAll(HttpInput.java:721)
	at org.eclipse.jetty.server.HttpConnection.onCompleted(HttpConnection.java:412)
	at org.eclipse.jetty.server.HttpChannel.onCompleted(HttpChannel.java:820)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:368)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
	at java.base@11.0.6/java.lang.Thread.run(Thread.java:834)

when change jetty version from 9.4.35.v20201120 to 9.4.34.v20201102, there is no problem.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
tomakehurstcommented, Apr 22, 2021

Upgraded to latest Jetty 9.x in 64294f0a2a39c3eb308734d5bb73b6c6e16dc49a

0reactions
wujimincommented, Jul 5, 2021

try with jetty 9.4.40/41/42, all works. but all of them have NPE problem:

java.lang.NullPointerException
	at org.eclipse.jetty.proxy.ProxyConnection.toConnectionString(ProxyConnection.java:86)
	at org.eclipse.jetty.io.AbstractEndPoint.toConnectionString(AbstractEndPoint.java:481)
	at org.eclipse.jetty.io.AbstractEndPoint.toString(AbstractEndPoint.java:450)
	at java.base@11.0.6/java.util.Formatter$FormatSpecifier.printString(Formatter.java:3031)
	at java.base@11.0.6/java.util.Formatter$FormatSpecifier.print(Formatter.java:2908)
	at java.base@11.0.6/java.util.Formatter.format(Formatter.java:2673)
	at java.base@11.0.6/java.util.Formatter.format(Formatter.java:2609)
	at java.base@11.0.6/java.lang.String.format(String.java:2897)
	at org.eclipse.jetty.io.AbstractConnection.toString(AbstractConnection.java:296)
	at org.slf4j.helpers.MessageFormatter.safeObjectAppend(MessageFormatter.java:277)
	at org.slf4j.helpers.MessageFormatter.deeplyAppendParameter(MessageFormatter.java:249)
	at org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:211)
	at org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:161)
	at org.eclipse.jetty.util.log.JettyAwareLogger.log(JettyAwareLogger.java:624)
	at org.eclipse.jetty.util.log.JettyAwareLogger.debug(JettyAwareLogger.java:206)
	at org.eclipse.jetty.util.log.Slf4jLog.debug(Slf4jLog.java:95)
	at org.eclipse.jetty.io.AbstractConnection.onClose(AbstractConnection.java:225)
	at org.eclipse.jetty.io.SelectorManager.connectionClosed(SelectorManager.java:345)
	at org.eclipse.jetty.io.ManagedSelector$DestroyEndPoint.run(ManagedSelector.java:1104)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)
	at java.base@11.0.6/java.lang.Thread.run(Thread.java:834)
Read more comments on GitHub >

github_iconTop Results From Across the Web

can not work with jetty 9.4.35.v20201120 · Issue #1412 - GitHub
Bug reports Which version of WireMock you're using 2.27.2 jetty version: 9.4.35.v20201120 jetty is not the default 9.4.30.v20200611, ...
Read more >
org.eclipse.jetty:jetty-server 9.4.35.v20201120 vulnerabilities
Known vulnerabilities in the org.eclipse.jetty:jetty-server package. This does not include vulnerabilities belonging to this package's dependencies.
Read more >
[jetty-announce] Eclipse Jetty 9.4.35 Released!
The Jetty team is happy to announce the immediate availability of a new release for the Eclipse Jetty 9.4.x branch. Jetty 9.4.35.v20201120 ......
Read more >
Vulnerability Details : CVE-2020-27223
0, and 11.0.0 when Jetty handles a request containing multiple Accept headers with a large number of “quality” (i.e. q) parameters, the server ......
Read more >
Jetty 9.4.35.v20201120 - CVE-2020-27223 - ASF JIRA - Apache
What do you know—I encountered a Jetty vulnerability while trying to prepare a new 3.7.0 RC: [ERROR] Failed to execute goal ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found