Java tomcat启动失败

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23081395/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 20:32:47  来源:igfitidea点击:

Start of tomcat failed

javamacostomcatnetbeansnetbeans-7

提问by Code Hunter

I am facing issue to start my tomcat server in netbeans. I am getting error when I click on start button

我在 netbeans 中启动我的 tomcat 服务器时遇到问题。单击开始按钮时出现错误

"Starting of tomact failed, check whether  the /Application/NetBeans/apache-tomcat-7.0.52/bin/catalina/sh and related scripts are executable." 

For more details please check screenshot enter image description here

更多详情请查看截图 在此处输入图片说明

采纳答案by David Brossard

You should run from the command line / shell if you can though I realize you want to run from Netbeans in this case.

如果可以,您应该从命令行/shell 运行,尽管我意识到在这种情况下您想从 Netbeans 运行。

Also make sure that all your .shscripts are executable (do a chmod) because otherwise they cannot be called.

还要确保您的所有.sh脚本都是可执行的(执行 a chmod),否则无法调用它们。

Lastly, make sure you have the right permissions to run the scripts.

最后,确保您具有运行脚本的正确权限。

Once you are beyond these checks, you'll possibly get other error messages e.g. your JAVA_HOMEor your CATALINA_HOMEare not set. These will be easy to fix.

一旦超出这些检查范围,您可能会收到其他错误消息,例如您的JAVA_HOME或您CATALINA_HOME的未设置。这些将很容易修复。

EDIT

编辑

To run Tomcat from the terminal,

要从终端运行 Tomcat,

  • go to your Tomcat folder (either TOMCAT_HOMEor TOMCAT_HOME/bin).
  • Make sure all .shscripts are executable (chmod a+x *.sh)
  • run startup.sh: ./startup.shor bin/startup.sh(depending on whether you are inside TOMCAT_HOMEor inside TOMCAT_HOME/bin)
  • 转到您的 Tomcat 文件夹(TOMCAT_HOMETOMCAT_HOME/bin)。
  • 确保所有.sh脚本都是可执行的 ( chmod a+x *.sh)
  • startup.sh:。/startup.shbin/startup.sh(取决于你是在里面TOMCAT_HOME还是在里面TOMCAT_HOME/bin

回答by Sandy

You can make catalina.shrunnable by executing following command in terminal

您可以catalina.sh通过在终端中执行以下命令来使可运行

chmod 755 <your tomcat location>/bin/catalina.sh