Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ERROR] Tomcat return http status error: 401, Reason Phrase:
- [INFO] ------------------------------------------------------------------------
- [INFO] BUILD FAILURE
- [INFO] ------------------------------------------------------------------------
- [INFO] Total time: 4.371 s
- [INFO] Finished at: 2018-09-07T11:58:42-04:00
- [INFO] Final Memory: 14M/50M
- [INFO] ------------------------------------------------------------------------
- [ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:deploy (default-cli) on project SimpleWeb: Tomcat return http status error: 401, Reason Phrase: : <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
- [ERROR] <html>
- [ERROR] <head>
- [ERROR] <title>401 Unauthorized</title>
- [ERROR] <style type="text/css">
- [ERROR] <!--
- [ERROR] BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;font-size:12px;}
- [ERROR] H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
- [ERROR] PRE, TT {border: 1px dotted #525D76}
- [ERROR] A {color : black;}A.name {color : black;}
- [ERROR] -->
- [ERROR] </style>
- [ERROR] </head>
- [ERROR] <body>
- [ERROR] <h1>401 Unauthorized</h1>
- [ERROR] <p>
- [ERROR] You are not authorized to view this page. If you have not changed
- [ERROR] any configuration files, please examine the file
- [ERROR] <tt>conf/tomcat-users.xml</tt> in your installation. That
- [ERROR] file must contain the credentials to let you use this webapp.
- [ERROR] </p>
- [ERROR] <p>
- [ERROR] For example, to add the <tt>manager-gui</tt> role to a user named
- [ERROR] <tt>tomcat</tt> with a password of <tt>s3cret</tt>, add the following to the
- [ERROR] config file listed above.
- [ERROR] </p>
- [ERROR] <pre>
- [ERROR] <role rolename="manager-gui"/>
- [ERROR] <user username="tomcat" password="s3cret" roles="manager-gui"/>
- [ERROR] </pre>
- [ERROR] <p>
- [ERROR] Note that for Tomcat 7 onwards, the roles required to use the manager
- [ERROR] application were changed from the single <tt>manager</tt> role to the
- [ERROR] following four roles. You will need to assign the role(s) required for
- [ERROR] the functionality you wish to access.
- [ERROR] </p>
- [ERROR] <ul>
- [ERROR] <li><tt>manager-gui</tt> - allows access to the HTML GUI and the status
- [ERROR] pages</li>
- [ERROR] <li><tt>manager-script</tt> - allows access to the text interface and the
- [ERROR] status pages</li>
- [ERROR] <li><tt>manager-jmx</tt> - allows access to the JMX proxy and the status
- [ERROR] pages</li>
- [ERROR] <li><tt>manager-status</tt> - allows access to the status pages only</li>
- [ERROR] </ul>
- [ERROR] <p>
- [ERROR] The HTML interface is protected against CSRF but the text and JMX interfaces
- [ERROR] are not. To maintain the CSRF protection:
- [ERROR] </p>
- [ERROR] <ul>
- [ERROR] <li>Users with the <tt>manager-gui</tt> role should not be granted either
- [ERROR] the <tt>manager-script</tt> or <tt>manager-jmx</tt> roles.</li>
- [ERROR] <li>If the text or jmx interfaces are accessed through a browser (e.g. for
- [ERROR] testing since these interfaces are intended for tools not humans) then
- [ERROR] the browser must be closed afterwards to terminate the session.</li>
- [ERROR] </ul>
- [ERROR] <p>
- [ERROR] For more information - please see the
- [ERROR] <a href="/docs/manager-howto.html">Manager App HOW-TO</a>.
- [ERROR] </p>
- [ERROR] </body>
- [ERROR]
- [ERROR] </html>
- [ERROR] -> [Help 1]
- [ERROR]
- [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
- [ERROR] Re-run Maven using the -X switch to enable full debug logging.
- [ERROR]
- [ERROR] For more information about the errors and possible solutions, please read the following articles:
- [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
- Process finished with exit code 1
- <?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>com.mantiso</groupId>
- <artifactId>SimpleWeb</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>war</packaging>
- <dependencies>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>3.1.0</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <webXml>web/WEB-INF/web.xml</webXml>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.tomcat.maven</groupId>
- <artifactId>tomcat7-maven-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <url>http://localhost:8080/manager/text</url>
- <username>tomcat-script</username>
- <password>s3cret</password>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </project>
- <?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. It is
- strongly recommended that you do NOT use one of the users in the commented out
- section below since they are intended for use with the examples web
- application.
- -->
- <!--
- NOTE: The sample user and role entries below are intended for use with the
- examples web application. They are wrapped in a comment and thus are ignored
- when reading this file. If you wish to configure these users for use with the
- examples web application, do not forget to remove the <!.. ..> that surrounds
- them. You will also need to set the passwords to something appropriate.
- -->
- <!--
- <role rolename="tomcat"/>
- <role rolename="role1"/>
- <user username="tomcat" password="<must-be-changed>" roles="tomcat"/>
- <user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
- <user username="role1" password="<must-be-changed>" roles="role1"/>
- -->
- <role rolename="manager-gui"/>
- <role rolename="manager-script"/>
- <user username="tomcat" password="s3cret" roles="manager-gui" />
- <user username="tomcat-script" password="s3cret" roles="manager-script" />
- </tomcat-users>
Add Comment
Please, Sign In to add comment