Discussion:
tomcat 8.0.20 can't make manager run HTTP Status 404 - /manager/status etc
Mark Shifman
2015-02-26 16:26:23 UTC
Permalink
This is truly embarrassing since I have the manager running fine on tomcat 7.

http://localhost:8080/manager/status
returns
127.0.0.1 - - [26/Feb/2015:10:47:11 -0500] "GET /manager/status HTTP/1.1" 404 1022

http://localhost:8080/manager/html
returns
127.0.0.1 - - [26/Feb/2015:11:00:40 -0500] "GET /manager/html HTTP/1.1" 404 1018

I am starting tomcat 8.0.20 with jsvc and running tomcat as "mas"

catalina.out shows

Feb 26, 2015 10:37:23 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /home/apache-tomcat-8.0.20/webapps/manager has finished in 326 ms

so it looks like the manager is started.

tomcat-users.xml is shown below:
<?xml version='1.0' encoding='utf-8'?>
<!--
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 xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<!--
NOTE: By default, no user is included in the "manager-gui" role required
to operate the "/manager/html" web application. If you wish to use this app,
you must define such a user - the username and password are arbitrary.
-->
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="mas" password="masxxx" roles="manager-gui,manager-script"/>
</tomcat-users>


The file permissions are show below:
ls -lrt /home/apache-tomcat-8.0.20/conf
-rw------- 1 mas mas 1893 Feb 26 09:49 tomcat-users.xml

There is obviously something egregious I have done or missed but I can't find it.

any help appreciated.

mas
--
Mark Shifman MD. Ph.D.
Yale Center for Medical Informatics
Phone (203)737-5219
***@yale.edu


---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
Mark Shifman
2015-02-26 16:33:37 UTC
Permalink
Post by Mark Shifman
This is truly embarrassing since I have the manager running fine on tomcat 7.
https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8080_manager_status&d=AwIC-g&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=oZj4zInar3jeBECJ7OuBEMWJwBrzGeex-klf3JCRGss&m=t8sx2oxLU2xFh_hEfhXwWU4fIqfFYmqPF9q4PmUBS_Q&s=oRaGhibZvAOGCqQay4tltXaYNS7R8Coq6rBIG-D3CEk&e= returns
127.0.0.1 - - [26/Feb/2015:10:47:11 -0500] "GET /manager/status HTTP/1.1" 404 1022
https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8080_manager_html&d=AwIC-g&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=oZj4zInar3jeBECJ7OuBEMWJwBrzGeex-klf3JCRGss&m=t8sx2oxLU2xFh_hEfhXwWU4fIqfFYmqPF9q4PmUBS_Q&s=zZwSEgq3pjJ2377O8SahLwmRSvTTnayriks9TAXl9Qg&e= returns
127.0.0.1 - - [26/Feb/2015:11:00:40 -0500] "GET /manager/html HTTP/1.1" 404 1018
I am starting tomcat 8.0.20 with jsvc and running tomcat as "mas"
catalina.out shows
Feb 26, 2015 10:37:23 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /home/apache-tomcat-8.0.20/webapps/manager has finished in 326 ms
so it looks like the manager is started.
<?xml version='1.0' encoding='utf-8'?>
<!--
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
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.apache.org_licenses_LICENSE-2D2.0&d=AwIC-g&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=oZj4zInar3jeBECJ7OuBEMWJwBrzGeex-klf3JCRGss&m=t8sx2oxLU2xFh_hEfhXwWU4fIqfFYmqPF9q4PmUBS_Q&s=JvGEREmyRh9iXqaeKQyCHUrcjD1O_2toZhlSNaDW5W0&e=
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 xmlns="https://urldefense.proofpoint.com/v2/url?u=http-3A__tomcat.apache.org_xml&d=AwIC-g&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=oZj4zInar3jeBECJ7OuBEMWJwBrzGeex-klf3JCRGss&m=t8sx2oxLU2xFh_hEfhXwWU4fIqfFYmqPF9q4PmUBS_Q&s=RZuTCXhEBaQzBY9YA5BW3-AQ2-yfRVkpPVxCPhW5m8g&e= "
xmlns:xsi="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.w3.org_2001_XMLSchema-2Dinstance&d=AwIC-g&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=oZj4zInar3jeBECJ7OuBEMWJwBrzGeex-klf3JCRGss&m=t8sx2oxLU2xFh_hEfhXwWU4fIqfFYmqPF9q4PmUBS_Q&s=1g4xwwiqhgqK92eD5QBc-w_9EO2Z_Owc9toWZogUkTc&e= "
xsi:schemaLocation="https://urldefense.proofpoint.com/v2/url?u=http-3A__tomcat.apache.org_xml&d=AwIC-g&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=oZj4zInar3jeBECJ7OuBEMWJwBrzGeex-klf3JCRGss&m=t8sx2oxLU2xFh_hEfhXwWU4fIqfFYmqPF9q4PmUBS_Q&s=RZuTCXhEBaQzBY9YA5BW3-AQ2-yfRVkpPVxCPhW5m8g&e= tomcat-users.xsd"
version="1.0">
<!--
NOTE: By default, no user is included in the "manager-gui" role required
to operate the "/manager/html" web application. If you wish to use this app,
you must define such a user - the username and password are arbitrary.
-->
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="mas" password="masxxx" roles="manager-gui,manager-script"/>
</tomcat-users>
ls -lrt /home/apache-tomcat-8.0.20/conf
-rw------- 1 mas mas 1893 Feb 26 09:49 tomcat-users.xml
There is obviously something egregious I have done or missed but I can't find it.
any help appreciated.
mas
server.xml contains:
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<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>

and
<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>
--
Mark Shifman MD. Ph.D.
Yale Center for Medical Informatics
Phone (203)737-5219
***@yale.edu


---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
Christopher Schultz
2015-02-26 16:53:02 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mark,
Post by Mark Shifman
This is truly embarrassing since I have the manager running fine
on tomcat 7.
http://localhost:8080/manager/status returns 127.0.0.1 - -
[26/Feb/2015:10:47:11 -0500] "GET /manager/status HTTP/1.1" 404
1022
http://localhost:8080/manager/html returns 127.0.0.1 - -
[26/Feb/2015:11:00:40 -0500] "GET /manager/html HTTP/1.1" 404 1018
This works for me. What client are you using? Just a web browser?

The 404 seems odd.
Post by Mark Shifman
I am starting tomcat 8.0.20 with jsvc and running tomcat as "mas"
That shouldn't matter, but it's good information to have. Thanks.
Post by Mark Shifman
Feb 26, 2015 10:37:23 AM org.apache.catalina.startup.HostConfig
deployDirectory INFO: Deployment of web application directory
/home/apache-tomcat-8.0.20/webapps/manager has finished in 326 ms
Good. Do you have anything other than the default <Host> setup in
server.xml? The only thing I can think of is that the manager
application is only available in a particular vhost, and you are using
"localhost" which isn't mapped to it.
Post by Mark Shifman
so it looks like the manager is started.
tomcat-users.xml is shown below: <?xml version='1.0'
encoding='utf-8'?> <!-- 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
xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0"> <!-- NOTE: By default, no user is included in the
"manager-gui" role required to operate the "/manager/html" web
application. If you wish to use this app, you must define such a
user - the username and password are arbitrary. --> <role
rolename="manager-gui"/> <role rolename="manager-script"/> <user
username="mas" password="masxxx"
roles="manager-gui,manager-script"/> </tomcat-users>
The file permissions are show below: ls -lrt
/home/apache-tomcat-8.0.20/conf -rw------- 1 mas mas 1893 Feb 26
09:49 tomcat-users.xml
I think you'd get errors if that file weren't readable by the Tomcat user.

My setup is nearly identical, and I have no problem getting in. My
only obvious differences:

1. I don't have any xmlns, etc. attributes in my <tomcat-users>
element. Likely not the problem.

2. I only have a single role defined for my "gui" user. I suspect this
is also not the problem, but is easy to check.

I would triple-check that all the files are in the right places and
have exactly what you think is in them.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJU709uAAoJEBzwKT+lPKRY9S0P/jcXQYvXQPJeGS6NuVyEh/OU
IxzmOtDYQUuK/BKFlH/DA8R3PjUOca+fV4dHNOahgrjPNa3L7kwLrHVTuqhmdGFV
9Vr+cqq0FZFAdg1swWadXtzAe9ZXa0hxCGYhDjhSVyNVj3jWcl3POWrVrNXlxQch
q5uaEf2Z+O3jOdpQpfPfxesYJRRFZWdlgW5QGtwoNxRgjrWGIWXAHGBT/kEdsKSk
A1xDa7s3hVuDHnWuI0zV+LMl9DZrSqm0HeenftAk6DI9TO+2PJjCGeF38cKJOiJ5
xqjhh1ldbx7eWtJoPJ4O5foXx0tGqycrliRxoJ1b7PlPRc5l1vXfeQLKOucy2T0s
uGEasllku8Spo004M9CQ9qHpmkSQDgXZ99py1KLnT7403rrTZ4sBtuwnlldEfnP/
mfdjMqWfZc3C9V81hCfSxPYcHJEdVo76+30Rxith9FRcl78OTicxDwx5qC9lv478
H0bBYooI/B1W5//Me+HyoGH+s7z75YMEWYvrS3BQiBad+PF+be3E43DsO22uTBWW
coQeEbVY+KYUvqc3JTGlWc4fr/6iefpeX+rn3G05p8n0Fo95aC0pN1XsS+xrfWm3
ots4anEou85AURStOdbwV3WI7lX5QBEchj6WX1ucPnG/XX19caSNqomXYOZHbd3R
kLnapCJMEZIdnn2GoLH8
=nEgw
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
Konstantin Kolinko
2015-02-26 17:52:19 UTC
Permalink
Post by Mark Shifman
This is truly embarrassing since I have the manager running fine on tomcat 7.
http://localhost:8080/manager/status
returns
127.0.0.1 - - [26/Feb/2015:10:47:11 -0500] "GET /manager/status HTTP/1.1" 404 1022
http://localhost:8080/manager/html
returns
127.0.0.1 - - [26/Feb/2015:11:00:40 -0500] "GET /manager/html HTTP/1.1" 404 1018
I am starting tomcat 8.0.20 with jsvc and running tomcat as "mas"
catalina.out shows
Feb 26, 2015 10:37:23 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory
/home/apache-tomcat-8.0.20/webapps/manager has finished in 326 ms
so it looks like the manager is started.
No. The above message just displays timing (some people were
interested in how long the deployment takes). The same text is used
regardless of success or failure.

404 usually means that the web application is not running. In that
situation the request is served by the ROOT webapp, not by manager
webapp. (It is visible if either the ROOT webapp or the manager webapp
has its own configuration of AccessLogValve).

Do you have the files in /home/apache-tomcat-8.0.20/webapps/manager ?

Any chance that you are starting with Java Security Manager being
enabled? In this case you should see error messages in the logs.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
Mark Shifman
2015-02-26 18:05:02 UTC
Permalink
Post by Konstantin Kolinko
Post by Mark Shifman
This is truly embarrassing since I have the manager running fine on tomcat 7.
https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8080_manager_status&d=AwIBaQ&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=oZj4zInar3jeBECJ7OuBEMWJwBrzGeex-klf3JCRGss&m=qAAyZ6f2PpvD8ZHfq17E7vm0di_oOBZ5L417zIFArJo&s=CKor4EvRLf9Xl_PoOL58dKcTnpRepmn-UxWIo91RQJM&e=
returns
127.0.0.1 - - [26/Feb/2015:10:47:11 -0500] "GET /manager/status HTTP/1.1" 404 1022
https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8080_manager_html&d=AwIBaQ&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=oZj4zInar3jeBECJ7OuBEMWJwBrzGeex-klf3JCRGss&m=qAAyZ6f2PpvD8ZHfq17E7vm0di_oOBZ5L417zIFArJo&s=ODlwW-mr7a0mrNGd3WNAoZw6kQbhUEwZF7jBixbqgoA&e=
returns
127.0.0.1 - - [26/Feb/2015:11:00:40 -0500] "GET /manager/html HTTP/1.1" 404 1018
I am starting tomcat 8.0.20 with jsvc and running tomcat as "mas"
catalina.out shows
Feb 26, 2015 10:37:23 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory
/home/apache-tomcat-8.0.20/webapps/manager has finished in 326 ms
so it looks like the manager is started.
No. The above message just displays timing (some people were
interested in how long the deployment takes). The same text is used
regardless of success or failure.
404 usually means that the web application is not running. In that
situation the request is served by the ROOT webapp, not by manager
webapp. (It is visible if either the ROOT webapp or the manager webapp
has its own configuration of AccessLogValve).
Do you have the files in /home/apache-tomcat-8.0.20/webapps/manager ?
Thanks for the suggestion. I modified the context.xml then changed it back to the original leaving
a context.xml~ file hanging around. This must have been the problem.

Your suggestion made me replace that manager with a clean virginal copy of manager.jar from the tar ball.

Afterwards, everything worked like a charm.

Thanks to all.
mas
Post by Konstantin Kolinko
Any chance that you are starting with Java Security Manager being
enabled? In this case you should see error messages in the logs.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
--
Mark Shifman MD. Ph.D.
Yale Center for Medical Informatics
Phone (203)737-5219
***@yale.edu


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