You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jeffrey Janner <Je...@PolyDyne.com> on 2011/09/10 23:43:44 UTC

Problem running Manager GUI

Running:
Windows Server 2008 R2 Standard
Tomcat 6.0.33
Sun JDK 1.6.0_26

I installed Tomcat using the windows installer and created an admin user & password.
Then I modified the server.xml and removed the localhost information and inserted my own host config as:
      <Host name="myhost.mydomain.com" appBase="webapps"
       unpackWARs="true" autoDeploy="false"
       xmlValidation="false" xmlNamespaceAware="false">
      </Host>
The Manager directory is currently the only thing in the webapps directory. I have a context.xml pointing to my actual app in another location.
When I try to access http://myhost.mydomain.com/manager/html, I get prompted for the login info, 3 times, and then get this nice graphical 401 error page explaining that the tomcat-users.xml file may need to be modified.  I checked and it seems to be missing the <role rolename="manager-gui"/> entry (hard to tell, no hard returns).
I added the line, and even converted the file to DOS formatting, but still no, luck.
I also noticed that the <user> entry just had "name=" and not "username=" as the doc said, but that didn't help either.
Here is the file with the names changed to protect the innocent:

<?xml version='1.0' encoding='cp1252'?>
<!--
  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>
<user username="admin" password="pword" roles="manager-gui" />
<!--
  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"/>
-->
</tomcat-users>

Anybody got a clue?
Jeff
__________________________________________________________________________

Confidentiality Notice:  This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law.  If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited.  

If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system.

RE: Problem running Manager GUI

Posted by Jeffrey Janner <Je...@PolyDyne.com>.
Yep, it was the realm stuff.  I'd removed it from the <Engine> because I don't need it for the whole host, just for the manager portion.  Added it back into the context.xml definition, and all is now fine.
Jeff

> -----Original Message-----
> From: Jeffrey Janner [mailto:Jeffrey.Janner@PolyDyne.com]
> Sent: Saturday, September 10, 2011 5:03 PM
> To: 'Tomcat Users List'
> Subject: RE: Problem running Manager GUI
> 
> > -----Original Message-----
> > From: Jeffrey Janner [mailto:Jeffrey.Janner@PolyDyne.com]
> > Sent: Saturday, September 10, 2011 4:44 PM
> > To: 'Tomcat Users List'
> > Subject: Problem running Manager GUI
> >
> > Running:
> > Windows Server 2008 R2 Standard
> > Tomcat 6.0.33
> > Sun JDK 1.6.0_26
> >
> > I installed Tomcat using the windows installer and created an admin
> > user & password.
> > Then I modified the server.xml and removed the localhost information
> > and inserted my own host config as:
> >       <Host name="myhost.mydomain.com" appBase="webapps"
> >        unpackWARs="true" autoDeploy="false"
> >        xmlValidation="false" xmlNamespaceAware="false">
> >       </Host>
> > The Manager directory is currently the only thing in the webapps
> > directory. I have a context.xml pointing to my actual app in another
> > location.
> > When I try to access http://myhost.mydomain.com/manager/html, I get
> > prompted for the login info, 3 times, and then get this nice
> graphical
> > 401 error page explaining that the tomcat-users.xml file may need to
> be
> > modified.  I checked and it seems to be missing the <role
> > rolename="manager-gui"/> entry (hard to tell, no hard returns).
> > I added the line, and even converted the file to DOS formatting, but
> > still no, luck.
> > I also noticed that the <user> entry just had "name=" and not
> > "username=" as the doc said, but that didn't help either.
> > Here is the file with the names changed to protect the innocent:
> >
> > <?xml version='1.0' encoding='cp1252'?>
> > <!--
> >   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>
> > <user username="admin" password="pword" roles="manager-gui" />
> > <!--
> >   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"/>
> > -->
> > </tomcat-users>
> >
> > Anybody got a clue?
> > Jeff
> [Jeff Janner]
> More info from logs.  Looks like I might have deleted a necessary
> config item.  Checking.....
> Sep 10, 2011 5:00:50 PM 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>(ConfigFile.java:93)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> 	at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructor
> AccessorImpl.java:39)
> 	at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCon
> structorAccessorImpl.java:27)
> 	at
> java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> 	at java.lang.Class.newInstance0(Class.java:355)
> 	at java.lang.Class.newInstance(Class.java:308)
> 	at
> javax.security.auth.login.Configuration$3.run(Configuration.java:247)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at
> javax.security.auth.login.Configuration.getConfiguration(Configuration.
> java:242)
> 	at
> javax.security.auth.login.LoginContext$1.run(LoginContext.java:237)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at
> javax.security.auth.login.LoginContext.init(LoginContext.java:234)
> 	at
> javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
> 	at
> org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:393)
> 	at
> org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:334)
> 	at
> org.apache.catalina.authenticator.BasicAuthenticator.authenticate(Basic
> Authenticator.java:181)
> 	at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticato
> rBase.java:528)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> a:127)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> a:102)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> .java:109)
> 	at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
> 291)
> 	at
> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.
> java:877)
> 	at
> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.proc
> ess(Http11AprProtocol.java:594)
> 	at
> org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675
> )
> 	at java.lang.Thread.run(Thread.java:662)
> Caused by: java.io.IOException: Unable to locate a login configuration
> 	at
> com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:250)
> 	at
> com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:91)
> 	... 25 more
> _______________________________________________________________________
> ___
> 
> Confidentiality Notice:  This Transmission (including any attachments)
> may contain information that is privileged, confidential, and exempt
> from disclosure under applicable law.  If the reader of this message is
> not the intended recipient you are hereby notified that any
> dissemination, distribution, or copying of this communication is
> strictly prohibited.
> 
> If you have received this transmission in error, please immediately
> reply to the sender or telephone (512) 343-9100 and delete this
> transmission from your system.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

__________________________________________________________________________

Confidentiality Notice:  This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law.  If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited.  

If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system.


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


RE: Problem running Manager GUI

Posted by Jeffrey Janner <Je...@PolyDyne.com>.
> -----Original Message-----
> From: Jeffrey Janner [mailto:Jeffrey.Janner@PolyDyne.com]
> Sent: Saturday, September 10, 2011 4:44 PM
> To: 'Tomcat Users List'
> Subject: Problem running Manager GUI
> 
> Running:
> Windows Server 2008 R2 Standard
> Tomcat 6.0.33
> Sun JDK 1.6.0_26
> 
> I installed Tomcat using the windows installer and created an admin
> user & password.
> Then I modified the server.xml and removed the localhost information
> and inserted my own host config as:
>       <Host name="myhost.mydomain.com" appBase="webapps"
>        unpackWARs="true" autoDeploy="false"
>        xmlValidation="false" xmlNamespaceAware="false">
>       </Host>
> The Manager directory is currently the only thing in the webapps
> directory. I have a context.xml pointing to my actual app in another
> location.
> When I try to access http://myhost.mydomain.com/manager/html, I get
> prompted for the login info, 3 times, and then get this nice graphical
> 401 error page explaining that the tomcat-users.xml file may need to be
> modified.  I checked and it seems to be missing the <role
> rolename="manager-gui"/> entry (hard to tell, no hard returns).
> I added the line, and even converted the file to DOS formatting, but
> still no, luck.
> I also noticed that the <user> entry just had "name=" and not
> "username=" as the doc said, but that didn't help either.
> Here is the file with the names changed to protect the innocent:
> 
> <?xml version='1.0' encoding='cp1252'?>
> <!--
>   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>
> <user username="admin" password="pword" roles="manager-gui" />
> <!--
>   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"/>
> -->
> </tomcat-users>
> 
> Anybody got a clue?
> Jeff
[Jeff Janner] 
More info from logs.  Looks like I might have deleted a necessary config item.  Checking.....
Sep 10, 2011 5:00:50 PM 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>(ConfigFile.java:93)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at java.lang.Class.newInstance0(Class.java:355)
	at java.lang.Class.newInstance(Class.java:308)
	at javax.security.auth.login.Configuration$3.run(Configuration.java:247)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:242)
	at javax.security.auth.login.LoginContext$1.run(LoginContext.java:237)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.login.LoginContext.init(LoginContext.java:234)
	at javax.security.auth.login.LoginContext.<init>(LoginContext.java:403)
	at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:393)
	at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:334)
	at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:181)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Unable to locate a login configuration
	at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:250)
	at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:91)
	... 25 more
__________________________________________________________________________

Confidentiality Notice:  This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law.  If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited.  

If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system.


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