Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unauthorized Access (Tomcat)

 
Edmund Yong
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My tomcat-users.xml file looks like this:



When I entered http://localhost:8080/manager, it prompted me for a userid/password. I entered "admin" for userid and "password", but I got a "401 Unauthorized" error.

What's wrong?

Thanks.
 
Scott Dunbar
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you restart Tomcat? It doesn't pick up changes to that file from what I've seen.
 
Edmund Yong
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I did restart Tomcat but it was still the same. In any case I didn't even change tomcat-users.xml. It is still the same file since I installed Tomcat months ago.
 
Edmund Yong
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also get a dialog box asking me for userid/password whenever I tried to access any web application deployed under webapps.
 
Edmund Yong
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know what's the problem now. There is some application using port 8080. Somehow Tomcat server is still able to start up, but I get an error in catalina.log ("Address already in use: JVM_Bind:8080"). I changed Tomcat's port to 8081, and now I'm able to access my application. I have no idea who is using port 8080. I did a "netstat -b" and there is no 8080.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic