为什么我收到 HTTP 状态 404 - 未找到?

为什么我收到 HTTP 状态 404 - 未找到?

我对 Artifactory 很陌生。我刚刚使用 RHEL 7 在我的网络服务器上启动了 Artifactory Tomcat。当我尝试访问我的页面时:http://myPage:8081/artifactory/webapp/#/home,我得到:

    HTTP Status 404 – Not Found

    Type Status Report

    Message /artifactory/webapp/

    Description The origin server did not find a current representation for 
    the target resource or is not willing to disclose that one exists.

    Apache Tomcat/8.5.32

我环顾四周,一个解决方案是将 http 更改为 httpd,但我尝试过但没有成功。我该去哪里?我应该查看哪些日志?我查看了 catalina.out 日志,看到的都是警告。预先感谢您的帮助!如果我需要提供任何其他信息,请告诉我。

编辑:当我收到此警告时:

    WARNING: Failed to create work directory 
    [/opt/jfrog/artifactory/tomcat/work/Catalina/localhost/artifactory] for 
    context [/artifactory]. 

我更改了artifactory.system.properties 的权限,现在没问题了。除了 catalina 之外,我的所有日​​志文件都没有显示任何警告或错误。

卡塔琳娜日志:

    16-Sep-2019 10:52:32.221 SEVERE [localhost-startStop-1] 
    org.apache.catalina.core.StandardContext.startInternal One or more                 
    listeners failed to start. Full details will be found in the appropriate 
    container log file
    16-Sep-2019 10:52:32.222 SEVERE [localhost-startStop-1] 
    org.apache.catalina.core.StandardContext.startInternal Context 
    [/artifactory] startup failed due to previous errors
    16-Sep-2019 10:52:32.260 WARNING [localhost-startStop-1] 
    org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The 
    web application [artifactory] 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.
    16-Sep-2019 10:52:32.265 WARNING [localhost-startStop-1] 
    org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads 
    The web application [artifactory] appears to have started a thread named 
    [Thread-4] but has failed to stop it. This is very likely to create a 
    memory leak.

从我在这里看到的:https://stackoverflow.com/questions/36617732/how-to-check-container-log-of-tomcat关于“完整的详细信息将在相应的容器日志中找到。”它说要检查 localhost.log 文件。当我检查 localhost.log 文件时,它显示错误: java.lang.RuntimeException: Properties file artifactory.properties 不存在

答案1

这些警告消息实际上与 HTTP Status 404 错误无关。

为了解决这个问题,

  1. 我恢复了位于此处的 access.xml 文件:/var/opt/jfrog/artifactory/tomcat/conf/Catalina/localhost/通过获取 access 备份文件并将其复制为 access.xml。
  2. 然后它抱怨缺少 join.key 文件。要解决此问题,您需要将 jfrog.join.key.paths 变量与$ARTIFACTORY_HOME底部的路径变量 a相匹配/var/opt/jfrog/artifactory/etc/default

完成这些步骤后,现在将显示您的工件主页。

相关内容