tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32314] New: - Manager webapp login fails (wrong UserDatabase selected)
Date Fri, 19 Nov 2004 12:00:17 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32314>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32314

           Summary: Manager webapp login fails (wrong UserDatabase selected)
           Product: Tomcat 5
           Version: 5.5.4
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: chris92250@hotmail.com


I installed Tomcat 5.5.4-stable (clean install, no other versions running or
configuration imported).  Using the default configuration, I can't log into the
manager application with "http://localhost/manager/html/list".  It pops up the
authentication dialog box in Mozilla Firefox and Internet Explorer, but the
"correct" login is not accepted.  Tomcat generates a stack trace in the logs, as
follows:

19-Nov-2004 12:31:19 org.apache.catalina.realm.JAASRealm authenticate
SEVERE: Unexpected error
java.lang.SecurityException: Unable to locate a login configuration
	at com.sun.security.auth.login.ConfigFile.<init>(Unknown Source)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at java.lang.Class.newInstance0(Unknown Source)
	at java.lang.Class.newInstance(Unknown Source)
	at javax.security.auth.login.Configuration$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.login.Configuration.getConfiguration(Unknown Source)
	at javax.security.auth.login.LoginContext$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.login.LoginContext.init(Unknown Source)
	at javax.security.auth.login.LoginContext.<init>(Unknown Source)
	at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:355)
	at
org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181)
	at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at
org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:481)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:731)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
	at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Unable to locate a login configuration
	at com.sun.security.auth.login.ConfigFile.init(Unknown Source)
	... 28 more

It's obviously because the JAASRealm is failing.  The problem is... I'm not
using JAAS at all, and don't want to!  I just want to use the standard
MemoryUserDatabase, and as such, here's my FULL "server.xml" (located in
"%CATALINA_HOME%\conf", as per default):

----------------------------------------
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<Server port="8005" shutdown="SHUTDOWN" debug="0">
	<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" maxThreads="150" minSpareThreads="10" maxSpareThreads="20"
		 enableLookups="false" redirectPort="8443" acceptCount="100"
		 connectionTimeout="20000" disableUploadTimeout="true" />
		<Engine name="Catalina" defaultHost="localhost">
			<Host name="localhost" appBase="webapps" unpackWARs="false" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
				<Alias>europa</Alias>
				<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
				 directory="logs" prefix="access." suffix=".log"
				 pattern="common" resolveHosts="false"/>
			</Host>
		</Engine>
	</Service>
</Server>
----------------------------------------

...and my "manager.xml" (located in "%CATALINA_HOME%\conf\Catalina\localhost",
as per default):

----------------------------------------
<Context docBase="${catalina.home}/server/webapps/manager"
         privileged="true" antiResourceLocking="false" antiJARLocking="false">

  <!-- Link to the user database we will get roles from -->
  <ResourceLink name="users" global="UserDatabase"
                type="org.apache.catalina.UserDatabase"/>

</Context>
----------------------------------------

...and my "tomcat-users.xml" file (located in "%CATALINA_HOME%\conf", as per
default)

----------------------------------------
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
  <role rolename="manager"/>
  <role rolename="admin"/>
  <user username="admin" password="secret" roles="admin,manager"/>
</tomcat-users>
----------------------------------------

For information, I'm running WinXP Pro SP2 with Java 5.0 (final), and Tomcat
5.5.4 (installed with the ".exe" file.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message