PDA

View Full Version : [ubuntu] Problem accessing Tomcat 6 manager and host-manager webapp



swfchang
March 28th, 2009, 01:42 AM
I´ve just installed my Ubuntu 8.10 server with LAMP server and Tomcat. I was able to see the page http://localhost:8080 and when I tried to access http://localhost:8080/manager/html, it asked me for username and password which I have no clue what they were.

After searching on the forum, I followed the instructions to change /etc/tomcat6/tomcat-users.xml to add the roles and user as follows (I did not change the commented lines in original file:

<tomcat-users>
<!--
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
-->
<role rolename=¨tomcat¨/>
<role rolename=¨manager"/>
<role rolename=¨admin¨/>
<user username=¨tomcat¨ password=mypassword roles=¨tomcat,admin,manager¨/>
</tomcat-users>

I restarted tomcat using command sudo service tomcat6 restart

But when I tried to access http://localhost:8080/manager/html again, it timed out. After I commented out the lines I´ve added for the roles and users in the tomcat-users.xml file, I can access http://localhost:8080/manager/html again but it asked me for username and password again.

Not sure what else I needed to do to get it working. Appreciate if anyone out there could help.

Thanks a lot!

raulsan
April 25th, 2009, 11:30 AM
I have exactly the same problem,
can anyone help?
thank you

ghetto2ivy
May 30th, 2009, 07:12 PM
Sounds like an error in your xml. See this thread. Try the default one posted and see if it works for you.

http://ubuntuforums.org/showthread.php?t=972911&highlight=tomcat6

HDave
January 25th, 2010, 09:00 PM
I went around in circles with this to for a couple of hours and then realized, like the OP, I didn't delete the stupid XML comments that surround the sample roles and users!

jim.pishlo
February 9th, 2010, 06:47 PM
DOH!
I feel like such a noob!
The xml comments!

cjchand
March 3rd, 2010, 08:16 PM
Sweet mother of God. Total face-palm there :)

Many thanks, HDave!

armonr
May 13th, 2010, 01:55 AM
Wow, I didn't even notice the comment lines, thanks :)

belano
June 26th, 2010, 05:13 PM
Me neither, thanks for sharing

Wnutt
October 14th, 2010, 07:13 PM
Kind of a stupid pitfall :oops:

Thanks guys...

bluehue
November 11th, 2010, 10:40 PM
I went around in circles with this to for a couple of hours and then realized, like the OP, I didn't delete the stupid XML comments that surround the sample roles and users!
Unbelievable!! You wouldn't believe the things I had tried in 4 hours time to get it running. Thanks Dave! :guitar: