Tomcat Tip warning: An attempt is made to authenticate the locked user "tomcat"

Source: Internet
Author: User

After you start TOMCAT7, it works fine, but running for a while will prompt the following warning:

December 04, 2013 5:10:15 pm Org.apache.catalina.realm.LockOutRealm authenticatewarning:an attempt is made to authenticate th E locked user "tomcat"

Although it does not affect the operation of the program, but the background console has been prompted, so internet search to find the cause of this phenomenon.

The most effective way to deal with this problem is to put Tomcat under the WEBAPPSX, the folder is completely deleted after the problem solved.

can also be resolved by the following method:
Reason:
caused by incorrect configuration of the tomcat-users.xml.
Note: Only part of the content:

 <rolerolename= "Tomcat"/> <!--<role rolename= "Role1"/> <user username= "Tomcat" password= "Tomcat" roles= "tomcat"/> <user username = "Both" password= "Tomcat" roles= "Tomcat,role1"/> <user username= "Role1" password= "Tomcat" roles= "Role1"/>  -  <rolerolename= "Manager-gui"/>  <rolerolename= "Manager-script"/>  <rolerolename= "MANAGER-JMX"/>  <rolerolename= "Manager-status"/> <Userusername= "Zhuo"Password= "Zhuo"Roles= "Manager-gui,manager-script,manager-jmx,manager-status"/>

I commented out the first half of the empty line.

 <rolerolename= "Role1"/>  <Userusername= "Tomcat"Password= "Tomcat"Roles= "Tomcat"/>  <Userusername= "both"Password= "Tomcat"Roles= "Tomcat,role1"/>  <Userusername= "Role1"Password= "Tomcat"Roles= "Role1"/>

The solution is as follows:
After the empty line commented out the configuration is released, the warning as above disappears.

Reason Introduction

Image matching

Login username and password are configured in Conf/tomcat-users.xml

The configuration in Server.xml is as follows:

<!--Use the Lockoutrealm to prevent attempts to guess user passwords via a brute-force attack -      <RealmClassName= "Org.apache.catalina.realm.LockOutRealm">        <!--This Realm uses the userdatabase configured in the global JNDI resources under the key "Userdatabase". Any edits that is performed against this userdatabase is immediately available for use by the Re  Alm.  -        <RealmClassName= "Org.apache.catalina.realm.UserDatabaseRealm"resourcename= "Userdatabase"/>      </Realm><globalnamingresources>    <!--Editable User database that can also is used by Userdatabaserealm to authenticate users -    <Resourcename= "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>

Tomcat Tip warning: An attempt is made to authenticate the locked user "tomcat"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.