• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

unable to login in tomcat manager

 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
I have installed Tomcat 5.0.28. in the port no. 9090
after typeing

http://localhost:9090/

, I am getting the index page.
From here, I want to log in Tomcat Manager to deploy my web application .
I checked with user name / password from tomcat-users.xml. But the dialog box "Tomcat Manager Application " is not accepting the user/password.
I am getting following error message in the browser

HTTP Status 403 - Access to the requested resource has been denied


type Status report

message Access to the requested resource has been denied

description Access to the specified resource (Access to the requested resource has been denied) has been forbidden.



but I can run the sample applications and my own applications that saved in the default folders in the development directories.
I can not run application stored in my own folder in the /webapps directory.


thanks
Abhijit



:shocked: :shocked:
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The basic Tomcat installation does not automatically give you a tomcat-users.xml configured to permit the manager or admin roles - just a basic security measure. How did you change the users xml?

Bill
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by William Brogden:
The basic Tomcat installation does not automatically give you a tomcat-users.xml configured to permit the manager or admin roles - just a basic security measure. How did you change the users xml?

Bill




If you install with the .exe version on a Windows box, the install wizard walks you through a screen that allows you to enter your admin username and password.
 
Abhijit Das
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,

Ben & will
I just unzip the file and store in the E:/jakarta-tomcat-5.0.28
Next , I change the file E:\jakarta-tomcat-5.0.28\conf\tomcat-users.xml


These are the your doubts .

Now, if i did not change, then how to log into the Tomcat mamager to deploy my web-applications???
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to add a manager role and make sure that your user is in that role.


[ March 06, 2008: Message edited by: Ben Souther ]
 
Abhijit Das
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Ben, now I am getting the "Tomcat Web Application Manager " window after adding your lines in the file.

Thanks a lot.

:thumb: :thumb:
 
Abhijit Das
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello Friends,
Now I am able to open the Manager Window. But after deploy the war file , I am not able to start it i.e. Running remains flase for that application.

As it is deployed successsfully , the floder and war is placed in the /webapps folder.
Following is the error message in server console...

Mar 7, 2008 2:43:39 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3079 ms
Mar 7, 2008 2:44:10 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /abhi from URL jar:file:/E:/jak
arta-tomcat-5.0.28/webapps/abhi.war!/
Mar 7, 2008 2:44:11 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Mar 7, 2008 2:44:11 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Mar 7, 2008 2:44:11 PM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
Mar 7, 2008 2:46:51 PM org.apache.catalina.core.StandardHostDeployer start
INFO: standardHost.start /abhi
Mar 7, 2008 2:46:51 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Mar 7, 2008 2:46:51 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Mar 7, 2008 2:46:51 PM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
Mar 7, 2008 2:46:53 PM org.apache.catalina.core.StandardHostDeployer start
INFO: standardHost.start /abhi
Mar 7, 2008 2:46:53 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Mar 7, 2008 2:46:53 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Mar 7, 2008 2:46:53 PM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
Mar 7, 2008 2:46:56 PM org.apache.catalina.core.ContainerBase log
INFO: Removing web application at context path /abhi
Mar 7, 2008 2:46:59 PM org.apache.catalina.core.StandardHostDeployer stop
INFO: standardHost.stop /admin
Mar 7, 2008 2:46:59 PM org.apache.catalina.logger.LoggerBase stop
INFO: unregistering logger Catalina:type=Logger,path=/admin,host=localhost


[ March 07, 2008: Message edited by: Abhijit Das ]
 
Greenhorn
Posts: 9
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In Tomcat 7 the roles have changed. The new roles are as follows:

* manager-gui: allows access to the HTML GUI and the status pages

* manager-script: allows access to the text interface and the status pages

* manager-jmx: allows access to the JMX proxy and the status pages

* manager-status: allows access to the status pages only

These roles are predefined, so you do NOT need to add them via role tags. So, to access the manager application via a web browser you must give the role "manager-gui" to whatever user you want to be able to login to the manager application i.e.



If you want to use a script to deploy automatically i.e. using Ant you need to set up a user for the "manager-script" role i.e.



The documentation at http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html leave a lot to be desired! I had to search the web to get decent instructions. One warning to heed in the Tomcat 7 documentation applies to a production scenario:

The HTML interface is protected against CSRF but the text and JMX interfaces are not. To maintain the CSRF protection:

* Users with the manager-gui role should NOT be granted either the manager-script or manager-jmx roles.

* If the text or jmx interfaces are accessed through a browser (e.g. for testing since these interfaces are intended for tools not humans) then the browser must be closed afterwards to terminate the session.

Hope this saves others from the frustration that I went through...
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
-Joseph
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@ Pat Garner

Your contribution was the reason for me to register at this forum, because I lost many hours till now by searching for the reason of this problem.
The mess is, that with the starting page you get the NOTE: For security reasons .... role "manager" .... role "admin".
No hint to the necessary role "manager-gui" for using the browser to log in as manager.
(Probably it will be written somewhere in the documentation, but it shuld be mentioned on the start page.)
The documentation has the hint to necessary role "manager-script", but if you do not know, that this is not the door for using the browser, the research is in a cul-de-sac.

So thank You very much.
Robert
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It appears as if I am stuck in a similar situation but this time none of the above solutions work. I have tried to add the appropriate role to tomcat-users.xml file without any mistakes of not removing the comment markers. Nothing seems to work. In my case I get a Tomcat Manage Application login form when I try to browse the server from within the Netbeans IDE. I have verfied the properties and I am making changes to the correct tomcat base conf file. Just wondering if someone knows or have a similar problem?
 
Robert Patzke
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I started to edit tomcat-users.xml and nothing worked, I combed through all directories looking for some hint. I found, that there are several tomcat-users.xml files in my environment and my hope was, that I edited the wrong one. But it was not the reason for my flops.

Are You really sure to edit the correct tomcat-users.xml file?
And did You restart tomcat after editing the file?

Good luck
Robert
 
Ibne Masood
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Robert Patzke wrote:When I started to edit tomcat-users.xml and nothing worked, I combed through all directories looking for some hint. I found, that there are several tomcat-users.xml files in my environment and my hope was, that I edited the wrong one. But it was not the reason for my flops.

Are You really sure to edit the correct tomcat-users.xml file?
And did You restart tomcat after editing the file?

Good luck
Robert



Yes I am sure that I have edited the right file. In my system I have tomcat-users.xml file at only two places and I have tried to edit both of them. I have also tried to restart the tomcat and netbeans and this also does not work.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ibne Masood wrote:

Robert Patzke wrote:When I started to edit tomcat-users.xml and nothing worked, I combed through all directories looking for some hint. I found, that there are several tomcat-users.xml files in my environment and my hope was, that I edited the wrong one. But it was not the reason for my flops.

Are You really sure to edit the correct tomcat-users.xml file?
And did You restart tomcat after editing the file?

Good luck
Robert



Yes I am sure that I have edited the right file. In my system I have tomcat-users.xml file at only two places and I have tried to edit both of them. I have also tried to restart the tomcat and netbeans and this also does not work.



I was also not able to get it working initially, then noted in the thread above that you should not create the "manager-gui" and "manager-script" roles in the file. I removed them and now my setup is working.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

While installing Tomact6, I have not entered anyhting for "Tomcat administrator Login-optional".
Now I see that tomcat has been succesfully installed (chked this by typing teh url http://localhost:8080/)

1) Now, on that Tomcat page, on the left side, I see two links "Status" and "Tomcat Manager".
When I click on these links, they ask me for credentials. From wat I googled, I came to know that I need to change my
tomcat-users.xml file. I see that my users and role were commented. When I try to uncomment, I m not able to edit the
tomcat-users.xml at all. I m an administrator, bt i m still not able to edit the tomcat-users.xml file, donno why???

2) Also. when I go to All progms->Apache Tomcat6.0 Tomcat6->Configure Tomcat or Monitor Tomcat, Apache Tomcat6.0 Tomcat6
properties WINDOW open up,instead of the web app opening?

Could you all please help me out? I jus donno how to proceed from here
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
check whether the role code is commented by -->, if yes, remove it. I was doing very thing correct but the login was not successful, then I found that the code is commented, after removing it the login is working fine.

I added two lines:
<role rolename="manager-gui"/>
<user username="tomcat" password="s3cret" roles="manager-gui"/>

My tomcat is 7

Thanks
 
When you have exhausted all possibilities, remember this: you haven't - Edison. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic