Tomcat 服务器已启动但未在浏览器上 运行?
Tomcat server started but not running on browser?
我一直在尝试在浏览器 localhost: 8080 上 运行 它,但它说 "Site can't be reached" 虽然它说 Tomcat 运行ning在终端
我通过从网站下载二进制版本来安装它。
omnis-MacBook-Air:bin omni$ sudo ./startup.sh
Password:
Using CATALINA_BASE: /usr/local/apache-tomcat-8.0.36-src
Using CATALINA_HOME: /usr/local/apache-tomcat-8.0.36-src
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-8.0.36-src/temp
Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
Using CLASSPATH: /usr/local/apache-tomcat-8.0.36- src/bin/bootstrap.jar:/usr/local/apache-tomcat-8.0.36-src/bin/tomcat-juli.jar
Tomcat started.
这里是Catalina.out
错误:无法找到或加载主程序 class org.apache.catalina.startup.Bootstrap
错误:无法找到或加载主程序 class org.apache.catalina.startup.Bootstrap
这里还有 运行ning 的输出:
omnis-MacBook-Air:bin omni$ ps auxw | grep java
全方位 4660 0.1 0.2 4287968 13996 ?? S 12Aug16 21:44.21 ../PlugIns/Java/jre/bin/java -XstartOnFirstThread -Xmx256m -Declipse.pluginCustomization=../../../customization.ini -Dosgi.configuration.area=.. /../../configuration -Dosgi.configuration.area.default=../../../configuration -Dosgi.instance.area=../../../workspace -Djava.awt.headless =true -Djava.library.path=../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_/eclipse_.so -jar ../../../plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar -os macosx -ws cocoa -arch x86_64 -nl en_US -disableApplicationUpdate -port 58088 -disableServiceFiltering
omni 37621 0.0 0.0 2453628 988 s000 S+ 6:35pm 0:00.01 grep java
这里是 grep tomcat
omnis-MacBook-Air:bin omni$ ps auxw | grep tomcat
root 38084 0.1 1.0 6062688 80312 s000 S 8:54am 0:15.59 /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java -Djava.util.logging.config.file =/usr/local/apache-tomcat-8.0.36/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.endorsed.dirs=/usr/local/apache-tomcat-8.0.36 /endorsed -classpath /usr/local/apache-tomcat-8.0.36/bin/bootstrap.jar:/usr/local/apache-tomcat-8.0.36/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/apache-tomcat-8.0.36 -Dcatalina.home=/usr/local/apache-tomcat-8.0.36 -Djava.io.tmpdir=/usr/local/apache-tomcat-8.0.36/temp org.apache.catalina.startup.Bootstrap 开始
omni 38396 0.0 0.0 2443388 956 s000 S+ 6:35pm 0:00.01 grep tomcat
根据您的 CATALINA_BASE 我怀疑您是从 src 下载并试图 运行 而不是实际构建
确保您下载的是 Core distribution 而不是 src(除非您想自己构建)
然后尝试 运行 对其进行 grep 查找 tomcat 应该会显示
我一直在尝试在浏览器 localhost: 8080 上 运行 它,但它说 "Site can't be reached" 虽然它说 Tomcat 运行ning在终端
我通过从网站下载二进制版本来安装它。
omnis-MacBook-Air:bin omni$ sudo ./startup.sh
Password:
Using CATALINA_BASE: /usr/local/apache-tomcat-8.0.36-src
Using CATALINA_HOME: /usr/local/apache-tomcat-8.0.36-src
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-8.0.36-src/temp
Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
Using CLASSPATH: /usr/local/apache-tomcat-8.0.36- src/bin/bootstrap.jar:/usr/local/apache-tomcat-8.0.36-src/bin/tomcat-juli.jar
Tomcat started.
这里是Catalina.out
错误:无法找到或加载主程序 class org.apache.catalina.startup.Bootstrap
错误:无法找到或加载主程序 class org.apache.catalina.startup.Bootstrap
这里还有 运行ning 的输出:
omnis-MacBook-Air:bin omni$ ps auxw | grep java
全方位 4660 0.1 0.2 4287968 13996 ?? S 12Aug16 21:44.21 ../PlugIns/Java/jre/bin/java -XstartOnFirstThread -Xmx256m -Declipse.pluginCustomization=../../../customization.ini -Dosgi.configuration.area=.. /../../configuration -Dosgi.configuration.area.default=../../../configuration -Dosgi.instance.area=../../../workspace -Djava.awt.headless =true -Djava.library.path=../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_/eclipse_.so -jar ../../../plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar -os macosx -ws cocoa -arch x86_64 -nl en_US -disableApplicationUpdate -port 58088 -disableServiceFiltering omni 37621 0.0 0.0 2453628 988 s000 S+ 6:35pm 0:00.01 grep java
这里是 grep tomcat
omnis-MacBook-Air:bin omni$ ps auxw | grep tomcat
root 38084 0.1 1.0 6062688 80312 s000 S 8:54am 0:15.59 /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java -Djava.util.logging.config.file =/usr/local/apache-tomcat-8.0.36/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.endorsed.dirs=/usr/local/apache-tomcat-8.0.36 /endorsed -classpath /usr/local/apache-tomcat-8.0.36/bin/bootstrap.jar:/usr/local/apache-tomcat-8.0.36/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/apache-tomcat-8.0.36 -Dcatalina.home=/usr/local/apache-tomcat-8.0.36 -Djava.io.tmpdir=/usr/local/apache-tomcat-8.0.36/temp org.apache.catalina.startup.Bootstrap 开始 omni 38396 0.0 0.0 2443388 956 s000 S+ 6:35pm 0:00.01 grep tomcat
根据您的 CATALINA_BASE 我怀疑您是从 src 下载并试图 运行 而不是实际构建
确保您下载的是 Core distribution 而不是 src(除非您想自己构建)
然后尝试 运行 对其进行 grep 查找 tomcat 应该会显示