关注this我已使用Tomcat 8.0在Azure AppService上部署了GeoServer。
最初Tomcat自动部署它没有任何麻烦,只需花费超过5分钟,任何对网站的请求只会在显示CGI相关错误消息的几分钟后超时。然而,它最终将会启动并运行。
但是,我会不时地注意到它会随机发出请求会冷启动,而Tomcat会重新部署Web存档,这会使请求不得不等待超过3分钟。例如,检查1月3日的Catalina日志,冷启动在早上8点重新部署Web存档,然后在下午2点再次发生。但是,根本没有对网络存档进行任何更改。
如果用户在冷启动时全天等待4分钟,这对我们的生产使用是不可接受的。所以任何帮助都会受到赞赏。
不确定这是否相关,但我注意到Tomcat有一些设置如autoDeploy
等但是我对Tomcat没有经验,因此如果设置这些设置将解决我的问题,我想要一些帮助是正确的设置,更重要的是如何在Azure AppService上设置它以禁用自动重新部署?
这是Catalina的日志:
03-Jan-2018 14:29:38.950 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.46
03-Jan-2018 14:29:38.964 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Aug 10 2017 10:10:31 UTC
03-Jan-2018 14:29:38.964 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.46.0
03-Jan-2018 14:29:38.964 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows Server 2016
03-Jan-2018 14:29:38.964 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0
03-Jan-2018 14:29:38.964 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
03-Jan-2018 14:29:38.964 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: D:\Program Files\Java\zulu8.23.0.3-jdk8.0.144-win_x64\jre
03-Jan-2018 14:29:38.964 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_144-b01
03-Jan-2018 14:29:38.964 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Azul Systems, Inc.
03-Jan-2018 14:29:38.964 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: D:\Program Files (x86)\apache-tomcat-8.0.46
03-Jan-2018 14:29:38.964 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: D:\Program Files (x86)\apache-tomcat-8.0.46
03-Jan-2018 14:29:38.964 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=D:\Program Files (x86)\apache-tomcat-8.0.46\conf\logging.properties
03-Jan-2018 14:29:38.964 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
03-Jan-2018 14:29:38.964 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
03-Jan-2018 14:29:38.964 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
03-Jan-2018 14:29:38.964 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=D:\Program Files (x86)\apache-tomcat-8.0.46\conf\logging.properties
03-Jan-2018 14:29:38.979 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
03-Jan-2018 14:29:38.979 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dsite.logdir=d:\home\LogFiles\
03-Jan-2018 14:29:38.979 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dsite.tempdir=D:\local\Temp
03-Jan-2018 14:29:38.979 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dport.http=11790
03-Jan-2018 14:29:38.979 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.net.preferIPv4Stack=true
03-Jan-2018 14:29:38.979 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=D:\Program Files (x86)\apache-tomcat-8.0.46\endorsed
03-Jan-2018 14:29:38.979 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=D:\Program Files (x86)\apache-tomcat-8.0.46
03-Jan-2018 14:29:38.979 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\Program Files (x86)\apache-tomcat-8.0.46
03-Jan-2018 14:29:38.979 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\local\Temp
03-Jan-2018 14:29:38.979 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files\Java\zulu8.23.0.3-jdk8.0.144-win_x64\bin;D:\Windows\Sun\Java\bin;D:\Windows\system32;D:\Windows;D:\Program Files (x86)\nodejs;D:\Windows\system32;D:\Windows;D:\Windows\System32\Wbem;D:\Windows\System32\WindowsPowerShell\v1.0\;D:\Program Files (x86)\Git\cmd;D:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;;D:\Program Files (x86)\dotnet;D:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;D:\Python27;;D:\home\GDAL\gdal-1.9.2-MSVC2010-x64;.
03-Jan-2018 14:29:39.701 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-127.0.0.1-11790"]
03-Jan-2018 14:29:46.213 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
03-Jan-2018 14:29:46.225 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 10916 ms
03-Jan-2018 14:29:47.866 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
03-Jan-2018 14:29:47.866 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.46
03-Jan-2018 14:29:50.553 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive D:\home\site\wwwroot\webapps\geoserver.war
03-Jan-2018 14:31:13.696 INFO [localhost-startStop-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.
03-Jan-2018 14:31:19.054 INFO [localhost-startStop-1] it.geosolutions.imageio.gdalframework.GDALUtilities.loadGDAL GDAL Native Library loaded (version: 1.9.2)
03-Jan-2018 14:31:25.527 WARNING [localhost-startStop-1] org.geoserver.platform.GeoServerExtensions.checkContext Extension lookup 'XStreamPersisterInitializer', but ApplicationContext is unset.
03-Jan-2018 14:31:25.527 WARNING [localhost-startStop-1] org.geoserver.platform.GeoServerExtensions.checkContext Extension lookup 'ExtensionFilter', but ApplicationContext is unset.
03-Jan-2018 14:31:25.544 WARNING [localhost-startStop-1] org.geoserver.platform.GeoServerExtensions.checkContext Extension lookup 'ExtensionProvider', but ApplicationContext is unset.
03-Jan-2018 14:31:25.544 WARNING [localhost-startStop-1] org.geoserver.platform.GeoServerExtensions.checkContext Extension lookup 'ExtensionFilter', but ApplicationContext is unset.
03-Jan-2018 14:31:44.183 WARNING [localhost-startStop-1] org.geoserver.platform.GeoServerExtensions.checkContext Extension lookup 'GeoServerSecurityProvider', but ApplicationContext is unset.
03-Jan-2018 14:31:44.183 WARNING [localhost-startStop-1] org.geoserver.platform.GeoServerExtensions.checkContext Extension lookup 'ExtensionFilter', but ApplicationContext is unset.
03-Jan-2018 14:31:44.183 WARNING [localhost-startStop-1] org.geoserver.platform.GeoServerExtensions.checkContext Extension lookup 'ExtensionProvider', but ApplicationContext is unset.
03-Jan-2018 14:31:44.183 WARNING [localhost-startStop-1] org.geoserver.platform.GeoServerExtensions.checkContext Extension lookup 'ExtensionFilter', but ApplicationContext is unset.
03-Jan-2018 14:33:32.300 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive D:\home\site\wwwroot\webapps\geoserver.war has finished in 221,747 ms
03-Jan-2018 14:33:32.349 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory D:\home\site\wwwroot\webapps\ROOT
03-Jan-2018 14:33:32.409 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory D:\home\site\wwwroot\webapps\ROOT has finished in 60 ms
03-Jan-2018 14:33:32.409 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory D:\home\site\wwwroot\webapps\target
03-Jan-2018 14:33:32.458 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory D:\home\site\wwwroot\webapps\target has finished in 49 ms
03-Jan-2018 14:33:32.615 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-127.0.0.1-11790"]
03-Jan-2018 14:33:32.723 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 226502 ms