aspose file tools*
The moose likes Tomcat and the fly likes Unable to access admin console of tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Unable to access admin console of tomcat" Watch "Unable to access admin console of tomcat" New topic
Author

Unable to access admin console of tomcat

Lokendra Shekhawat
Ranch Hand

Joined: Jun 08, 2009
Posts: 40
hi friends,

Today i installed netbeans 6.7 with glashfish v2.1 and Apache Tomcat 6.0.18. I created an web application using Apache Tomcat as a webserver.

I am not able to access Apache Tomcat admin console. here is the steps i used to access admin console of tomcat:

1. click on service tab of netbeans IDE 6.7.
2. expand servers and right click on Apache Tomcat 6.0.18 and click start.
3. after the server starts. right click again on apache tomcat 6.0.18 and click on view admin console.
4. it opens a web browser with "http://localhost:8084/admin" url. and giving error "HTTP Status 404 - /admin".
5. when i open it using "http://localhost:8084/" it shows home page of Apache Tomcat Server.

6. when i try to access administration links like status and tomcat Manager, it asks for password (what is the default user name and password to access it).

7. when i click cancel on it . it says:

You are not authorized to view this page. If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file will contain the credentials to let you use this webapp.

You will need to add manager role to the config file listed above. For example:

<role rolename="manager"/>
<user username="tomcat" password="s3cret" roles="manager"/>


8. so i opened that file and tried to use the predefined users like username=tomcat password=tomcat, but it still says you are not authorized. so by following the above message I created a role manager and create a user in that account. but i am still not able to open its admin page.

Please suggest me what to do. because when i installed netbeans it asks for default user name and password for glashfish webserver, but not for Apache tomcat.

Please guide me so i can access the admin page of tomcat.

Thank you

SCJP5 93%. SCWCD 98%.

Visit my website http://www.rajasthan4tourism.com for information about rajasthan tourist places and much more.....!!!
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

The Admin console isn't part of Tomcat by default - you need to download and install it first.

But there are no Admin download for Tomcat 6 - you could try the one from Tomcat 5 instead, and see if this is working.


Regards, Rene Larsen
Dropbox Invite
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

I've just tried the admin app from Tomcat 5 on my Tomcat 6.0.20 - and it doesn't work out-of-the-box.

I added the missing jars so it could be called - but this was not enough, now some MBeans are missing.

What do you need this admin app for - can't live without it??
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42608
    
  65
Tomcat 6 no longer supports the admin web app (which wasn't being maintained even during Tomcat 5's lifetime). The preferred way is to use JMX now - add "-Dcom.sun.management.jmxremote" to CATALINA_OPTS in the startup script, restart Tomcat, and then fire up JConsole and start exploring.


Ping & DNS - my free Android networking tools app
Lokendra Shekhawat
Ranch Hand

Joined: Jun 08, 2009
Posts: 40
i found the way around it. i removed the Apache tomcat server form netbeans server list and added it again. by doing this the tomcat-users.xml file content been deleted automatically and when i add the tomcat again i also created the user using netbeans and after that it works. before i edit that tomcat-users.xml file manually but i won't work, but by editing it with netbeans it works.
now tomcat is using 8080 port instead of 8084.

tomcat manager is working now.

I can live without admin console, i asked it because when we right click and click on view admin console it point to localhost:8080/admin page when returns 404 error. when apache tomcat remved the admin features from 6th version then why it point to that same location.

anyways my problem get solved. i don't know there is some kind of magic in this blog whenever i stuck with something and post my problem here, my problem get solved always.

Thank you very much
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16246
    
  21

Ulf Dittmer wrote:Tomcat 6 no longer supports the admin web app (which wasn't being maintained even during Tomcat 5's lifetime). The preferred way is to use JMX now - add "-Dcom.sun.management.jmxremote" to CATALINA_OPTS in the startup script, restart Tomcat, and then fire up JConsole and start exploring.


Better than modifying the startup script, create a file $CATALINA_HOME/bin/setenv.sh (or setenv.bat for Windows). That's the same directory as catalina.sh/catalina.bat.

Place the line:

CATALINA_OPTS=-Dcom.sun.management.jmxremote

in setenv.sh or

SET CATALINA_OPTS=-Dcom.sun.management.jmxremote

in setenv.bat.

For best results, mark the setenv script as executable.

You can also use setenv to define debugging options, security features, weavers, etc.


Customer surveys are for companies who didn't pay proper attention to begin with.
anh nguyen tuan
Greenhorn

Joined: Dec 22, 2009
Posts: 1
Thank you,

I also do that, remove Apache and add again. it runs well.
And when i add again, I discover a enjoyable problem that make this affair.
+ You can choose a particular private configuration folder. With that, you can't use the configure file of tomcat. I think, it use a configuration file in the private folder of netbeen that we choose.
So, default installation, Netbean use this private folder. You can see in console if you run tomcat on netbean, you see three environment paths. one of those is the private folder.

clearly ?
 
 
subject: Unable to access admin console of tomcat