• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Unable to access admin console of tomcat

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rene Larsen
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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??
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Lokendra Shekhawat
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
Your buns are mine! But you can have this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic