aspose file tools*
The moose likes Tomcat and the fly likes Tomcat Manager Authentication fails Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat Manager Authentication fails" Watch "Tomcat Manager Authentication fails" New topic
Author

Tomcat Manager Authentication fails

John Eipe
Ranch Hand

Joined: May 23, 2008
Posts: 215
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?


www.cs-repository.info
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
What does "fail" means? Any error messages? Look at http://faq.javaranch.com/java/TellTheDetails
John Eipe
Ranch Hand

Joined: May 23, 2008
Posts: 215
It doesn't log in. Login screen just stays there.
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Bounce tomcat server and try again.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
Double-check that tomcat didn't write over your tomcat-users.xml file.

Bill
John Eipe
Ranch Hand

Joined: May 23, 2008
Posts: 215
I tried restarting. Also the file is not modified by tomcat.
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
How do you access tomcat manager app?
John Eipe
Ranch Hand

Joined: May 23, 2008
Posts: 215
Throught tomcat home page. (localhost:8080)
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
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

Joined: Mar 03, 2008
Posts: 470
John Eipe wrote:Throught tomcat home page. (localhost:8080)


Could you tell the exact URL?
Magdi Grown
Greenhorn

Joined: Feb 22, 2010
Posts: 2
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

Joined: Mar 03, 2008
Posts: 470
[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

Joined: Feb 22, 2010
Posts: 2
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

Joined: May 23, 2008
Posts: 215
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

Joined: Mar 03, 2008
Posts: 470
Next time http://faq.javaranch.com/java/PostRealCode
 
 
subject: Tomcat Manager Authentication fails