On 3/5/2014 10:08 PM, N, Ravikiran wrote:
Hi,
I have configured Tomcat6.0.24 on RHEL6.3 by installing the corresponding rpms.
[root@happy16 /]# rpm -qa | grep tomcat
tomcat6-lib-6.0.24-45.el6.noarch
tomcat6-jsp-2.1-api-6.0.24-45.el6.noarch
tomcat6-servlet-2.5-api-6.0.24-45.el6.noarch
tomcat6-admin-webapps-6.0.24-45.el6.noarch
tomcat6-6.0.24-45.el6.noarch
tomcat6-el-2.1-api-6.0.24-45.el6.noarch
[root@happy16 /]#
My webapps folder looks like this :
[root@happy16 /]# cd /usr/share/tomcat6/webapps/
[root@happy16 webapps]# ls -lrt
total 3140
-rw-r--r-- 1 root root 1620499 Mar 5 10:20 httpif.war
drwxr-xr-x 4 tomcat tomcat 4096 Mar 5 10:21 httpif
drwxrwxr-x 5 root tomcat 4096 Mar 5 23:04 host-manager
drwxrwxr-x 5 root tomcat 4096 Mar 5 23:04 manager
[root@happy16 webapps]#
My tomcat-user.xml looks like this :
[root@happy16 webapps]# cd /usr/share/tomcat6/conf/
[root@happy16 conf]# cat tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="admin-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-gui"/>
<user username="testadmin" password="testadmin" roles="admin-gui"/>
<user username="testscript" password="testscript" roles="manager-script"/>
<user username="testgui" password="testgui" roles="manager-gui"/>
</tomcat-users>
[root@happy16 conf]#
I'm trying to manage my webapps, like start, stop, deploy and undeploy using
http://localhost:8080/manager/html . By command line I tried to do this, the
same is below :
[root@happy16 conf]# service tomcat6 status
tomcat6 (pid 13955) is running... [ OK ]
[root@happy16 conf]# wget
http://testadmin:testadmin@localhost:8080/manager/html/stop?path=/httpif
--2014-03-06 10:35:00--
http://testadmin:*password*@localhost:8080/manager/html/stop?path=/httpif
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:8080... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Connecting to localhost|::1|:8080... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Authorization failed.
[root@happy16 conf]# wget
http://testgui:testgui@localhost:8080/manager/html/stop?path=/httpif
--2014-03-06 10:35:14--
http://testgui:*password*@localhost:8080/manager/html/stop?path=/httpif
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:8080... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Connecting to localhost|::1|:8080... connected.
HTTP request sent, awaiting response... 403 Forbidden
2014-03-06 10:35:14 ERROR 403: Forbidden.
[root@happy16 conf]# wget
http://testscript:testscript@localhost:8080/manager/html/stop?path=/httpif
--2014-03-06 10:35:33--
http://testscript:*password*@localhost:8080/manager/html/stop?path=/httpif
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:8080... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Connecting to localhost|::1|:8080... connected.
HTTP request sent, awaiting response... 403 Forbidden
2014-03-06 10:35:33 ERROR 403: Forbidden.
[root@happy16 conf]#
For all three username and passwords I get 401 Unauthorised response. Can u
please help get through this. Thanks in advance
Regards,
Ravikiran N
From the documentation at
http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Supported_Manager_Commands:
All commands that the Manager application knows how to process are
specified in a single request URI like this:
http://{host}:{port}/manager/{command}?{parameters}
You're trying to use Tomcat 7 commands on a Tomcat 6 instance.
I just tried the following on Tomcat 6.0.37 (I know, I'll upgrade in a
bit, this is on my local development machine):
wget --user=username --password=password \
http://localhost:8080/manager/stop?path=/examples
This worked as expected for both users with a manager-gui role and a
manager-script role.
. . . . just my two cents
/mde/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org