2013/2/1 L Alex Pranger <apran...@biostargroup.com>:
> I know that this question has been asked numerous times before, and I have
> checked the FAQs and setup documentation.  I have made sure that the common
> mistakes such as leaving the users inside comments, failing to stop and
> restart tomcat, and configuring the realms are not the cause of my issue.
>  I have even tried multiple browsers (Chrome/FF).
>
> When I click the link for the TomCat Manager App, I get the username and
> password request.  When I enter the values that are in my tomcat-users.xml
> file (included below), it does not accept those values.  To me it seemed
> most likely that the Realms were not set up right, so I've included the
> relevant parts of the server.xml file as well.
>
> At first I thought that it was because the
> org.apache.catalina.realm.MemoryRealm was not defined, so I added that
> right after the UserDatabaseRealm with no change in behavior.
>         <Realm className="org.apache.catalina.realm.MemoryRealm"
>                resourceName="UserDatabase"/>
> I then thought that maybe it was because those Realms were apparently
> inside the LockOutRealm, but when I moved the </Realm> tag to before the
> UserDatabaseRealm and MemoryRealm statements, then the web server just hung
> and did not respond to requests.  Again, tomcat was stopped and restarted
> (using the shutdown.sh and startup.sh scripts in /bin) each time I mode a
> change to these files.
>
> I'm sure it's probably a typo or similar on my part, and perhaps another
> set of eyes that know what they are doing can point out my mistake.  Thank
> you.  Relevant details are below ...
>
> ./version.sh
> Using CATALINA_BASE:   /srv/tomcat7
> Using CATALINA_HOME:   /srv/tomcat7
> Using CATALINA_TMPDIR: /srv/tomcat7/temp
> Using JRE_HOME:        /usr/lib64/jvm/jre
> Using CLASSPATH:
> /srv/tomcat7/bin/bootstrap.jar:/srv/tomcat7/bin/tomcat-juli.jar
> Server version: Apache Tomcat/7.0.33
> Server built:   Nov 18 2012 04:15:21
> Server number:  7.0.33.0
> OS Name:        Linux
> OS Version:     2.6.27.56-0.1-default
> Architecture:   amd64
> JVM Version:    1.6.0_0-b16
> JVM Vendor:     Sun Microsystems Inc.
>
>
> ./startup.sh
> Using CATALINA_BASE:   /srv/tomcat7
> Using CATALINA_HOME:   /srv/tomcat7
> Using CATALINA_TMPDIR: /srv/tomcat7/temp
> Using JRE_HOME:        /usr/lib64/jvm/jre
> Using CLASSPATH:
> /srv/tomcat7/bin/bootstrap.jar:/srv/tomcat7/bin/tomcat-juli.jar
>
> tomcat-users.xml

1. No xml header here? It should not be necessary, but beware of implications.

> <tomcat-users>
>   <role rolename="admin"/>
>   <role rolename="manager"/>
>   <role rolename="manager-gui"/>
>   <role rolename="manager-status"/>
>   <role rolename="manager-script"/>
>   <role rolename="manager-jmx"/>
>   <role rolename="tomcat"/>

2. The above <role/> elements are unnecessary, unless when you want to
define a role that contains no users. When <user/> element is parsed,
necessary roles are created automatically. (That is, to simplify this
tomcat-users.xml file so that make sure that there are no problems
with it).

3. Is the file readable by the user that Tomcat runs under? (Obviously
it should not be readable by anyone else for security reasons).

>   <user username="tomcat" password="tomcat" roles="tomcat"/>
>   <user username="admin" password="secret" roles="manager-gui"/>
>   <user username="tcadmin" password="secret"
> roles="manager-script,manager-status,manager-jmx"/>
> </tomcat-users>
>
> server.xml
> …
>     <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>
> …
>     <Engine name="Catalina" defaultHost="localhost">
>       <Realm className="org.apache.catalina.realm.LockOutRealm">
>         <!-- This Realm uses the UserDatabase configured in the global JNDI
>              resources under the key "UserDatabase".  Any edits
>              that are performed against this UserDatabase are immediately
>              available for use by the Realm.  -->
>         <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
>                resourceName="UserDatabase"/>
>       </Realm>
> …
>     </Engine>
>
> Thank you so much for looking at this.
>
> Ultimately I'm trying to get Agilefant running under the Tomcat
> application, and just placing the war file into the webapps directory (as
> was suggested for a manual install) did not seem to work, So I'm trying to
> get to the manager so that I can install the war file.
>

4. Is your copy of manager webapp the standard one? (Configured to use
BASIC authentication).

5. Are you being asked for a password, or just being denied access?

If the latter than you may be facing a RemoteAddrValve denying access.
(And if you do not have one configured, you would better configure one).

6. Beware that LockoutRealm will block you after several (5) failures.

7. What is being written into your access log file?
Are you accessing this copy of Tomcat?

Maybe there is something in other log files?


Best regards,
Konstantin Kolinko

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

Reply via email to