在 centos 上启动 Artifactory/Tomcat 运行 后得到 404
Getting a 404 after starting Artifactory/Tomcat running on centos
我正在尝试在 centos 服务器上安装 Artifactory 运行。这就是我所做的:
创建了一个名为 artifactory 的新用户
切换到该用户
wget https://bintray.com/artifact/download/jfrog/artifactory-rpms/jfrog-artifactory-oss-4.0.2.rpm
然后按照 artifactorys 文档中的说明进行操作
rpm -ivh jfrog-artifactory-oss-4.0.2.rpm
service artifactory start
service artifactory check
我得到一个 pid,根据文档。一切正常。然后我导航到该网页,但我收到 404:
HTTP Status 404 - /artifactory
type Status report
message /artifactory
description The requested resource is not available.
Apache Tomcat/8.0.22
我想查看日志,它们显然位于 $ARTIFACTORY_HOME/logs/artifactory.log 但找不到目录。执行 echo $ARTIFACTORY_HOME 不会输出任何内容。我在 artifactory.log 上执行了查找命令,但没有结果。超级困惑。任何提示将不胜感激。
更新:
根据 JBaruch 的提示,这里有一些日志更新。
我导航到 /var/opt/jfrog/artifactory/tomcat/logs
ls 显示 catalina.2015-09-04.log catalina.out host-manager.2015-09-04.log localhost.2015-09-04.log manager.2015-09-04.log
这是 catalina.out 和 localhost.2015-09-04.log 的输出:
catalina.out
Sep 04, 2015 1:26:30 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8081"]
Sep 04, 2015 1:26:30 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Sep 04, 2015 1:26:30 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8019"]
Sep 04, 2015 1:26:30 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Sep 04, 2015 1:26:30 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 04, 2015 1:26:30 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.22
Sep 04, 2015 1:26:30 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /opt/jfrog/artifactory/tomcat/conf/Catalina/localhost/artifactory.xml
Sep 04, 2015 1:26:32 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
Sep 04, 2015 1:26:32 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/artifactory] startup failed due to previous errors
Sep 04, 2015 1:26:32 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
WARNING: The web application [artifactory] registered the JDBC driver [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 04, 2015 1:26:32 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deployment of configuration descriptor /opt/jfrog/artifactory/tomcat/conf/Catalina/localhost/artifactory.xml has finished in 2,004 ms
Sep 04, 2015 1:26:32 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/jfrog/artifactory/tomcat/webapps/ROOT
Sep 04, 2015 1:26:32 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /opt/jfrog/artifactory/tomcat/webapps/ROOT has finished in 57 ms
Sep 04, 2015 1:26:32 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8081"]
Sep 04, 2015 1:26:32 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8019"]
对于 localhost.2015-09-04.log
04-Sep-2015 13:26:32.596 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class org.artifactory.webapp.servlet.ArtifactoryHomeConfigListener
java.lang.UnsupportedClassVersionError: org/artifactory/webapp/servlet/ArtifactoryHomeConfigListener : Unsupported major.minor version 52.0 (unable to load class org.artifactory.webapp.servlet.ArtifactoryHomeConfigListener)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2476)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:854)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1274)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:520)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:501)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:120)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4651)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1750)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
04-Sep-2015 13:26:32.598 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class org.artifactory.webapp.servlet.logback.LogbackConfigListener
java.lang.UnsupportedClassVersionError: org/artifactory/webapp/servlet/logback/LogbackConfigListener : Unsupported major.minor version 52.0 (unable to load class org.artifactory.webapp.servlet.logback.LogbackConfigListener)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2476)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:854)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1274)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:520)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:501)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:120)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4651)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1750)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
04-Sep-2015 13:26:32.600 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class org.artifactory.webapp.servlet.ArtifactoryContextConfigListener
java.lang.UnsupportedClassVersionError: org/artifactory/webapp/servlet/ArtifactoryContextConfigListener : Unsupported major.minor version 52.0 (unable to load class org.artifactory.webapp.servlet.ArtifactoryContextConfigListener)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2476)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:854)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1274)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:520)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:501)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:120)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4651)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1750)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
04-Sep-2015 13:26:32.607 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Skipped installing application listeners due to previous error(s)
Artifactory 4 支持 Java 版本 8 及更高版本。
我正在尝试在 centos 服务器上安装 Artifactory 运行。这就是我所做的:
创建了一个名为 artifactory 的新用户
切换到该用户
wget https://bintray.com/artifact/download/jfrog/artifactory-rpms/jfrog-artifactory-oss-4.0.2.rpm
然后按照 artifactorys 文档中的说明进行操作
rpm -ivh jfrog-artifactory-oss-4.0.2.rpm
service artifactory start
service artifactory check
我得到一个 pid,根据文档。一切正常。然后我导航到该网页,但我收到 404:
HTTP Status 404 - /artifactory
type Status report
message /artifactory
description The requested resource is not available.
Apache Tomcat/8.0.22
我想查看日志,它们显然位于 $ARTIFACTORY_HOME/logs/artifactory.log 但找不到目录。执行 echo $ARTIFACTORY_HOME 不会输出任何内容。我在 artifactory.log 上执行了查找命令,但没有结果。超级困惑。任何提示将不胜感激。
更新:
根据 JBaruch 的提示,这里有一些日志更新。
我导航到 /var/opt/jfrog/artifactory/tomcat/logs
ls 显示 catalina.2015-09-04.log catalina.out host-manager.2015-09-04.log localhost.2015-09-04.log manager.2015-09-04.log
这是 catalina.out 和 localhost.2015-09-04.log 的输出:
catalina.out
Sep 04, 2015 1:26:30 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8081"]
Sep 04, 2015 1:26:30 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Sep 04, 2015 1:26:30 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8019"]
Sep 04, 2015 1:26:30 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Sep 04, 2015 1:26:30 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 04, 2015 1:26:30 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.22
Sep 04, 2015 1:26:30 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /opt/jfrog/artifactory/tomcat/conf/Catalina/localhost/artifactory.xml
Sep 04, 2015 1:26:32 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
Sep 04, 2015 1:26:32 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/artifactory] startup failed due to previous errors
Sep 04, 2015 1:26:32 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
WARNING: The web application [artifactory] registered the JDBC driver [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Sep 04, 2015 1:26:32 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deployment of configuration descriptor /opt/jfrog/artifactory/tomcat/conf/Catalina/localhost/artifactory.xml has finished in 2,004 ms
Sep 04, 2015 1:26:32 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/jfrog/artifactory/tomcat/webapps/ROOT
Sep 04, 2015 1:26:32 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /opt/jfrog/artifactory/tomcat/webapps/ROOT has finished in 57 ms
Sep 04, 2015 1:26:32 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8081"]
Sep 04, 2015 1:26:32 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8019"]
对于 localhost.2015-09-04.log
04-Sep-2015 13:26:32.596 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class org.artifactory.webapp.servlet.ArtifactoryHomeConfigListener
java.lang.UnsupportedClassVersionError: org/artifactory/webapp/servlet/ArtifactoryHomeConfigListener : Unsupported major.minor version 52.0 (unable to load class org.artifactory.webapp.servlet.ArtifactoryHomeConfigListener)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2476)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:854)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1274)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:520)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:501)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:120)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4651)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1750)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
04-Sep-2015 13:26:32.598 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class org.artifactory.webapp.servlet.logback.LogbackConfigListener
java.lang.UnsupportedClassVersionError: org/artifactory/webapp/servlet/logback/LogbackConfigListener : Unsupported major.minor version 52.0 (unable to load class org.artifactory.webapp.servlet.logback.LogbackConfigListener)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2476)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:854)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1274)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:520)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:501)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:120)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4651)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1750)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
04-Sep-2015 13:26:32.600 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class org.artifactory.webapp.servlet.ArtifactoryContextConfigListener
java.lang.UnsupportedClassVersionError: org/artifactory/webapp/servlet/ArtifactoryContextConfigListener : Unsupported major.minor version 52.0 (unable to load class org.artifactory.webapp.servlet.ArtifactoryContextConfigListener)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2476)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:854)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1274)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:520)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:501)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:120)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4651)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1750)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
04-Sep-2015 13:26:32.607 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Skipped installing application listeners due to previous error(s)
Artifactory 4 支持 Java 版本 8 及更高版本。