我无法登录Tomcat Manager App [英] I'm not able to log in Tomcat Manager App
问题描述
我已经在stackoverflow中阅读了很多主题来解决我的问题,但没有一个是有用的。
I have read a lot of topics in stackoverflow for solve my problem, but none was useful.
当我尝试登录Manager App时([http:/ / localhost:8080 / manager / html] [1])使用了很多不同的配置,但在尝试使用权限凭据登录后,我总是获得 401 Unauthorized 。
我重启了tomcat服务器几次。
When I tried to log in Manager App ([http://localhost:8080/manager/html][1]) using a lot of different configurations, but I always obtained 401 Unauthorized after attempted to log in using the rights credentials. I restarted the tomcat server a couple of times.
这是我在conf / tomcat-users.xml中的最后一次配置
This is my last configuration in conf/tomcat-users.xml
<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users>
<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"/>
</tomcat-users>
这是与server.xml中的tomcat-users相关的部分
This is the part related to tomcat-users in server.xml
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
这是我的配置:
Apache Tomcat:版本7.0.40 64位
在Chrome 26上测试
This is my configuration: Apache Tomcat: Version 7.0.40 64 bit Tested on Chrome 26
如果我忘了其他有用的东西,请告诉我。
提前致谢
If there is something else useful that I forgot, let me know. Thanks in advance
推荐答案
从拖尾 [tomcat-root] /logs/catalina.out ,我发现您使用的是锁定用户名admin
From tailing [tomcat-root]/logs/catalina.out, I observed that you are using a locked username "admin"
06-May-2014 16:47:41.828 WARNING [http-nio-192.168.0.51-8080-exec-6] org.apache.catalina.realm.LockOutRealm.authenticate An attempt was made to authenticate the locked user "admin"
你应该尝试使用更好的(不可猜测的)用户名。
You should try with a better(non guessable) username.
<role rolename="manager-gui"/>
<user username="TomcatAdmin" password="secpa55wd" roles="manager-gui"/>
这绝对适合你。
这篇关于我无法登录Tomcat Manager App的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!