在 Ubuntu+Nginx+Tomcat 中部署 Geoserver 的问题
Problem with deploying Geoserver in Ubuntu+Nginx+Tomcat
我在远程服务器 运行 Ubuntu 18.04、nginx 和 tomcat10 中部署 Geoserver 时遇到问题。过去,我再次成功部署了 Geoserver,但现在,不知何故,一切都变得松散了。我尝试清理所有 tomcat 个实例、服务和文件夹以及地理服务器文件夹。然后,我按照说明here,成功安装了Tomcat 10.0.12。然而,Geoserver根本没有部署,尝试各自的url。我的 Catalina 日志显示:
04-Oct-2021 08:41:04.476 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/10.0.12
04-Oct-2021 08:41:04.481 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 28 2021 13:34:21 UTC
04-Oct-2021 08:41:04.481 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 10.0.12.0
04-Oct-2021 08:41:04.481 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
04-Oct-2021 08:41:04.481 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.15.0-128-generic
04-Oct-2021 08:41:04.481 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
04-Oct-2021 08:41:04.481 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-11-openjdk-amd64
04-Oct-2021 08:41:04.481 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 11.0.10+9-Ubuntu-0ubuntu1.18.04
04-Oct-2021 08:41:04.481 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Ubuntu
04-Oct-2021 08:41:04.482 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /opt/tomcat
04-Oct-2021 08:41:04.482 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/tomcat
04-Oct-2021 08:41:04.492 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
04-Oct-2021 08:41:04.493 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
04-Oct-2021 08:41:04.493 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
04-Oct-2021 08:41:04.493 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
04-Oct-2021 08:41:04.493 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
04-Oct-2021 08:41:04.493 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
04-Oct-2021 08:41:04.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
04-Oct-2021 08:41:04.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.security.egd=file:///dev/urandom
04-Oct-2021 08:41:04.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
04-Oct-2021 08:41:04.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
04-Oct-2021 08:41:04.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
04-Oct-2021 08:41:04.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms512M
04-Oct-2021 08:41:04.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024M
04-Oct-2021 08:41:04.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseParallelGC
04-Oct-2021 08:41:04.495 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
04-Oct-2021 08:41:04.495 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat
04-Oct-2021 08:41:04.495 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat
04-Oct-2021 08:41:04.495 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
04-Oct-2021 08:41:04.500 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent An older version [1.2.21] of the Apache Tomcat Native library is installed, while Tomcat recommends a minimum version of [1.2.30]
04-Oct-2021 08:41:04.500 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.21] using APR version [1.6.3].
04-Oct-2021 08:41:04.500 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [false].
04-Oct-2021 08:41:04.505 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1g 21 Apr 2020]
04-Oct-2021 08:41:04.794 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
04-Oct-2021 08:41:04.816 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [515] milliseconds
04-Oct-2021 08:41:04.870 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
04-Oct-2021 08:41:04.870 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.0.12]
04-Oct-2021 08:41:04.886 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/opt/tomcat/webapps/geoserver.war]
04-Oct-2021 08:41:10.118 INFO [main] 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.
04-Oct-2021 08:41:10.145 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
04-Oct-2021 08:41:10.148 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/geoserver] startup failed due to previous errors
04-Oct-2021 08:41:10.160 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/opt/tomcat/webapps/geoserver.war] has finished in [5,273] ms
04-Oct-2021 08:41:10.160 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/examples]
04-Oct-2021 08:41:10.302 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/examples] has finished in [142] ms
04-Oct-2021 08:41:10.302 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/manager]
04-Oct-2021 08:41:10.328 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/manager] has finished in [26] ms
04-Oct-2021 08:41:10.329 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/ROOT]
04-Oct-2021 08:41:10.342 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/ROOT] has finished in [13] ms
04-Oct-2021 08:41:10.343 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/host-manager]
04-Oct-2021 08:41:10.359 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/host-manager] has finished in [16] ms
04-Oct-2021 08:41:10.359 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/docs]
04-Oct-2021 08:41:10.372 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/docs] has finished in [13] ms
04-Oct-2021 08:41:10.377 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
04-Oct-2021 08:41:10.398 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [5581] milliseconds
任何人都可以指导我设置有什么问题吗?
事实证明,根据 Piotr 的评论,我与 tomcat 10 存在兼容性问题,所以我返回到 tomcat8,它工作正常。
我在 tomcat 10(运行 在 java 11)使用此工具转换原始 geoserver.war 后成功启动了 geoserver 2.20.1,
Tomcat Jakarta EE 软件下载的迁移工具:
https://tomcat.apache.org/download-migration.cgi
所以试试 tomcat 10 ;-)
我在远程服务器 运行 Ubuntu 18.04、nginx 和 tomcat10 中部署 Geoserver 时遇到问题。过去,我再次成功部署了 Geoserver,但现在,不知何故,一切都变得松散了。我尝试清理所有 tomcat 个实例、服务和文件夹以及地理服务器文件夹。然后,我按照说明here,成功安装了Tomcat 10.0.12。然而,Geoserver根本没有部署,尝试各自的url。我的 Catalina 日志显示:
04-Oct-2021 08:41:04.476 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/10.0.12
04-Oct-2021 08:41:04.481 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 28 2021 13:34:21 UTC
04-Oct-2021 08:41:04.481 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 10.0.12.0
04-Oct-2021 08:41:04.481 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
04-Oct-2021 08:41:04.481 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.15.0-128-generic
04-Oct-2021 08:41:04.481 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
04-Oct-2021 08:41:04.481 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-11-openjdk-amd64
04-Oct-2021 08:41:04.481 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 11.0.10+9-Ubuntu-0ubuntu1.18.04
04-Oct-2021 08:41:04.481 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Ubuntu
04-Oct-2021 08:41:04.482 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /opt/tomcat
04-Oct-2021 08:41:04.482 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/tomcat
04-Oct-2021 08:41:04.492 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
04-Oct-2021 08:41:04.493 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
04-Oct-2021 08:41:04.493 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
04-Oct-2021 08:41:04.493 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
04-Oct-2021 08:41:04.493 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
04-Oct-2021 08:41:04.493 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
04-Oct-2021 08:41:04.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
04-Oct-2021 08:41:04.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.security.egd=file:///dev/urandom
04-Oct-2021 08:41:04.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
04-Oct-2021 08:41:04.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
04-Oct-2021 08:41:04.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
04-Oct-2021 08:41:04.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms512M
04-Oct-2021 08:41:04.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024M
04-Oct-2021 08:41:04.494 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseParallelGC
04-Oct-2021 08:41:04.495 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
04-Oct-2021 08:41:04.495 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat
04-Oct-2021 08:41:04.495 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat
04-Oct-2021 08:41:04.495 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
04-Oct-2021 08:41:04.500 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent An older version [1.2.21] of the Apache Tomcat Native library is installed, while Tomcat recommends a minimum version of [1.2.30]
04-Oct-2021 08:41:04.500 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.21] using APR version [1.6.3].
04-Oct-2021 08:41:04.500 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [false].
04-Oct-2021 08:41:04.505 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1g 21 Apr 2020]
04-Oct-2021 08:41:04.794 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
04-Oct-2021 08:41:04.816 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [515] milliseconds
04-Oct-2021 08:41:04.870 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
04-Oct-2021 08:41:04.870 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/10.0.12]
04-Oct-2021 08:41:04.886 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/opt/tomcat/webapps/geoserver.war]
04-Oct-2021 08:41:10.118 INFO [main] 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.
04-Oct-2021 08:41:10.145 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
04-Oct-2021 08:41:10.148 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/geoserver] startup failed due to previous errors
04-Oct-2021 08:41:10.160 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/opt/tomcat/webapps/geoserver.war] has finished in [5,273] ms
04-Oct-2021 08:41:10.160 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/examples]
04-Oct-2021 08:41:10.302 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/examples] has finished in [142] ms
04-Oct-2021 08:41:10.302 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/manager]
04-Oct-2021 08:41:10.328 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/manager] has finished in [26] ms
04-Oct-2021 08:41:10.329 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/ROOT]
04-Oct-2021 08:41:10.342 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/ROOT] has finished in [13] ms
04-Oct-2021 08:41:10.343 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/host-manager]
04-Oct-2021 08:41:10.359 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/host-manager] has finished in [16] ms
04-Oct-2021 08:41:10.359 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/docs]
04-Oct-2021 08:41:10.372 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/docs] has finished in [13] ms
04-Oct-2021 08:41:10.377 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
04-Oct-2021 08:41:10.398 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [5581] milliseconds
任何人都可以指导我设置有什么问题吗?
事实证明,根据 Piotr 的评论,我与 tomcat 10 存在兼容性问题,所以我返回到 tomcat8,它工作正常。
我在 tomcat 10(运行 在 java 11)使用此工具转换原始 geoserver.war 后成功启动了 geoserver 2.20.1, Tomcat Jakarta EE 软件下载的迁移工具: https://tomcat.apache.org/download-migration.cgi
所以试试 tomcat 10 ;-)