LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-23-2008, 02:48 PM   #1
Sanford Stein
Member
 
Registered: Jun 2008
Location: Evanston, Illinois
Distribution: RHEL 6.4
Posts: 126

Rep: Reputation: 17
Cannot start Tomcat admin or manager functions


I have installed Apache 2.2 and Tomcat 5.5.23 on a RHEL 5.1 system.
I can see the tomcat home page at http://localhost:8080, and I can access and run my application servlets, but I cannot use the tomcat admin or manager functions. When I click admin, I get:

Tomcat's administration web application is no longer installed by default. Download and install the "admin" package to use it.

This is not true. The package is definitely installed. I did a yum on tomcat5-admin-webapps and then, just to be sure, downloaded and installed the tomcat admin package from tomcat.apache.org--no help.

(When I click tomcat manager, I get a 404 error. I assume that this is a symptom of the same problem.)

Anybody know what is going on? If so, please respond here or e-mail sdstein7@yahoo.com. Thanks.
 
Old 07-23-2008, 02:50 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
And you followed the directions like from: http://tomcat.apache.org/tomcat-5.5-...ation%20Access
 
Old 07-23-2008, 03:53 PM   #3
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
You have to set up a manager account yourself (tomcat.users-xml in the conf subdirectory).
 
Old 07-23-2008, 03:57 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
Quote:
Originally Posted by jay73 View Post
You have to set up a manager account yourself (tomcat.users-xml in the conf subdirectory).
Yeah, the link I provided covers setting up an account.
 
Old 07-24-2008, 09:42 AM   #5
Sanford Stein
Member
 
Registered: Jun 2008
Location: Evanston, Illinois
Distribution: RHEL 6.4
Posts: 126

Original Poster
Rep: Reputation: 17
trickykid and jay73:

Thanks for your replies. The link you provided tells me that I have to have the manager.xml file (which I do, as it is installed by default) and that I have to set up one or more manager roles for users in
tomcat-users.xml, which I have already done. But I am still getting the 404 error. And I am assuming that these instructions are not relevant to my inability to see the admin function, which must be a different problem.

SS
 
Old 07-24-2008, 10:53 AM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
What url are you using to attempt to reach the admin portion? You are trying to reach it by using this type of url:

http://{host}:{port}/manager/
 
Old 07-24-2008, 11:07 AM   #7
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Okay, I'm struggling with this myself right now. I have a tomcat bundled with netbeans; I can get to the tomcat page buth all the rest (manager log-in, docs, examples, ...) is inaccessible. I have already determined that there is a conflict between server.xml an they way that it was configured by netbeans: if I use the information from server.xml and start tomcat in stand-alone mode, then I do get in. 404, by the way, is precisely the kind of error you will get if requests are redirected to the wrong port. I'll troubleshoot some more and let you know.
 
Old 07-24-2008, 11:14 AM   #8
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
OK, solved if I let it use the default 8080 as defined in server.xml. Switching ports also screwed up my users.xml but that's fine, I rewrote it manually and now I can log-in fine. Here is an example of a proper users.xml (parts in bold are just for emphasis):
Quote:
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="jay"/>
<role rolename="manager"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="jay" password="my_pw" roles="manager,jay"/>
 
Old 07-24-2008, 11:27 AM   #9
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Here is another observation: there appears to be a copy of the conf directory in .netbeans in the user's home directory which clashes with any settings in the conf directory inside my /opt directory. Once both read the same, I can log-in just fine.
 
Old 07-24-2008, 11:39 AM   #10
Sanford Stein
Member
 
Registered: Jun 2008
Location: Evanston, Illinois
Distribution: RHEL 6.4
Posts: 126

Original Poster
Rep: Reputation: 17
trickykid: Yes, that is the URL I am using

jay73: Here is my tomcat-users.xml file:

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="admin"/>
<role rolename="tomcat"/>
<role rolename="manager"/>
<role rolename="role1"/>
<user username="mbp5vdrzqtui" password="my_pw_1" roles="tomcat,admin,manager"/>
<user username="tomcat" password="my_tomcat_pw" roles="tomcat"/>
<user username="l5ul8fqltnpw" password="my_pw_2" roles="tomcat,admin,manager"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
</tomcat-users>

(When you refer to "users.xml", you mean "tomcat-users.xml", correct?)

This exact file works on a different server.

I don't know what you mean by "I let it use the default 8080 as defined in server.xml". I have not modifed server.xml and assume that 8080 is the default port.

There are no .netbeans files on my system so I don't think that is relevant for me.

Thanks again to both of you for your help.

SS
 
Old 07-24-2008, 01:48 PM   #11
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
I don't see any roles for your managers:

Quote:
<role rolename="jay"/>
 
Old 07-24-2008, 01:50 PM   #12
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Still, a simple permission problem should give you a 401 instead of a 404.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tomcat admin problem dave`2005 Linux - Software 1 09-22-2007 11:28 PM
Cannot log in to tomcat admin dave`2005 Slackware 1 07-07-2007 02:23 AM
Tomcat Admin logging error kumar.craja Linux - Server 1 08-26-2006 07:29 AM
tomcat manager sharp81 Linux - Software 11 01-05-2006 10:24 AM
tomcat on suse 9.3 - admin tool does not work; it shows a blank page nicolasdiogo Linux - Networking 3 06-14-2005 03:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration