当前位置: 首页 > 知识库问答 >
问题:

为什么会出现部署错误?

陆海阳
2023-03-14

当我试图从netbean部署我的web应用程序时,我得到以下错误:

Starting Tomcat process...
Waiting for Tomcat...
Tomcat server started.
W:\UnderTest\NetbeansCurrent\WebApplication1\nbproject\build-impl.xml:1033: 
Deployment error: Access to Tomcat server has not been authorized.
Set the correct username and password with the "manager-script" role in the 
Tomcat customizer in the Server Manager.
See the server log for details.
BUILD FAILED (total time: 14 seconds)

那是什么?为什么我会犯这个错误?

以下是来自tomcat-users.xml的代码片段:

    <tomcat-users>
<!--
  NOTE:  By default, no user is included in the "manager-gui" role required
  to operate the "/manager/html" web application.  If you wish to use this app,
  you must define such a user - the username and password are arbitrary.
-->
<!--
  NOTE:  The sample user and role entries below are wrapped in a comment
  and thus are ignored when reading this file. Do not forget to remove
  <!.. ..> that surrounds them.
-->

  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <role rolename="manager-gui"/>
  <user username="suhail" password="suhail" roles="manager-gui"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>

</tomcat-users>

以下是netbeans服务器设置中的快照:

共有1个答案

衡修洁
2023-03-14

您必须添加Manager-脚本才能执行部署操作。

所以在xml中,应该有如下内容

<user username="suhail" password="suhail" roles="manager-gui,manager-script"/>
 类似资料:
  • 我正在尝试使用Minikube、Docker注册表和演示节点项目创建本地库伯内特斯部署。 我做的第一件事是安装Docker v1.12.3,然后是Minikube v0.12.2。 然后,我通过运行这个命令创建了一个Docker注册表容器(通过本教程,只运行下面的第一个命令) 接下来,我运行这个minikube命令来创建本地kubernetes集群: 我的项目结构如下所示: 我的Dockerfil

  • 错误:第 1 行的解析错误:函数搜索(sour ^ 期望“字符串”、“数字”、“空”、“真”、“假”、“{”、“[”,得到“未定义” 代码:

  • 问题内容: 我正在尝试使用Minikube,Docker Registry和演示节点项目创建本地Kubernetes部署。 我做的第一件事是安装Docker v1.12.3,然后是Minikube v0.12.2。 然后我通过运行此命令创建了一个Docker Registry容器(通过本教程,仅运行下面的第一个命令) 接下来,我运行此minikube命令以创建本地kubernetes集群: 我的项

  • 我实现了以下REST调用: 也是一个提供和使用application/x-protobuf的提供者类: 我的pom。xml看起来像: 我的小部件。原型: 选项java_package=“example”;选项java\u outer\u classname=“WidgetsProtoc”; 对于http://localhost:8080/RESTfulExample/widgets我得到以下错误消

  • 问题内容: 我已经阅读了 为什么在尝试在数据库中加载Blob时会出现java.lang.AbstractMethodError?,下载了我能找到的所有11g jdbc驱动程序,并将它们作为库和/或jar文件添加到了我的NetBeans应用程序中。我仍然不断收到相同的AbstractMethodError,这让我很生气!任何指导将不胜感激! 错误信息: 问题答案: 问题的原因是软件不兼容(jar文件

  • 我目前正在使用Angular的第三方库(如Angular CLI/Angular Universal)开发Angular,下面的链接是https://github.com/Angular/Angulal-cli/wiki/stories-Universal-rendering/和firebase hosting/以及实时数据库。它在我的本地机器上工作得很好,localhost:4000。我看到它呈