jHipster Undertow 请求失败 HttpServerExchange.



我正在使用jHipster作为后端管理仪表板应用程序,我经常收到此错误,每次出现时都会使我的服务器关闭。

2019-12-26 10:

30:29,516 错误 [XNIO-2 任务-10] WebsocketConfiguration$2:由于无效,握手失败 升级标头:空 2019-12-26 10:38:46,039 错误 [XNIO-2 I/O-1] 请求:UT005071:Undertow 请求失败 HttpServerExchange{ CONNECT check.best-proxies.ru:80 request {Host=[check.best-proxies.ru:80]} 响应 {}} java.lang.IllegalArgumentException: UT000068: Servlet 路径匹配失败 at io.undertow.servlet.handlers.ServletPathMatchesData.getServletHandlerByPath(ServletPathMatchesData.java:83( at io.undertow.servlet.handlers.ServletPathMatches.getServletHandlerByPath(ServletPathMatches.java:88( at io.undertow.servlet.handlers.ServletInitialHandler.handleRequest(ServletInitialHandler.java:151( at io.undertow.server.handlers.HttpContinueReadHandler.handleRequest(HttpContinueReadHandler.java:65( at io.undertow.server.handlers.encoding.EncodingHandler.handleRequest(EncodingHandler.java:66( at io.undertow.server.Connectors.executeRootHandler(Connectors.java:336( 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.HttpReadListener.handleEvent(HttpReadListener.java:59( at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92( at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66( at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88( at org.xnio.nio.WorkerThread.run(WorkerThread.java:561(

由于jHipster生成了很多配置,因此我唯一能找到的关于undertow的就是这种方法:

@Override
public void customize(ConfigurableEmbeddedServletContainer container) {
MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT);
// IE issue, see https://github.com/jhipster/generator-jhipster/pull/711
mappings.add("html", MediaType.TEXT_HTML_VALUE + ";charset=utf-8");
// CloudFoundry issue, see https://github.com/cloudfoundry/gorouter/issues/64
mappings.add("json", MediaType.TEXT_HTML_VALUE + ";charset=utf-8");
container.setMimeMappings(mappings);
// When running in an IDE or with ./mvnw spring-boot:run, set location of the static web assets.
setLocationForStaticAssets(container);
/*
* Enable HTTP/2 for Undertow - https://twitter.com/ankinson/status/829256167700492288
* HTTP/2 requires HTTPS, so HTTP requests will fallback to HTTP/1.1.
* See the JHipsterProperties class and your application-*.yml configuration files
* for more information.
*/
if (jHipsterProperties.getHttp().getVersion().equals(JHipsterProperties.Http.Version.V_2_0) &&
container instanceof UndertowEmbeddedServletContainerFactory) {
((UndertowEmbeddedServletContainerFactory) container)
.addBuilderCustomizers(builder ->
builder.setServerOption(UndertowOptions.ENABLE_HTTP2, true));
}
}

谁能告诉我问题出在哪里?

提前感谢!

是搜索爬虫得到url找不到,抛出错误,可以写robots.txt禁止在根目录上。

相关内容

  • 没有找到相关文章

最新更新