相同的应用程序在两台机器上表现不同
Same Application Behaving Differently in Two Machine
我在启动 Apache 时遇到此异常 Flume :
2021-04-20 20:04:11,463 (qtp39926397-25) [WARN - org.eclipse.jetty.server.HttpChannel.handleException(HttpChannel.java:600)]
java.lang.NoSuchMethodError: org.eclipse.jetty.util.Attributes.unwrap(Lorg/eclipse/jetty/util/Attributes;)Lorg/eclipse/jetty/util/Attributes;
at org.eclipse.jetty.server.Request.recycle(Request.java:1870)
at org.eclipse.jetty.server.HttpChannel.recycle(HttpChannel.java:309)
at org.eclipse.jetty.server.HttpChannelOverHttp.recycle(HttpChannelOverHttp.java:81)
at org.eclipse.jetty.server.HttpConnection.onCompleted(HttpConnection.java:435)
at org.eclipse.jetty.server.HttpChannel.onCompleted(HttpChannel.java:743)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:363)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:272)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint.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:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
at java.lang.Thread.run(Thread.java:748)
我正在使用 <jetty.version>9.4.30.v20200611</jetty.version>
。
问题是 运行 在我的本地机器上很好,但是当我尝试在 VM 中使用我的应用程序时,它向我抛出这个错误,我不确定出了什么问题?
我使用 mvn dependency:tree -Dincludes=org.eclipse.jetty:jetty-util
检查了依赖关系
并没有找到任何不同的版本。
您在 Apache Flume 上的部署使用的 Jetty 版本早于 9.4.29(首次引入 Attributes.unwrap()
)。
仔细检查 Jetty 服务器的启动日志,它会公布它认为的版本 运行。
示例:
2021-04-20 16:37:05.615:INFO:oejs.Server:main: jetty-9.4.40.v20210413; built: 2021-04-13T20:42:42.668Z; git: b881a572662e1943a14ae12e7e1207989f218b74; jvm 11.0.10+9
or
2021-04-20 16:37:22.790:INFO:oejs.Server:main: jetty-9.3.25.v20180904, build timestamp: 2018-09-04T16:11:46-05:00, git hash: 3ce520221d0240229c862b122d2b06c12a625732
我在启动 Apache 时遇到此异常 Flume :
2021-04-20 20:04:11,463 (qtp39926397-25) [WARN - org.eclipse.jetty.server.HttpChannel.handleException(HttpChannel.java:600)]
java.lang.NoSuchMethodError: org.eclipse.jetty.util.Attributes.unwrap(Lorg/eclipse/jetty/util/Attributes;)Lorg/eclipse/jetty/util/Attributes;
at org.eclipse.jetty.server.Request.recycle(Request.java:1870)
at org.eclipse.jetty.server.HttpChannel.recycle(HttpChannel.java:309)
at org.eclipse.jetty.server.HttpChannelOverHttp.recycle(HttpChannelOverHttp.java:81)
at org.eclipse.jetty.server.HttpConnection.onCompleted(HttpConnection.java:435)
at org.eclipse.jetty.server.HttpChannel.onCompleted(HttpChannel.java:743)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:363)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:272)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint.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:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
at java.lang.Thread.run(Thread.java:748)
我正在使用 <jetty.version>9.4.30.v20200611</jetty.version>
。
问题是 运行 在我的本地机器上很好,但是当我尝试在 VM 中使用我的应用程序时,它向我抛出这个错误,我不确定出了什么问题?
我使用 mvn dependency:tree -Dincludes=org.eclipse.jetty:jetty-util
检查了依赖关系
并没有找到任何不同的版本。
您在 Apache Flume 上的部署使用的 Jetty 版本早于 9.4.29(首次引入 Attributes.unwrap()
)。
仔细检查 Jetty 服务器的启动日志,它会公布它认为的版本 运行。
示例:
2021-04-20 16:37:05.615:INFO:oejs.Server:main: jetty-9.4.40.v20210413; built: 2021-04-13T20:42:42.668Z; git: b881a572662e1943a14ae12e7e1207989f218b74; jvm 11.0.10+9
or
2021-04-20 16:37:22.790:INFO:oejs.Server:main: jetty-9.3.25.v20180904, build timestamp: 2018-09-04T16:11:46-05:00, git hash: 3ce520221d0240229c862b122d2b06c12a625732