Невозможно получить доступ к приложению, развернутому в Tomcat - PullRequest
0 голосов
/ 18 апреля 2019

Я развернул Java-приложение на Tomcat 8.5 (оно отображается в диспетчере приложений Tomcat).Если я нажму на URL, который должен открыть приложение, у меня ошибка 404 (ничего не найдено под этим URL).

Тот же .war в одной и той же настройке (точный каталог tomcat) на разных машинах работает.

Все происходит на местных хозяевах.Что может быть не так, что я должен искать?

Редактировать:

Каталина журналы:

18-Apr-2019 11:23:42.830 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.5.39
18-Apr-2019 11:23:42.833 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Mar 14 2019 11:24:26 UTC
18-Apr-2019 11:23:42.833 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.5.39.0
18-Apr-2019 11:23:42.833 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 10
18-Apr-2019 11:23:42.833 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            10.0
18-Apr-2019 11:23:42.833 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
18-Apr-2019 11:23:42.834 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             C:\Program Files\Java\jdk1.8.0_201\jre
18-Apr-2019 11:23:42.834 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_201-b09
18-Apr-2019 11:23:42.834 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
18-Apr-2019 11:23:42.834 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\apache-tomcat-8.5.39
18-Apr-2019 11:23:42.834 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         C:\apache-tomcat-8.5.39
18-Apr-2019 11:23:42.836 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\apache-tomcat-8.5.39\conf\logging.properties
18-Apr-2019 11:23:42.836 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
18-Apr-2019 11:23:42.836 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
18-Apr-2019 11:23:42.836 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
18-Apr-2019 11:23:42.836 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
18-Apr-2019 11:23:42.836 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\apache-tomcat-8.5.39
18-Apr-2019 11:23:42.837 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\apache-tomcat-8.5.39
18-Apr-2019 11:23:42.837 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\apache-tomcat-8.5.39\temp
18-Apr-2019 11:23:42.838 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: [C:\Program Files\Java\jdk1.8.0_201\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\nodejs\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\apache-maven-3.6.1-bin\apache-maven-3.6.1\bin;C:\Users\admin\AppData\Local\Microsoft\WindowsApps;.]
18-Apr-2019 11:23:42.941 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
18-Apr-2019 11:23:43.056 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
18-Apr-2019 11:23:43.070 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
18-Apr-2019 11:23:43.072 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
18-Apr-2019 11:23:43.073 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 500 ms
18-Apr-2019 11:23:43.096 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
18-Apr-2019 11:23:43.096 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.39
18-Apr-2019 11:23:43.111 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [C:\apache-tomcat-8.5.39\webapps\ProductResearch.war]
18-Apr-2019 11:23:46.783 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.
18-Apr-2019 11:23:47.070 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [C:\apache-tomcat-8.5.39\webapps\ProductResearch.war] has finished in [3,959] ms
18-Apr-2019 11:23:47.072 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\apache-tomcat-8.5.39\webapps\docs]
18-Apr-2019 11:23:47.096 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\apache-tomcat-8.5.39\webapps\docs] has finished in [24] ms
18-Apr-2019 11:23:47.096 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\apache-tomcat-8.5.39\webapps\examples]
18-Apr-2019 11:23:47.432 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\apache-tomcat-8.5.39\webapps\examples] has finished in [336] ms
18-Apr-2019 11:23:47.433 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\apache-tomcat-8.5.39\webapps\host-manager]
18-Apr-2019 11:23:47.463 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\apache-tomcat-8.5.39\webapps\host-manager] has finished in [30] ms
18-Apr-2019 11:23:47.463 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\apache-tomcat-8.5.39\webapps\manager]
18-Apr-2019 11:23:47.491 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\apache-tomcat-8.5.39\webapps\manager] has finished in [27] ms
18-Apr-2019 11:23:47.491 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\apache-tomcat-8.5.39\webapps\ROOT]
18-Apr-2019 11:23:47.512 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\apache-tomcat-8.5.39\webapps\ROOT] has finished in [21] ms
18-Apr-2019 11:23:47.517 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
18-Apr-2019 11:23:47.525 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
18-Apr-2019 11:23:47.528 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 4455 ms

1 Ответ

0 голосов
/ 19 апреля 2019

Спасибо всем за вклад.Мы выяснили, что произошло:

Приложение было front + backend.И во время создания войны интерфейс не был правильно построен.На другой машине она должна быть заблокирована.Когда мы создали отдельный интерфейс, сайт начал работать.

Так что это не проблема с Tomcat в конце концов.У нас нет никакой документации, так что это метод проб и ошибок.

...