我为什么得到:
.... MapperListener.findDefaultHost服务[StandardService [Catalina]]的未知默认主机[localhost]。 Tomcat将无法处理未指定主机名的HTTP / 1.0请求
这是Grails 3.2.12将生产战部署到Tomcat 9.0.21。在战争部署结束时,这些行会显示出来,从而破坏了部署:
18-Jun-2019 11:34:41.702 INFO [main] org.apache.catalina.core.ApplicationContext.log 2 Spring WebApplicationInitializers detected on classpath
18-Jun-2019 11:35:04.764 SEVERE [main] org.apache.catalina.mapper.MapperListener.findDefaultHost Unknown default host [localhost] for service [StandardService[Catalina]]. Tomcat will not be able process HTTP/1.0 requests that do not specify a host name.
18-Jun-2019 11:35:04.764 SEVERE [main] org.apache.catalina.mapper.MapperListener.findDefaultHost Unknown default host [localhost] for service [StandardService[Catalina]]. Tomcat will not be able process HTTP/1.0 requests that do not specify a host name.
18-Jun-2019 11:35:04.764 SEVERE [main] org.apache.catalina.mapper.MapperListener.findDefaultHost Unknown default host [localhost] for service [StandardService[Catalina]]. Tomcat will not be able process HTTP/1.0 requests that do not specify a host name.
18-Jun-2019 11:35:04.764 SEVERE [main] org.apache.catalina.mapper.MapperListener.findDefaultHost Unknown default host [localhost] for service [StandardService[Catalina]]. Tomcat will not be able process HTTP/1.0 requests that do not specify a host name.
有效的虚拟主机,但是仅通过在Web应用程序中运行一次战争就可以解决问题。奇怪的是,在运行相同版本的tomcat的某些平台上,战争没有产生这些错误,但是Windows 10的AWS部署却产生了错误。该应用程序正在从JNDI获取资源。
这是否意味着打包到战争中的某个类是WebApplicationInitializer?那会是什么?
答案 0 :(得分:0)
发生此错误的原因是,没有为