Guest User

Untitled

a guest
Sep 7th, 2018
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.47 KB | None | 0 0
  1. [ERROR] Tomcat return http status error: 401, Reason Phrase:
  2. [INFO] ------------------------------------------------------------------------
  3. [INFO] BUILD FAILURE
  4. [INFO] ------------------------------------------------------------------------
  5. [INFO] Total time: 4.371 s
  6. [INFO] Finished at: 2018-09-07T11:58:42-04:00
  7. [INFO] Final Memory: 14M/50M
  8. [INFO] ------------------------------------------------------------------------
  9. [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">
  10. [ERROR] <html>
  11. [ERROR] <head>
  12. [ERROR] <title>401 Unauthorized</title>
  13. [ERROR] <style type="text/css">
  14. [ERROR] <!--
  15. [ERROR] BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;font-size:12px;}
  16. [ERROR] H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
  17. [ERROR] PRE, TT {border: 1px dotted #525D76}
  18. [ERROR] A {color : black;}A.name {color : black;}
  19. [ERROR] -->
  20. [ERROR] </style>
  21. [ERROR] </head>
  22. [ERROR] <body>
  23. [ERROR] <h1>401 Unauthorized</h1>
  24. [ERROR] <p>
  25. [ERROR] You are not authorized to view this page. If you have not changed
  26. [ERROR] any configuration files, please examine the file
  27. [ERROR] <tt>conf/tomcat-users.xml</tt> in your installation. That
  28. [ERROR] file must contain the credentials to let you use this webapp.
  29. [ERROR] </p>
  30. [ERROR] <p>
  31. [ERROR] For example, to add the <tt>manager-gui</tt> role to a user named
  32. [ERROR] <tt>tomcat</tt> with a password of <tt>s3cret</tt>, add the following to the
  33. [ERROR] config file listed above.
  34. [ERROR] </p>
  35. [ERROR] <pre>
  36. [ERROR] <role rolename="manager-gui"/>
  37. [ERROR] <user username="tomcat" password="s3cret" roles="manager-gui"/>
  38. [ERROR] </pre>
  39. [ERROR] <p>
  40. [ERROR] Note that for Tomcat 7 onwards, the roles required to use the manager
  41. [ERROR] application were changed from the single <tt>manager</tt> role to the
  42. [ERROR] following four roles. You will need to assign the role(s) required for
  43. [ERROR] the functionality you wish to access.
  44. [ERROR] </p>
  45. [ERROR] <ul>
  46. [ERROR] <li><tt>manager-gui</tt> - allows access to the HTML GUI and the status
  47. [ERROR] pages</li>
  48. [ERROR] <li><tt>manager-script</tt> - allows access to the text interface and the
  49. [ERROR] status pages</li>
  50. [ERROR] <li><tt>manager-jmx</tt> - allows access to the JMX proxy and the status
  51. [ERROR] pages</li>
  52. [ERROR] <li><tt>manager-status</tt> - allows access to the status pages only</li>
  53. [ERROR] </ul>
  54. [ERROR] <p>
  55. [ERROR] The HTML interface is protected against CSRF but the text and JMX interfaces
  56. [ERROR] are not. To maintain the CSRF protection:
  57. [ERROR] </p>
  58. [ERROR] <ul>
  59. [ERROR] <li>Users with the <tt>manager-gui</tt> role should not be granted either
  60. [ERROR] the <tt>manager-script</tt> or <tt>manager-jmx</tt> roles.</li>
  61. [ERROR] <li>If the text or jmx interfaces are accessed through a browser (e.g. for
  62. [ERROR] testing since these interfaces are intended for tools not humans) then
  63. [ERROR] the browser must be closed afterwards to terminate the session.</li>
  64. [ERROR] </ul>
  65. [ERROR] <p>
  66. [ERROR] For more information - please see the
  67. [ERROR] <a href="/docs/manager-howto.html">Manager App HOW-TO</a>.
  68. [ERROR] </p>
  69. [ERROR] </body>
  70. [ERROR]
  71. [ERROR] </html>
  72. [ERROR] -> [Help 1]
  73. [ERROR]
  74. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  75. [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  76. [ERROR]
  77. [ERROR] For more information about the errors and possible solutions, please read the following articles:
  78. [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  79.  
  80. Process finished with exit code 1
  81.  
  82. <?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">
  83. <modelVersion>4.0.0</modelVersion>
  84.  
  85. <groupId>com.mantiso</groupId>
  86. <artifactId>SimpleWeb</artifactId>
  87. <version>1.0-SNAPSHOT</version>
  88. <packaging>war</packaging>
  89.  
  90. <dependencies>
  91. <dependency>
  92. <groupId>javax.servlet</groupId>
  93. <artifactId>javax.servlet-api</artifactId>
  94. <version>3.1.0</version>
  95. <scope>provided</scope>
  96. </dependency>
  97. </dependencies>
  98.  
  99. <build>
  100. <plugins>
  101. <plugin>
  102. <groupId>org.apache.maven.plugins</groupId>
  103. <artifactId>maven-war-plugin</artifactId>
  104. <configuration>
  105. <webXml>web/WEB-INF/web.xml</webXml>
  106. </configuration>
  107. </plugin>
  108. <plugin>
  109. <groupId>org.apache.tomcat.maven</groupId>
  110. <artifactId>tomcat7-maven-plugin</artifactId>
  111. <version>2.2</version>
  112. <configuration>
  113. <url>http://localhost:8080/manager/text</url>
  114. <username>tomcat-script</username>
  115. <password>s3cret</password>
  116. </configuration>
  117. </plugin>
  118. </plugins>
  119. </build>
  120.  
  121. </project>
  122.  
  123. <?xml version="1.0" encoding="UTF-8"?>
  124. <!--
  125. Licensed to the Apache Software Foundation (ASF) under one or more
  126. contributor license agreements. See the NOTICE file distributed with
  127. this work for additional information regarding copyright ownership.
  128. The ASF licenses this file to You under the Apache License, Version 2.0
  129. (the "License"); you may not use this file except in compliance with
  130. the License. You may obtain a copy of the License at
  131.  
  132. http://www.apache.org/licenses/LICENSE-2.0
  133.  
  134. Unless required by applicable law or agreed to in writing, software
  135. distributed under the License is distributed on an "AS IS" BASIS,
  136. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  137. See the License for the specific language governing permissions and
  138. limitations under the License.
  139. -->
  140. <tomcat-users xmlns="http://tomcat.apache.org/xml"
  141. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  142. xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
  143. version="1.0">
  144. <!--
  145. NOTE: By default, no user is included in the "manager-gui" role required
  146. to operate the "/manager/html" web application. If you wish to use this app,
  147. you must define such a user - the username and password are arbitrary. It is
  148. strongly recommended that you do NOT use one of the users in the commented out
  149. section below since they are intended for use with the examples web
  150. application.
  151. -->
  152. <!--
  153. NOTE: The sample user and role entries below are intended for use with the
  154. examples web application. They are wrapped in a comment and thus are ignored
  155. when reading this file. If you wish to configure these users for use with the
  156. examples web application, do not forget to remove the <!.. ..> that surrounds
  157. them. You will also need to set the passwords to something appropriate.
  158. -->
  159. <!--
  160. <role rolename="tomcat"/>
  161. <role rolename="role1"/>
  162. <user username="tomcat" password="<must-be-changed>" roles="tomcat"/>
  163. <user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
  164. <user username="role1" password="<must-be-changed>" roles="role1"/>
  165. -->
  166. <role rolename="manager-gui"/>
  167. <role rolename="manager-script"/>
  168. <user username="tomcat" password="s3cret" roles="manager-gui" />
  169. <user username="tomcat-script" password="s3cret" roles="manager-script" />
  170.  
  171. </tomcat-users>
Add Comment
Please, Sign In to add comment