Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat Manager Authentication fails

 
John Eipe
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I give credentials for logging into Tomcat Manager it fails.

I have included the necessary entry in tomcat-users.xml
<role rolename="manager"/>
<user username="tomcat" password="eipe" roles="manager"/>

I reinstalled the service and then started it. But still it doesn't work.

Do i need to prefix my username with anything while logging in?
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does "fail" means? Any error messages? Look at http://faq.javaranch.com/java/TellTheDetails
 
John Eipe
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't log in. Login screen just stays there.
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bounce tomcat server and try again.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Double-check that tomcat didn't write over your tomcat-users.xml file.

Bill
 
John Eipe
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried restarting. Also the file is not modified by tomcat.
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you access tomcat manager app?
 
John Eipe
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Throught tomcat home page. (localhost:8080)
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get to the Manager page with a url like:
http://..mysite../manager/html/list
Tomcat forces an authentication dialog and then I am in.

Am I correct in assuming you also use the "manager/html/list" style and get to the authentication dialog?

Bill
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Eipe wrote:Throught tomcat home page. (localhost:8080)


Could you tell the exact URL?
 
Magdi Grown
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the same problem and this is the scenario:

downloaded Tomcat and the

http://localhost:8080/

page is the Apache Tomcat ..."you've setup Tomcat successfully.." page.

Either following the link 'Tomcat Manager' from this page or typing

http://localhost:8080/manager/html

in the browser's address bar results in the Authentication Required window popping up - predictably

I have added these lines to TOMCATHOME/conf/tomcat-users.xml:

<role rolename="manager"/>
<user username="bobcat" password="socrates" roles="manager"/>

and have restarted tomcat again to no avail. The authentication window keeps popping back without any error messages.

I also verified and no, tomcat did NOT overwrite the tomcat-users.xml file.

Are there error logs? I couldn't find any.

Any help would be appreciated,

Magdi
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[Magdi Grown]I have the same problem and this is the scenario: downloaded Tomcat

Check the integrity of the downloaded files, look at http://tomcat.apache.org/download-55.cgi
 
Magdi Grown
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hm, shame on me, but I realized soon after I posted my question the source of the error and as much as I don't like to admit it may help others.

The two lines that I added were in a commented out block!!!

Thanks Misha, anyway

Magdi
 
John Eipe
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wow, thats is a revelation. I'm new to xml and i made the same mistake. My apologies to all.

Thanks Magdi for sharing it.
 
Misha Ver
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Next time http://faq.javaranch.com/java/PostRealCode
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic