简体   繁体   English

更新后无法登录tomcat管理器

[英]Can't login in tomcat manager after update

After a system update, I can no longer log in in tomcat. 系统更新后,我无法再登录tomcat。 It was working before the update, but it's not working any longer. 它在更新之前可以正常工作,但是不再有效。 Not entirely sure what happened. 不完全确定发生了什么。

OS: Arch linux 操作系统:Arch Linux

Java version: openjdk 1.8.0_25 Java版本:openjdk 1.8.0_25

Current Tomcat version: 8.0.15 当前Tomcat版本:8.0.15

tomcat-users.xml: 的tomcat-users.xml中:

<?xml version='1.0' encoding='utf-8'?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<tomcat-users xmlns="http://tomcat.apache.org/xml"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
              version="1.0">
<!--
  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="admin-gui"/>
  <role rolename="admin-script"/>
  <role rolename="manager-gui"/>
  <role rolename="manager-script"/>
  <role rolename="manager-jmx"/>
  <role rolename="manager-status"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="manager" password="manager" roles="manager-gui,manager-script,manager-jmx,manager-status"/>
  <user username="admin" password="admin" roles="admin-gui"/>
</tomcat-users>

manager/manager still gives me unauthorized. 经理/经理仍然让我未经授权。 Any ideas why? 有什么想法吗?

Also, is there a way to see a list of all the users loaded by the tomcat instance? 另外,有没有办法查看tomcat实例加载的所有用户的列表?

There are a lot of possible causes for this: 造成这种情况的原因很多:

  • Have you restarted tomcat after editing the file? 您编辑文件后重新启动了tomcat吗?
  • Are you sure that the tomcat user has sufficient permissions for the config file 您确定tomcat用户对配置文件具有足够的权限
  • Try adding the admin-gui role for the manager user 尝试为管理员用户添加admin-gui角色

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM