title: mvn tomcat7:deploy - Cannot invoke Tomcat manager: Broken pipe
body: <p>I'm getting an error trying to deploy the CLIFF .war to my tomcat7 server.
  <a href="https://i.stack.imgur.com/eSOtU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/eSOtU.png" alt="enter image description here"></a> </p>
  
  <p><a href="https://i.stack.imgur.com/J5jP3.png" rel="noreferrer"><img src="https://i.stack.imgur.com/J5jP3.png" alt="enter image description here"></a></p>
  
  <p>[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.1:deploy (default-cli) on project cliff: Cannot invoke Tomcat manager: Connection to <a href="http://localhost:8080" rel="noreferrer">http://localhost:8080</a> refused: Connection refused</p>
  
  <p>OS X 10.10.5
  Apache Tomcat/8.0.24
  JVM 1.8.0_05-b13</p>
  
  <pre><code>David-Laxers-MacBook-Pro:CLIFF davidlaxer$ mvn -version
  Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T09:37:52-08:00)
  Maven home: /Users/davidlaxer/Downloads/apache-maven-3.2.1
  Java version: 1.8.0_05, vendor: Oracle Corporation
  Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre
  Default locale: en_US, platform encoding: UTF-8
  OS name: "mac os x", version: "10.10.5", arch: "x86_64", family: "mac"
  David-Laxers-MacBook-Pro:CLIFF davidlaxer$ 
  
  
  David-Laxers-MacBook-Pro:CLIFF davidlaxer$ sudo mvn tomcat7:deploy -DskipTests
  [INFO] Scanning for projects...
  [INFO] ------------------------------------------------------------------------
  [INFO] Reactor Build Order:
  [INFO] 
  [INFO] CLIFF
  [INFO] common
  [INFO] stanford-entity-extractor
  [INFO] cliff
  [INFO] 
  [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building CLIFF 2.3.0
  [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] &gt;&gt;&gt; tomcat7-maven-plugin:2.1:deploy (default-cli) @ CLIFF &gt;&gt;&gt;
  [INFO] 
  [INFO] &lt;&lt;&lt; tomcat7-maven-plugin:2.1:deploy (default-cli) @ CLIFF &lt;&lt;&lt;
  [INFO] 
  [INFO] --- tomcat7-maven-plugin:2.1:deploy (default-cli) @ CLIFF ---
  [INFO] Skipping non-war project
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building common 2.3.0
  [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] &gt;&gt;&gt; tomcat7-maven-plugin:2.1:deploy (default-cli) @ common &gt;&gt;&gt;
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ common ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] skip non existing resourceDirectory /Users/davidlaxer/CLIFF/common/src/main/resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ common ---
  [INFO] Nothing to compile - all classes are up to date
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ common ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] skip non existing resourceDirectory /Users/davidlaxer/CLIFF/common/src/test/resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ common ---
  [INFO] No sources to compile
  [INFO] 
  [INFO] --- maven-surefire-plugin:2.16:test (default-test) @ common ---
  [INFO] Tests are skipped.
  [INFO] 
  [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ common ---
  [INFO] 
  [INFO] &lt;&lt;&lt; tomcat7-maven-plugin:2.1:deploy (default-cli) @ common &lt;&lt;&lt;
  [INFO] 
  [INFO] --- tomcat7-maven-plugin:2.1:deploy (default-cli) @ common ---
  [INFO] Skipping non-war project
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building stanford-entity-extractor 2.3.0
  [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] &gt;&gt;&gt; tomcat7-maven-plugin:2.1:deploy (default-cli) @ stanford-entity-extractor &gt;&gt;&gt;
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ stanford-entity-extractor ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] Copying 14 resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ stanford-entity-extractor ---
  [INFO] Nothing to compile - all classes are up to date
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ stanford-entity-extractor ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] Copying 23 resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ stanford-entity-extractor ---
  [INFO] Nothing to compile - all classes are up to date
  [INFO] 
  [INFO] --- maven-surefire-plugin:2.16:test (default-test) @ stanford-entity-extractor ---
  [INFO] Tests are skipped.
  [INFO] 
  [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ stanford-entity-extractor ---
  [INFO] 
  [INFO] &lt;&lt;&lt; tomcat7-maven-plugin:2.1:deploy (default-cli) @ stanford-entity-extractor &lt;&lt;&lt;
  [INFO] 
  [INFO] --- tomcat7-maven-plugin:2.1:deploy (default-cli) @ stanford-entity-extractor ---
  [INFO] Skipping non-war project
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building cliff 2.3.0
  [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] &gt;&gt;&gt; tomcat7-maven-plugin:2.1:deploy (default-cli) @ cliff &gt;&gt;&gt;
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ cliff ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] Copying 12 resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ cliff ---
  [INFO] Nothing to compile - all classes are up to date
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ cliff ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] skip non existing resourceDirectory /Users/davidlaxer/CLIFF/webapp/src/test/resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ cliff ---
  [INFO] No sources to compile
  [INFO] 
  [INFO] --- maven-surefire-plugin:2.16:test (default-test) @ cliff ---
  [INFO] Tests are skipped.
  [INFO] 
  [INFO] --- maven-war-plugin:2.2:war (default-war) @ cliff ---
  [INFO] Packaging webapp
  [INFO] Assembling webapp [cliff] in [/Users/davidlaxer/CLIFF/webapp/target/cliff-2.3.0]
  [INFO] Processing war project
  [INFO] Copying webapp resources [/Users/davidlaxer/CLIFF/webapp/src/main/webapp]
  [INFO] Webapp assembled in [1345 msecs]
  [INFO] Building war: /Users/davidlaxer/CLIFF/webapp/target/cliff-2.3.0.war
  [INFO] WEB-INF/web.xml already added, skipping
  [INFO] 
  [INFO] &lt;&lt;&lt; tomcat7-maven-plugin:2.1:deploy (default-cli) @ cliff &lt;&lt;&lt;
  [INFO] 
  [INFO] --- tomcat7-maven-plugin:2.1:deploy (default-cli) @ cliff ---
  [INFO] Deploying war to http://localhost:8080/cliff-2.3.0  
  [INFO] ------------------------------------------------------------------------
  [INFO] Reactor Summary:
  [INFO] 
  [INFO] CLIFF ............................................. SUCCESS [  1.728 s]
  [INFO] common ............................................ SUCCESS [  1.883 s]
  [INFO] stanford-entity-extractor ......................... SUCCESS [  0.265 s]
  [INFO] cliff ............................................. FAILURE [ 11.384 s]
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 15.717 s
  [INFO] Finished at: 2015-08-26T08:07:32-08:00
  [INFO] Final Memory: 12M/81M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.1:deploy (default-cli) on project cliff: Cannot invoke Tomcat manager: Connection to http://localhost:8080 refused: Connection refused -&gt; [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/ConnectException
  [ERROR] 
  [ERROR] After correcting the problems, you can resume the build with the command
  [ERROR]   mvn &lt;goals&gt; -rf :cliff
  </code></pre>
  
  <p>pom.xml:</p>
  
  <pre><code>               &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.tomcat.maven&lt;/groupId&gt;
                          &lt;artifactId&gt;tomcat7-maven-plugin&lt;/artifactId&gt;
                          &lt;version&gt;2.1&lt;/version&gt;
                          &lt;configuration&gt;
                                  &lt;server&gt;CliffTomcatServer&lt;/server&gt;
                                  &lt;path&gt;/${project.build.finalName}&lt;/path&gt;
                          &lt;/configuration&gt;
                  &lt;/plugin&gt;
  </code></pre>
  
  <p>~/.m2/settings.xml:</p>
  
  <pre><code>   &lt;server&gt;
        &lt;id&gt;CliffTomcatServer&lt;/id&gt;
        &lt;username&gt;cliff&lt;/username&gt;
        &lt;password&gt;beer&lt;/password&gt;
      &lt;/server&gt;
  </code></pre>
  
  <p>/usr/local/apache-tomcat-8.0.24/conftomcat_users.xml:</p>
  
  <pre><code>&lt;tomcat-users&gt;
  &lt;role rolename="manager"/&gt;
    &lt;role rolename="manager-gui"/&gt;
    &lt;role rolename="manager-script"/&gt;
    &lt;user username="cliff" password="beer" roles="manager,manager-gui,manager-script"/&gt;
  </code></pre>
  
  <p>Added to pom.xlm: <a href="http://localhost:8080/manager/text" rel="noreferrer">http://localhost:8080/manager/text</a></p>
  
  <pre><code>[INFO] Deploying war to http://localhost:8080/cliff-2.3.0  
  Uploading: http://localhost:8080/manager/text/deploy?path=%2Fcliff-2.3.0
  2052/127150 KB   
  [INFO] I/O exception (java.net.SocketException) caught when processing request: Broken pipe
  [INFO] Retrying request
  Uploading: http://localhost:8080/manager/text/deploy?path=%2Fcliff-2.3.0
  2356/127150 KB   
  [INFO] I/O exception (java.net.SocketException) caught when processing request: Broken pipe
  [INFO] Retrying request
  Uploading: http://localhost:8080/manager/text/deploy?path=%2Fcliff-2.3.0
  2052/127150 KB   
  [INFO] I/O exception (java.net.SocketException) caught when processing request: Broken pipe
  [INFO] Retrying request
  Uploading: http://localhost:8080/manager/text/deploy?path=%2Fcliff-2.3.0
  2156/127150 KB   
  [INFO] ------------------------------------------------------------------------
  [INFO] Reactor Summary:
  [INFO] 
  [INFO] CLIFF ............................................. SUCCESS [  1.523 s]
  [INFO] common ............................................ SUCCESS [  1.718 s]
  [INFO] stanford-entity-extractor ......................... SUCCESS [  0.359 s]
  [INFO] cliff ............................................. FAILURE [ 12.664 s]
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 16.735 s
  [INFO] Finished at: 2015-08-26T11:04:23-08:00
  [INFO] Final Memory: 12M/81M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.1:deploy (default-cli) on project cliff: Cannot invoke Tomcat manager: Broken pipe -&gt; [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
  [ERROR] 
  [ERROR] After correcting the problems, you can resume the build with the command
  [ERROR]   mvn &lt;goals&gt; -rf :cliff
  David-Laxers-MacBook-Pro:CLIFF davidlaxer$ 
  </code></pre>