**I'm able to reach tomcat in the browser. I've done all the prep to be able to access the GUI apps, but I am still told I am not authorized.

Below is a screenshot of my tomcat-users.xml file or I have it in code blocks below. I'm using Tomcat 8.5.14 for Ubuntu 16.04 Linux.

/opt/tomcat/conf/tomcat-users.xml (picture of) OR

<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="tomcat-admin" password="Newvegas3" roles="manager-gui,admin-gui"/>

I've also suitably allowed connections to manager and host manager apps via this method from someone's post on a similar question.

In /opt/tomcat/conf/Catalina/localhost/manager.xml:

<Context privileged="true" antiResourceLocking="false" docBase="/opt/tomcat/webapps/manager">
    <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />

In /opt/tomcat/conf/Catalina/localhost/host-manager.xml:

<Context privileged="true" antiResourceLocking="false" docBase="/opt/tomcat/webapps/host-manager">
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />

Now on the tomcat portal in browser I get prompted for password when trying to access the manager app or the host manager app but inputing the information from tomcat-users.xml and hitting "OK" just loops me to putting in my information without doing anything. When I escape the password prompt, I just get sent to an "error 401 unathorized page" for both manager app and host-manager app. What gives? I cannot figure out what I'm doing wrong even after hours of testing.

  • Instead of posting screenshots, please replace them with copy/pasted text in proper code blocks. – EEAA Apr 25 '17 at 3:06
  • @EEAA went back and added code blocks – nwd12a Apr 25 '17 at 5:20
  • have you checked /opt/tomcat/logs/catalina.out ? This behavior occurs also, if your user is locked because of too many wrong attempts. Something likeWARNING: An attempt was made to authenticate the locked user "tomcat" would be logged. Restart tomcat if it is locked. – chloesoe Apr 25 '17 at 21:10
  • @chloesoe I ran a grep for WARNING in the catalina log and found a single entry specifying a lockout for user "" which is weird. Just a blank user. Other than that there were complaints about the docBase path from the manager and hostmanger .xml files – nwd12a Apr 25 '17 at 21:43
  • Could you try to log in at tomcat manager and after that do a tail -n 25 /opt/tomcat/logs/catalina.out to show the last 25 lines of catalina.out? Usually in that log file a lot of good messages are logged. – chloesoe Apr 26 '17 at 5:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.