在将war File部署到tomcat中时出现错误

时间:2019-11-22 13:35:22

标签: spring-boot tomcat

当我尝试将war文件部署到托管在AWS上的tomcat时,出现以下错误。在运行正常之前,最近遇到了此问题,请帮助我解决此问题。 谢谢。

20-Nov-2019 05:11:41.728 INFO [Catalina-utility-2] org.apache.catalina.startup.HostConfig.undeploy Undeploying context [/apis]
20-Nov-2019 05:11:41.779 WARNING [Catalina-utility-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [apis] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
20-Nov-2019 05:12:11.843 INFO [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/u01/tomcat/webapps/apis.war]
20-Nov-2019 05:12:13.962 SEVERE [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/u01/tomcat/webapps/apis.war]
    java.lang.IllegalStateException: Error starting child
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:773)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1620)



20-Nov-2019 05:24:35.542 INFO [Catalina-utility-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
20-Nov-2019 05:24:35.564 INFO [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/u01/tomcat/webapps/apis.war] has finished in [43,926] ms
20-Nov-2019 05:25:11.560 SEVERE [ajp-nio-8009-exec-143] org.apache.coyote.ajp.AjpMessage.processHeader Invalid message received with signature [18245]
20-Nov-2019 05:25:11.850 SEVERE [ajp-nio-8009-exec-146] org.apache.coyote.ajp.AjpMessage.processHeader Invalid message received with signature [5635]
20-Nov-2019 13:22:01.921 INFO [http-nio-80-exec-173] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
 Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
    java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
        at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:415)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:292)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)
20-Nov-2019 13:44:16.665 SEVERE [https-jsse-nio-443-exec-531] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
    java.lang.NullPointerException
20-Nov-2019 13:44:16.672 SEVERE [https-jsse-nio-443-exec-532] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
    java.lang.NullPointerException
20-Nov-2019 13:44:16.678 SEVERE [https-jsse-nio-443-exec-533] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
    java.lang.NullPointerException
20-Nov-2019 13:44:16.684 SEVERE [https-jsse-nio-443-exec-535] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
    java.lang.NullPointerException
20-Nov-2019 13:44:16.691 SEVERE [https-jsse-nio-443-exec-529] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
    java.lang.NullPointerException
20-Nov-2019 13:44:16.699 SEVERE [https-jsse-nio-443-exec-538] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
    java.lang.NullPointerException
20-Nov-2019 13:44:16.705 SEVERE [https-jsse-nio-443-exec-537] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
    java.lang.NullPointerException
20-Nov-2019 13:44:16.711 SEVERE [https-jsse-nio-443-exec-534] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
    java.lang.NullPointerException
20-Nov-2019 13:44:16.717 SEVERE [https-jsse-nio-443-exec-536] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
    java.lang.NullPointerException
20-Nov-2019 13:44:16.723 SEVERE [https-jsse-nio-443-exec-530] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
    java.lang.NullPointerException
20-Nov-2019 13:44:16.729 SEVERE [https-jsse-nio-443-exec-531] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
    java.lang.NullPointerException
20-Nov-2019 13:44:16.735 SEVERE [https-jsse-nio-443-exec-532] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
    java.lang.NullPointerException
20-Nov-2019 13:44:16.741 SEVERE [https-jsse-nio-443-exec-533] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
    java.lang.NullPointerException
20-Nov-2019 13:44:16.746 SEVERE [https-jsse-nio-443-exec-535] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
    java.lang.NullPointerException

1 个答案:

答案 0 :(得分:0)

我认为您的问题在这里: java.lang.IllegalArgumentException:在方法名称中找到无效字符。 HTTP方法名称必须是令牌

在两个不同的应用程序协议(HTTP和HTTP)之间进行请求时,可能会发生这种情况。尝试在所有地方使用HTTP,看看这是否是问题的根源,然后适当地配置所有服务器以使其与HTTP一起使用