I'm not able to log in Tomcat Manager App

后端 未结 8 1941
温柔的废话
温柔的废话 2021-02-13 14:57

I have read a lot of topics in stackoverflow for solve my problem, but none was useful.

When I tried to log in Manager App ([http://localhost:8080/manager/html][1]) usin

相关标签:
8条回答
  • 2021-02-13 15:34

    In my case the password had special characters, that needed to be XML encoded before being added to the /opt/tomcat/conf/tomcat-users.xml file.

    The tool that I used for the encoding was https://coderstoolbox.net/string/#!encoding=xml&action=encode&charset=us_ascii

    0 讨论(0)
  • 2021-02-13 15:39

    Also verify that the tomcat-users.xml you are editing actually corresponds with the instance of Tomcat you are running. If you have multiple installations, but only one running, make sure you are editing the file at the correct location.

    When you run startup.bat (or startup.sh), the script will output the CATALINA_* environmental variables. If the paths do match the current working directory you are running from, it is a good bet that you have been editing the wrong tomcat-users.xml file.

    0 讨论(0)
  • 2021-02-13 15:43

    Configuration looks fine for me . can you please try with below tomacat-users.xml.

    <tomcat-users>
      <user name="admin" password="admin" roles="admin-gui,manager-gui" />
    </tomcat-users>
    

    Please restart the server after change.

    0 讨论(0)
  • 2021-02-13 15:43

    Check syntax and start-ending tag. i did stupid mistake when i started work on java. This line was working for me.

    <?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"/>
          <role rolename="manager-gui"/>
    <user username="admin" password="admin" roles="manager-gui"/>
    </tomcat-users>
    
    0 讨论(0)
  • 2021-02-13 15:45

    If you try any of the other Answers and then there is no difference, you may need to clean your Tomcat and then try again. These are my clean commands (not sure how general they are):

    rm -R $TOMCAT_HOME/work/Catalina/<host>/*
    rm -rf $TOMCAT_HOME/webapps/<app name>
    
    0 讨论(0)
  • 2021-02-13 15:52

    Solutions above probably solved your problem.The locked user solution tipped me off on my issue.

    Something weird I noticed... Don't know how it happened.

    After installing a new tomcat7 I ended up with a "tomcat-users.xml" file owned by user root and group root.

    I found out because catalina.out contains a few lines like "javax.naming.NamingException: /var/lib/tomcat7/conf/tomcat-users.xml (Permission denied)"

    After changing file ownership to user "root" & group "tomcat7" fixed my login issue.

    0 讨论(0)
提交回复
热议问题