我正在为后端管理仪表板应用程序使用jHipster,并且经常会收到这个错误,每次出现这个错误都会使我的服务器瘫痪。
io.undertow.servlet.handlers.ServletPathMatchesData.getServletHandlerByPath(ServletPathMatchesData.java:83 2019-12-26 10:30:29,516错误XNIO-2任务-10 WebsocketConfiguration$2:握手由于升级标题无效而失败: null 2019-12-26 10:38:46,039错误XNIO-2 I/O-1请求: UT005071:下面两个请求失败HttpServerExchange{ CONNECT .最佳-proxies.ru:80请求{Host=check.最佳-proxies.ru:}响应{} java.lang.IllegalArgumentException: UT000068: UT000068路径匹配在
失败)在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)在org.xnio.nio.WorkerThread.run(WorkerThread.java:561)
由于jHipster生成了大量的配置,所以我唯一能找到的就是这种方法:
@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));
}
}
有人能告诉我问题在哪里吗?
提前感谢!
发布于 2020-03-06 16:07:49
这是搜索爬虫找不到url,抛出错误,你可以写robots.txt来禁止它在根目录。
https://stackoverflow.com/questions/59489539
复制