Quantcast

Tomcat 7 Manager App Authentication failure

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Tomcat 7 Manager App Authentication failure

kl2eativ
Hello. I am having problems trying to authenticate my tomcat 7 manager app. I keep getting a 401 Unauthorized page. My config is as follows:
tomcat-users.xml (Located in /etc/tomcat5)
[code]
   <?xml version='1.0' encoding='utf-8'?>
  <tomcat-users>
  <role rolename="manager-gui"/>
  <user username="manager" password="tomcat" roles="manager-gui" />
  </tomcat-users>
[/code]

server.xml (Located in /etc/tomcat5)
[code]

              <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="etc/tomcat5/tomcat-users.xml" />
[/code]

I restart the tomcat service ( #service tomcat restart ) , but still cannot authenticate. Your help would be greatly
appreciated.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tomcat 7 Manager App Authentication failure

Igor Cicimov
On Fri, Jun 29, 2012 at 11:17 AM, kl2eativ <[hidden email]> wrote:

> Hello. I am having problems trying to authenticate my tomcat 7 manager
> app. I
> keep getting a 401 Unauthorized page. My config is as follows:
> tomcat-users.xml (Located in /etc/tomcat5)
> [code]
>   <?xml version='1.0' encoding='utf-8'?>
>  <tomcat-users>
>  <role rolename="manager-gui"/>
>  <user username="manager" password="tomcat" roles="manager-gui" />
>  </tomcat-users>
> [/code]
>
> server.xml (Located in /etc/tomcat5)
> [code]
>
>              <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="etc/tomcat5/tomcat-users.xml" />
> [/code]
>
> I restart the tomcat service ( #service tomcat restart ) , but still cannot
> authenticate. Your help would be greatly
> appreciated.
>
> --
> View this message in context:
> http://tomcat.10.n6.nabble.com/Tomcat-7-Manager-App-Authentication-failure-tp4983418.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

First check the security-constraint in the manager app and make sure that
the manager-gui role  is allowed access.

Second, are you trying to access from localhost or remote host?

Igor
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tomcat 7 Manager App Authentication failure

Arnaud LARROQUE
In reply to this post by kl2eativ
Hello,

Are you using tomcat 7 or tomcat 5 ? You mentioned both and this is
confusing.

URL changed in the tomcat 7 manager app : are you accessing through
<a href="http://your-host:your-port/manager/html">http://your-host:your-port/manager/html ?
On Jun 29, 2012 3:17 AM, "kl2eativ" <[hidden email]> wrote:

> Hello. I am having problems trying to authenticate my tomcat 7 manager
> app. I
> keep getting a 401 Unauthorized page. My config is as follows:
> tomcat-users.xml (Located in /etc/tomcat5)
> [code]
>   <?xml version='1.0' encoding='utf-8'?>
>  <tomcat-users>
>  <role rolename="manager-gui"/>
>  <user username="manager" password="tomcat" roles="manager-gui" />
>  </tomcat-users>
> [/code]
>
> server.xml (Located in /etc/tomcat5)
> [code]
>
>              <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="etc/tomcat5/tomcat-users.xml" />
> [/code]
>
> I restart the tomcat service ( #service tomcat restart ) , but still cannot
> authenticate. Your help would be greatly
> appreciated.
>
> --
> View this message in context:
> http://tomcat.10.n6.nabble.com/Tomcat-7-Manager-App-Authentication-failure-tp4983418.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tomcat 7 Manager App Authentication failure

Keiichi Fujino-2
In reply to this post by kl2eativ
Hi

Is "etc/tomcat5/tomcat-users.xml" correct?
The absolute path needs to start with "/".
The correct pathname is "/etc/tomcat5/tomcat-users.xml".


2012/6/29 kl2eativ <[hidden email]>:

> Hello. I am having problems trying to authenticate my tomcat 7 manager app. I
> keep getting a 401 Unauthorized page. My config is as follows:
> tomcat-users.xml (Located in /etc/tomcat5)
> [code]
>   <?xml version='1.0' encoding='utf-8'?>
>  <tomcat-users>
>  <role rolename="manager-gui"/>
>  <user username="manager" password="tomcat" roles="manager-gui" />
>  </tomcat-users>
> [/code]
>
> server.xml (Located in /etc/tomcat5)
> [code]
>
>              <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="etc/tomcat5/tomcat-users.xml" />
> [/code]
>
> I restart the tomcat service ( #service tomcat restart ) , but still cannot
> authenticate. Your help would be greatly
> appreciated.
>
> --
> View this message in context: http://tomcat.10.n6.nabble.com/Tomcat-7-Manager-App-Authentication-failure-tp4983418.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
Keiichi.Fujino

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tomcat 7 Manager App Authentication failure

kl2eativ
This post was updated on .
In reply to this post by Igor Cicimov
Igor Cicimov wrote
First check the security-constraint in the manager app and make sure that
the manager-gui role  is allowed access.

Second, are you trying to access from localhost or remote host?

Igor

Thank you for your response. I am not sure what you mean with the first question. As for the second one I access it locally via myhostname:8080, Then the tomcat pages loads and to the top right corner I have the three options, Server Status, Manager App and Host Manager.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tomcat 7 Manager App Authentication failure

kl2eativ
This post was updated on .
In reply to this post by Arnaud LARROQUE
Arnaud LARROQUE wrote
Hello,

Are you using tomcat 7 or tomcat 5 ? You mentioned both and this is
confusing.

URL changed in the tomcat 7 manager app : are you accessing through
<a href="http://your-host:your-port/manager/html">http://your-host:your-port/manager/html ?
Thank you for your response. I have installed Tomcat 7.0.27 but for some reason the folders that I have say Tomcat5? I access it via myhostname:8080. Then the tomcat pages loads and to the top right corner I have the three options, Server Status, Manager App and Host Manager.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tomcat 7 Manager App Authentication failure

kl2eativ
In reply to this post by Keiichi Fujino-2
kfujino wrote
Hi

Is "etc/tomcat5/tomcat-users.xml" correct?
The absolute path needs to start with "/".
The correct pathname is "/etc/tomcat5/tomcat-users.xml".

Keiichi.Fujino

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Hey, Yes my tomcat-users file is in that location, I have tried both ways but still no luck.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tomcat 7 Manager App Authentication failure

Arnaud LARROQUE
In reply to this post by kl2eativ
On Sun, Jul 1, 2012 at 12:04 AM, kl2eativ <[hidden email]> wrote:

>
> Arnaud LARROQUE wrote
>>
>> Hello,
>>
>> Are you using tomcat 7 or tomcat 5 ? You mentioned both and this is
>> confusing.
>>
>> URL changed in the tomcat 7 manager app : are you accessing through
>> <a href="http://your-host:your-port/manager/html">http://your-host:your-port/manager/html ?
>>
>
> Thank you for your response. I have installed Tomcat 7.0.27 but for some

Did you install tomcat 7 through package manager ? which distribution ?

> reason the folders that I have say Tomcat5? I access it via myhostname:8080
On my fedora16, /etc/tomcat5 is the configuration directory for the
tomcat5 package
/etc/tomcat is the configuration directory for the current tomcat
version (ie tomcat 7.0.27)

Check if you also have a /etc/tomcat directory  ? if so, apply your
configuration in this directory

Arnaud

>
>
> --
> View this message in context: http://tomcat.10.n6.nabble.com/Tomcat-7-Manager-App-Authentication-failure-tp4983418p4983478.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tomcat 7 Manager App Authentication failure

kl2eativ
This post was updated on .
Arnaud LARROQUE wrote
On Sun, Jul 1, 2012 at 12:04 AM, kl2eativ <[hidden email]> wrote:
>
> Arnaud LARROQUE wrote
>>
>> Hello,
>>
>> Are you using tomcat 7 or tomcat 5 ? You mentioned both and this is
>> confusing.
>>
>> URL changed in the tomcat 7 manager app : are you accessing through
>> <a href="http://your-host:your-port/manager/html">http://your-host:your-port/manager/html ?
>>
>
> Thank you for your response. I have installed Tomcat 7.0.27 but for some

Did you install tomcat 7 through package manager ? which distribution ?

> reason the folders that I have say Tomcat5? I access it via myhostname:8080
On my fedora16, /etc/tomcat5 is the configuration directory for the
tomcat5 package
/etc/tomcat is the configuration directory for the current tomcat
version (ie tomcat 7.0.27)

Check if you also have a /etc/tomcat directory  ? if so, apply your
configuration in this directory

Arnaud
>
>
> --
> View this message in context: http://tomcat.10.n6.nabble.com/Tomcat-7-Manager-App-Authentication-failure-tp4983418p4983478.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



UPDATE: As Arnaud said, his configuration for Tomcat7 was under /etc/tomcat but in my /etc folder there is not a folder called Tomcat, I only have a folder named Tomcat5. So I decided to search the whole file system for all tomcat folders. After a while it found a folder named just "tomcat" that was located in /opt. Inside that folder was /conf with a newly tomcat-users.xml file. I configured my roles here and boom it works. So I guess I was configuring the user file for tomcat 5 and not 7. Thank you Arnaud and all of the others who posted.
Loading...