jHipster Undertow请求失败HttpServerExchange [英] jHipster Undertow request failed HttpServerExchange

查看:2099
本文介绍了jHipster Undertow请求失败HttpServerExchange的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将jHipster用于后端管理仪表板应用程序,并且我经常收到此错误,每次服务器出现故障都将其关闭.

i'm using jHipster for back-end admin dashboard application and i'm getting this error often that brings my server down every time it appears.

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:Undertow请求失败HttpServerExchange {CONNECT check.best-proxies.ru:80请求{Host = [check.best-proxies .ru:80]}响应{}} java.lang.IllegalArgumentException:UT000068:Servlet路径匹配失败 在io.undertow.servlet.handlers.ServletPathMatchesData.getServletHandlerByPath(ServletPathMatchesData.java:83) 在io.undertow.servlet.handlers.ServletPathMatches.getServletHandlerByPath(ServletPathMatches.java:88) 在io.undertow.servlet.handlers.ServletInitialHandler.handleRequest(ServletInitialHandler.java:151) 在io.undertow.server.handlers.HttpContinueReadHandler.handleRequest(HttpContinueReadHandler.java:65) 在io.undertow.server.handlers.encoding.EncodingHandler.handleRequest(EncodingHandler.java:66) 在io.undertow.server.Connectors.executeRootHandler(Connectors.java:336) 在io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:255) 在io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136) 在io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:59) 在org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) 在org.xnio.conduits.ReadReadyHandler $ ChannelListenerHandler.readReady(ReadReadyHandler.java:66) 在org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88) 在org.xnio.nio.WorkerThread.run(WorkerThread.java:561)

2019-12-26 10:30:29,516 ERROR [XNIO-2 task-10] WebsocketConfiguration$2: Handshake failed due to invalid Upgrade header: null 2019-12-26 10:38:46,039 ERROR [XNIO-2 I/O-1] request: UT005071: Undertow request failed HttpServerExchange{ CONNECT check.best-proxies.ru:80 request {Host=[check.best-proxies.ru:80]} response {}} java.lang.IllegalArgumentException: UT000068: Servlet path match failed 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的就是这种方法:

Since jHipster generates a lot of configuration, the only thing i could find about undertow is this method :

@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));
    }
}

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

Can anyone tell me where is the problem?

提前谢谢!

推荐答案

是搜索爬网程序,找不到URL,抛出错误,您可以编写robots.txt禁止在根目录上使用它.

It's the search crawler to get url not found,throw the error,you can write robots.txt to prohibit it on the root directory.

这篇关于jHipster Undertow请求失败HttpServerExchange的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆