tomcat提示警告: An attempt was made to authenticate the locked user"tomcat"

启动tomcat7之后,运行正常,但是运行一段时间就会提示以下警告:

十二月 04, 2013 5:10:15 下午 org.apache.catalina.realm.LockOutRealm authenticate
WARNING: An attempt was made to authenticate the locked user "tomcat"

虽然不影响程序的运行,但是后台控制台一直提示,所以上网搜索找出现这个现象的原因。

处理这个问题最有效的办法是把tomcat的webappsx下,自带的文件夹全删除之后,问题解决。

也可以按一下方法解决: 
原因: 
   由于tomcat-users.xml配置有误导致的。 
   注:只是部分内容:

 <role rolename="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"/>
-->
  <role rolename="manager-gui"/>
  <role rolename="manager-script"/>
  <role rolename="manager-jmx"/>
  <role rolename="manager-status"/>
 <user username="zhuo" password="zhuo" roles="manager-gui,manager-script,manager-jmx,manager-status"/>

我把空行前半部分给注释掉了。

 <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"/>

解决办法如下: 
  把空行注释掉的配置放开后,如上的警告消失。

原因介绍

你的应用加了身份认证,有人(或者你自己,呵呵)试图用manager用户登陆你的应用,密码输入错误5次或者5次以上(缺省是5次),就会在日志中记录警告信息,并锁定并禁止该用户的进一步登陆。以提醒你可能有人恶意猜测你的管理员密码。是tomcat为了阻止brute-force攻击(基于密码加密的暴力破解法)的安全策略。 

配图

登陆用户名和密码在conf/tomcat-users.xml中配置

server.xml中的配置如下:

<!-- Use the LockOutRealm to prevent attempts to guess user passwords
           via a brute-force attack -->
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <!-- This Realm uses the UserDatabase configured in the global JNDI
             resources under the key "UserDatabase".  Any edits
             that are performed against this UserDatabase are immediately
             available for use by the Realm.  -->
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>

<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>
时间: 2024-10-17 15:43:19

tomcat提示警告: An attempt was made to authenticate the locked user"tomcat"的相关文章

tomcat报警告 An attempt was made to authenticate the locked user

有好多这样的警报怪怪的,一分钟抛一次,大概抛了10分钟,停止 有 Anattempt was made to authenticate the locked user "root"Anattempt was made to authenticate the locked user "root" 有 An attempt was made to authenticate the lockeduser "theshadow007" 真的就是007!!

nginx反向代理tomcat提示13 permission denied while connecting to upstream

nginx反向代理tomcat提示13 permission denied while connecting to upstream,网上很多都是说13 permission denied while reading to upstream,这是两个完全不同的错误,我遇到的如下截图: 查看selinux日志发现错误: 后来发现是selinux的问题,于是先关掉selinux:setenforce 0:然后再访问果然好使. 于是启用selinux,再执行下面的命令,修改selinux的值: set

Xcode8.0 在编辑代码时提示警告 Implicit conversion loses integer precision: &#39;NSInteger&#39; (aka &#39;long&#39;) to

Implicit conversion loses integer precision: 'NSInteger' (aka 'long') to -Wno-shorten-64-to-32 Xcode8.0 在编辑代码时提示警告 Implicit conversion loses integer precision: 'NSInteger' (aka 'long') to

office 2013 execl 使用复制,粘贴提示警告

DDC 策略开启剪切版粘贴,当关闭此策略时,以下提示警告消失,用户可正常使用.......

windows下Eclipse启动tomcat提示端口已被占用 already in use

>netstat -ano | findstr 8009 TCP    127.0.0.1:8005         0.0.0.0:0              LISTENING       2188 E:\eclipse_workspace\normandy>taskkill /PID 2188 错误: 无法终止 PID 为 2188 的进程. 原因: 只能强行终止这个进程(带 /F 选项). E:\eclipse_workspace\normandy>taskkill /F /P

Tomcat提示Null component

Tomcat提示“严重: Null component Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/,J2EEApplication=none,J2EEServer=none”错误, 然后无法启动, 这是因为 Tomcat 使用的 jre 版本比应用程序编译的 jre 版本低造成的. 需要把 Tomcat 使用的 jre 版本升级到和应用程序编译的 jre 版本一样或更高.

tomcat日志警告WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property &#39;debug&#39; to &#39;0&#39; did not find a matching property.

日志中有警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property. 跟踪后发现是连接池的配置问题: <Context path="/n" docBase="E:/xxx/war" debug="0" reloadable="true"

centos7中启动tomcat提示bash: tomcat8.0.39/bin/startup.sh: 权限不够

问题描述: centos7中启动tomcat提示bash: tomcat8.0.39/bin/startup.sh: 权限不够 解决方案:先进入bin目录 [[email protected]/]# cd /soft/apache-tomcat-8.0.39/bin 然后执行以下命令:[[email protected] bin]# chmod u+x *.sh 最后再在bin命令行重启应用服务:[[email protected] bin]# ./startup.sh—————————————

windows 启动tomcat 提示Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

运行tomcat 提示如下: Neither the JAVA_HOME nor the JRE_HOME environment variable is definedAt least one of these environment variable is needed to run this program 解决方法: 找到tomcat 安装目录bin下的setclasspath.bat文件,打开后,新加如下配置: set JAVA_HOME=C:\Program Files\Java\j