You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Noah, Craig [USA]" <No...@bah.com> on 2010/11/15 16:51:36 UTC

Configuring users

All,

 

I'm trying to configure a user to use the manager web application.  I have
read the comments in the tomcat-users.xml file on my server and added the
following two lines to the file:

 

<role rolename="manager"/>

<user username="user" password="pass" roles="manager"/>

 

I have saved the file and restarted the server, but am still unable to get
to the manager web application.  When I try to browse to the manager web
application at http://localhost:8084/manager/, I get a 404 report stating
the requested resource is not available.  What am I missing?

 

Craig Noah

Booz Allen Hamilton

Noah_Craig@bah.com

 


Re: Configuring users

Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/11/15 Noah, Craig [USA] <No...@bah.com>:
> When I try to browse to the manager web
> application at http://localhost:8084/manager/, I get a 404 report stating
> the requested resource is not available.

That URL is incomplete. Try
http://localhost:8084/manager/html

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Configuring users

Posted by "Noah, Craig [USA]" <No...@bah.com>.
Thank you.  That was it.  I'm using NetBeans and was trying to start the
server within the IDE.  Why can't they just use the scripts themselves?  Oh
well.   I'm up and running now.  Thanks Mark and Charles for your help.

Craig

-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
Sent: Monday, November 15, 2010 10:23 AM
To: Tomcat Users List
Subject: RE: Configuring users

> From: Mark Thomas [mailto:markt@apache.org] 
> Subject: Re: Configuring users

> Clearly, from the URL you provided, the default server.xml isn't being
> used. Has the Realm definition been changed? A copy of the complete
> server.xml (less comments with any sensitive info replaced with ***) is
> the next thing to look at.

Also tell us how you're launching Tomcat.  If you're doing it from inside
and IDE - don't; IDEs often substitute their own configurations rather than
using the one you specify.  Use the provided scripts and see what happens.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Configuring users

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mark Thomas [mailto:markt@apache.org] 
> Subject: Re: Configuring users

> Clearly, from the URL you provided, the default server.xml isn't being
> used. Has the Realm definition been changed? A copy of the complete
> server.xml (less comments with any sensitive info replaced with ***) is
> the next thing to look at.

Also tell us how you're launching Tomcat.  If you're doing it from inside and IDE - don't; IDEs often substitute their own configurations rather than using the one you specify.  Use the provided scripts and see what happens.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Configuring users

Posted by Mark Thomas <ma...@apache.org>.
On 15/11/2010 16:21, Noah, Craig [USA] wrote:
> I don't remember making changes to the server.xml file, but here is mine:

You aren't using the Tomcat instance you think you are.

>     <Connector port="8080" protocol="HTTP/1.1" 
>                connectionTimeout="20000" 
>                redirectPort="8443" />

The URL fro your previous e-mails was connecting to port 8084.

http://localhost:8080/manager/html should give you what you expect.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Configuring users

Posted by "Noah, Craig [USA]" <No...@bah.com>.
I don't remember making changes to the server.xml file, but here is mine:

<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
  <Listener className="org.apache.catalina.core.JasperListener" />
  <Listener
className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
/>
  <Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

  <GlobalNamingResources>
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>

  <Service name="Catalina">
    <Connector port="8080" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443" />
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

    <Engine name="Catalina" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>
      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

      </Host>
    </Engine>
  </Service>
</Server>

-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org] 
Sent: Monday, November 15, 2010 10:13 AM
To: Tomcat Users List
Subject: Re: Configuring users

On 15/11/2010 16:07, Noah, Craig [USA] wrote:
> Thanks, that's better.  I get prompted for a username and password, but it
> won't accept the values I've configured.  No, I don't have caps lock
turned
> on.

OK. Moving in the right direction.

Clearly, from the URL you provided, the default server.xml isn't being
used. Has the Realm definition been changed? A copy of the complete
server.xml (less comments with any sensitive info replaced with ***) is
the next thing to look at.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Configuring users

Posted by Mark Thomas <ma...@apache.org>.
On 15/11/2010 16:07, Noah, Craig [USA] wrote:
> Thanks, that's better.  I get prompted for a username and password, but it
> won't accept the values I've configured.  No, I don't have caps lock turned
> on.

OK. Moving in the right direction.

Clearly, from the URL you provided, the default server.xml isn't being
used. Has the Realm definition been changed? A copy of the complete
server.xml (less comments with any sensitive info replaced with ***) is
the next thing to look at.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Configuring users

Posted by "Noah, Craig [USA]" <No...@bah.com>.
Thanks, that's better.  I get prompted for a username and password, but it
won't accept the values I've configured.  No, I don't have caps lock turned
on.

-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org] 
Sent: Monday, November 15, 2010 10:04 AM
To: Tomcat Users List
Subject: Re: Configuring users

On 15/11/2010 16:01, Noah, Craig [USA] wrote:
> Sorry.  I'm using tomcat 6.0.26.
OK, manager is the correct role.

>  I made sure my changes are not within
> comments.  The full file is:
Looks good.

Try:
http://localhost:8084/manager/html

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Configuring users

Posted by Mark Thomas <ma...@apache.org>.
On 15/11/2010 16:01, Noah, Craig [USA] wrote:
> Sorry.  I'm using tomcat 6.0.26.
OK, manager is the correct role.

>  I made sure my changes are not within
> comments.  The full file is:
Looks good.

Try:
http://localhost:8084/manager/html

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Configuring users

Posted by "Noah, Craig [USA]" <No...@bah.com>.
Sorry.  I'm using tomcat 6.0.26.  I made sure my changes are not within
comments.  The full file is:

<?xml version='1.0' encoding='utf-8'?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<tomcat-users>
<!--
  NOTE:  By default, no user is included in the "manager" role required
  to operate the "/manager" web application.  If you wish to use this app,
  you must define such a user - the username and password are arbitrary.
-->
<!--
  NOTE:  The sample user and role entries below are wrapped in a comment
  and thus are ignored when reading this file. Do not forget to remove
  <!.. ..> that surrounds them.
-->
<!--
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
-->
    <role rolename="manager"/>
    <user username="user" password="pass" roles="manager"/>
</tomcat-users>

-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org] 
Sent: Monday, November 15, 2010 9:55 AM
To: Tomcat Users List
Subject: Re: Configuring users

On 15/11/2010 15:51, Noah, Craig [USA] wrote:
> All,
> 
> I'm trying to configure a user to use the manager web application.  I have
> read the comments in the tomcat-users.xml file on my server and added the
> following two lines to the file:
> 
> <role rolename="manager"/>
> 
> <user username="user" password="pass" roles="manager"/>
> 
> I have saved the file and restarted the server, but am still unable to get
> to the manager web application.  When I try to browse to the manager web
> application at http://localhost:8084/manager/, I get a 404 report stating
> the requested resource is not available.  What am I missing?

Telling us which Tomcat version and providing the complete contents of
tomcat-users.xml would be a start. Without that, my best guess is you
didn't spot the comment markers in the default file.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Configuring users

Posted by Mark Thomas <ma...@apache.org>.
On 15/11/2010 15:51, Noah, Craig [USA] wrote:
> All,
> 
> I'm trying to configure a user to use the manager web application.  I have
> read the comments in the tomcat-users.xml file on my server and added the
> following two lines to the file:
> 
> <role rolename="manager"/>
> 
> <user username="user" password="pass" roles="manager"/>
> 
> I have saved the file and restarted the server, but am still unable to get
> to the manager web application.  When I try to browse to the manager web
> application at http://localhost:8084/manager/, I get a 404 report stating
> the requested resource is not available.  What am I missing?

Telling us which Tomcat version and providing the complete contents of
tomcat-users.xml would be a start. Without that, my best guess is you
didn't spot the comment markers in the default file.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org