java Tomcat 服务器无法启动

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17016395/
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-11-01 00:43:29  来源:igfitidea点击:

Tomcat server could not start

javajakarta-eetomcatjboss

提问by user1712095

I am developing a dynamic web application on JBoss developer, but I am getting an error message:

我正在 JBoss 开发人员上开发动态 Web 应用程序,但收到一条错误消息:

Could not load the Tomcat server configuration at \Servers\Tomcat v6.0 Server at localhost-config. The Servers project is closed.

无法在 localhost-config 的 \Servers\Tomcat v6.0 Server 中加载 Tomcat 服务器配置。服务器项目已关闭。

Even when I try to start the server on the servers tab, it doesn't start. Any suggestions?

即使我尝试在服务器选项卡上启动服务器,它也不会启动。有什么建议?

回答by Marcel St?r

Sounds to me as if you're doing this inside Eclipse with WTP?

听起来好像您是在带有 WTP 的 Eclipse 中执行此操作?

If so then you need to make sure that the Eclipse project called Serverswhich is created and maintained by WTP is open.

如果是这样,那么您需要确保Servers由 WTP 创建和维护的 Eclipse 项目是打开的。

  • Open the Navigatorview
  • Locate the Serversproject
  • right-mouse click
  • Open Project
  • 打开Navigator视图
  • 找到Servers项目
  • 鼠标右键单击
  • 开放项目

回答by Ashvin Ranpariya

You installed Tomcat v6 within eclipse using the “Add server” wizard and the “download and install” button.

您使用“添加服务器”向导和“下载并安装”按钮在 eclipse 中安装了 Tomcat v6。

You tried to start Tomcat and got the following error:

您尝试启动 Tomcat 并收到以下错误:

****“Could not load the Tomcat server configuration at /Servers/Tomcat v6.0 Server at localhost-config. The configuration may be corrupt or incomplete”****

****“无法在 /Servers/Tomcat v6.0 Server at localhost-config 加载 Tomcat 服务器配置。配置可能已损坏或不完整”****

How to solve:

怎么解决:

1) . Close Eclipse

1)。关闭日食

2) . Copy all files from TOMCAT_6_HOME/conf to WORKSPACE_FOLDER/Servers/Tomcat v6.0 Server at localhost-config

2)。将 TOMCAT_6_HOME/conf 中的所有文件复制到 localhost-config 处的 WORKSPACE_FOLDER/Servers/Tomcat v6.0 Server

3) . Start Eclipse

3)。启动日食

4) . Expand the Servers project, click on the Tomcat 6 project and hit F5

4)。展开 Servers 项目,单击 Tomcat 6 项目并按 F5

5) . Start Tomcat from Eclipse

5)。从 Eclipse 启动 Tomcat

6) . Enjoy!!!

6)。享受!!!

回答by Premakumar T

You have been closed server project in eclipse which will come by default after adding tomcat into eclipse. So try to open server project and start Tomcat it will Work..

您已经在 eclipse 中关闭了服务器项目,默认情况下将在将 tomcat 添加到 eclipse 后出现。所以尝试打开服务器项目并启动Tomcat它会工作..

Steps:

脚步:

  1. Go to project explorer.
  2. Double click on server project.
  1. 转到项目资源管理器。
  2. 双击服务器项目。

回答by Prashant Srivastav

Just after many trying I got the solution for this problem. The problem is when your server is created using your IDE(Eclipse, JBoss or any) that time the server is not getting the configuration file. To resolve this problem you need to copy all the configuration files from the tomcat confdirectory to your IDE server directory. If I will step out the solution than I can list the steps as-

经过多次尝试,我得到了这个问题的解决方案。问题是当您使用 IDE(Eclipse、JBoss 或任何)创建服务器时,服务器没有获取配置文件。要解决此问题,您需要将所有配置文件从 tomcatconf目录复制到您的 IDE 服务器目录。如果我将解决方案比我可以列出的步骤为 -

  • Locate your Tomcat installation directory
  • Find the conf directory, sometime you will get it into skel directory
  • Copy all the files from conf and now change the directory to your IDE workspace
  • In Server directory paste all the files in your Tomcat configuration directory.
  • 找到你的Tomcat安装目录
  • 找到conf目录,有时间会进入skel目录
  • 复制 conf 中的所有文件,现在将目录更改为您的 IDE 工作区
  • 在 Server 目录中,粘贴 Tomcat 配置目录中的所有文件。

回答by Alex

If you are using a Linux-based Eclipse:

如果您使用的是基于 Linux 的 Eclipse:

Check user and group ownership and permissions to your server directory and subdirectories inside Eclipse. It MUST allow read-write config files by the current Eclipse user. Test it copying config files directly to it and, after that, accessing it through Eclipse text/xml editor.

检查用户和组的所有权以及对 Eclipse 中服务器目录和子目录的权限。它必须允许当前 Eclipse 用户读写配置文件。测试它,将配置文件直接复制到它,然后通过 Eclipse 文本/xml 编辑器访问它。

It's usefull too to check the same for tomcat directory, because Eclipse may be bloked if its owner doesn't have permissions to access that files.

检查 tomcat 目录的相同内容也很有用,因为如果其所有者没有访问该文件的权限,Eclipse 可能会被阻塞。

回答by Ahmed

the solution to this problem is :

这个问题的解决方案是:

cd /usr/local/tomcat//conf

cd /usr/local/tomcat//conf

chmod 777 *

第 777 章

and it's done

它完成了

回答by KoalaDev

I got the same issue. This is because it's missing "Servers" folder that contains Tomcat in Project Explorer. I already downloaded and configured my Tomcat, but after I created another new java web project, Server stopped working.

我遇到了同样的问题。这是因为在 Project Explorer 中缺少包含 Tomcat 的“Servers”文件夹。我已经下载并配置了我的 Tomcat,但是在我创建了另一个新的 java web 项目后,服务器停止工作。

  • To solve this problem right click on "Tomcat v6.0 Server at localhost [Strated,Synchronized]"
  • at bottom of your Eclipse.
  • click "General"
  • click "Switch Location"
  • click "Apply"
  • 要解决此问题,请右键单击“Tomcat v6.0 Server at localhost [Strated,Synchronized]”
  • 在 Eclipse 的底部。
  • 点击“通用”
  • 点击“切换位置”
  • 点击“应用”

enter image description here

在此处输入图片说明