為什麼我收到 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:屬性文件 artifactory.properties 不存在
警告消息實際上與 HTTP 狀態 404 錯誤無關。
為了解決這個問題,我恢復了位於此處的 access.xml 文件:
/var/opt/jfrog/artifactory/tomcat/conf/Catalina/localhost/
獲取訪問備份文件並將其複制為 access.xml。然後它抱怨缺少 join.key 文件。要解決這個問題,您需要將 jfrog.join.key.paths 變數$ARTIFACTORY_HOME
與/var/opt/jfrog/artifactory/etc/default
. 完成這些步驟後,現在會顯示工件首頁。