jHipster Undertow request failed HttpServerExchange

回眸只為那壹抹淺笑 提交于 2020-05-17 07:27:11

问题


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 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)

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?

Thanks in advance!


回答1:


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.



来源:https://stackoverflow.com/questions/59489539/jhipster-undertow-request-failed-httpserverexchange

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!