【问题标题】:Can't access Manager-app in Tomcat 8无法在 Tomcat 8 中访问 Manager-app
【发布时间】:2014-12-21 16:04:56
【问题描述】:

我在这里阅读了许多类似的问题,但无论我做什么,我都无法登录管理器应用程序。我做了什么。

1.我通过添加编辑tomcat-users.xml

  <role rolename="manager-gui"/>
  <role rolename="manager-script"/>
  <role rolename="manager-jmx"/>
  <role rolename="manager-status"/>
  <role rolename="admin-gui"/>
  <role rolename="admin-script"/>
  <user username="admin" password="admin" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/>
  1. 我使用 Netbeans 启动了 Tomcat (V.8)
  2. 我转到 localhost:8084(netbeans 将端口设置为 8084),然后单击“管理器应用程序”。
  3. 在提示的窗口中,我输入了 admin 和 admin 并没有登录。

在 Netbeans 的服务器属性中,有不同的凭据。我对它们都设置了相同的内容(在 tomcat-users.xml 和 Netbeans 中),但仍然没有任何反应。
每次进行更改时,我总是重新启动 Tomcat(没有错误发生)。

编辑
当我尝试运行我的应用程序(默认应用程序,当您在 Netbeans 中创建项目时)时,我也无法登录,所以这个消息出现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.
但是我在 tomcat-users.xml 中添加了上述内容...

【问题讨论】:

    标签: tomcat tomcat8 manager-app


    【解决方案1】:

    确保您正在编辑正确的文件。 NetBeans 将创建它自己的配置文件副本,因此您可能有两个或多个 tomcat-users.xml 文件。在我的 Windows 机器上,NB 启动的 Tomcat 使用 C:\Users\DevServer\AppData\Roaming\NetBeans\8.0\apache-tomcat-8.0.3.0_base\conf

    另外,尝试简化并创建一个仅具有 manager-script 角色的用户。然后在 Services/Servers/Connection 凭据中告诉 NB 该用户和密码。示例:

    【讨论】:

    • 它一直在我面前!!!!!!!!!在 Tomcat 服务器的属性中写入 C:\Users\~~~\AppData\Roaming\NetBeans\8.0.2\apache-tomcat-8.0.15.0_base 。我编辑了错误的文件。谢谢!
    猜你喜欢
    • 1970-01-01
    • 2017-12-14
    • 2017-03-28
    • 2016-08-10
    • 2012-02-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多