• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Cannot log into management pages

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sure this comes up too often, and I've found other threads but the solutions given have not helped me.

I've installed Tomcat 7 on OSX Mountain Lion according to the instructions at:
http://www.joel.lopes-da-silva.com/2008/05/13/installing-tomcat-on-mac-os-x/

I'm using the following tomcat-users.xml:The login prompt is repeated over-and-over, until canceled and a 401 Unauthorized is returned.

Thank you for your assistance,
-Scott Jackson
 
Saloon Keeper
Posts: 26020
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Scott!

Usually people worry about the tomcat-users.xml file (which appears to be OK for you), but neglect to switch on the Realm that uses it.

Tomcat (like most J2EE servers) supports a "plug-in" security system. The tomcat-users.xml file is used by the MemoryRealm and UserDataBaseRealm plugins, so you have to activate one of them. In the Tomcat6 supplied server.xml, that Realm is already coded in, but it's commented out.
 
Scott Jackson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim. It's been a warm welcome from all.

I looked at the server.xml, and it appears the UserDatabaseRealm was already enabled.My XML editor says that block is not commented out, so this doesn't appear to be the problem?

Thank you!
-Scott
 
Scott Jackson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure if it is related, but the security listener IS commented out:
 
Scott Jackson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK I have it working, but I'm not sure what I did that did it.

First, I attempted to see if it was a permissions issue. Since my instructions configured tomcat to run under a specific account, I gave that account (and group) blanket ownership of the files in the install directory (and below).This did not solve the problem. A coworker suggested replacing my tomcat-users.xml with the one in the distribution archive, which I did. I then added the manager-gui role to the tomcat user as follows:And at this point I can login as the user "tomcat". With it operational now, I'm a little timid about tearing it all back down and trying to reproduce my success. Hopefully this will help someone in the future, though.
 
Tomorrow is the first day of the new metric calendar. Comfort me tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic