简体   繁体   English

Maven Web项目在eclipse(tomcat 7)中运行错误:错误:无法调用Tomcat管理器:软件导致连接中止:套接字写入错误

[英]The maven web project runs error in eclipse(tomcat 7):error:Cannot invoke Tomcat manager: Software caused connection abort: socket write error

I use tomcat7,eclipse 4.6.2 and my own maven 3(not the default in eclipse). 我使用的是tomcat7,eclipse 4.6.2和我自己的maven 3(eclipse中不是默认值)。

here is my tomcat_users.xml: 这是我的tomcat_users.xml:

  <role rolename="tomcat"/>
  <role rolename="manager"/>
  <role rolename="manager-gui"/>
  <role rolename="manager-script" />
  <role rolename="admin-gui"/>
  <user username="tomcat" password="tomcat" roles="tomcat,manager,manager-script,admin-gui" />
  <user username="admin" password="admin" roles="manager-gui" />

here is my settings.xml in maven 3: 这是我在Maven 3中的settings.xml:

E:\\apache-maven-3.3.9\\conf\\settings.xml E:\\ Apache的行家-3.3.9 \\的conf \\的settings.xml

<server> 
       <id>tomcat7</id> 
       <username>admin</username> 
       <password>admin</password> 
</server>

the local repository is at C:\\Users\\zhuxiaodong.m2\\repository 本地存储库位于C:\\ Users \\ zhuxiaodong.m2 \\ repository

I create a maven web project called "webapp" and the part of my pom.xml is: 我创建了一个名为“ webapp”的Maven Web项目,而pom.xml的一部分是:

<build>  
       <finalName>webapp</finalName>  
       <plugins>  
            <!-- Eclipse project -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.9</version>
                <configuration>
                    <!-- Always download and attach dependencies source code -->
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>false</downloadJavadocs>
                    <!-- Avoid type mvn eclipse:eclipse -Dwtpversion=2.0 -->
                    <wtpversion>2.0</wtpversion>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <url>http://localhost:8425/manager/text</url>
                    <username>admin</username>
                    <password>admin</password>
                    <server>tomcat7</server>
                    <path>/${project.build.finalName}</path>
                </configuration>
            </plugin> 
       </plugins>  
   </build>
   <repositories>
        <repository> 
            <id>people.apache.snapshots</id> 
            <url> 
                http://repository.apache.org/content/groups/snapshots-group/ 
            </url> 
            <releases> 
                <enabled>false</enabled> 
            </releases> 
            <snapshots> 
                <enabled>true</enabled> 
            </snapshots> 
        </repository> 
    </repositories>

    <pluginRepositories>
        <pluginRepository> 
            <id>apache.snapshots</id> 
            <name>Apache Snapshots</name> 
            <url> 
                http://repository.apache.org/content/groups/snapshots-group/ 
            </url> 
            <releases> 
                <enabled>false</enabled> 
            </releases> 
            <snapshots> 
                <enabled>true</enabled> 
            </snapshots> 
        </pluginRepository>
    </pluginRepositories>

enter image description here And I run the project: 在此处输入图像描述,然后运行项目:

[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:deploy (default-cli) on project webapp: Cannot invoke Tomcat manager: Software caused connection abort: socket write 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

what's wrong? 怎么了? thank you! 谢谢! if the information is not complete,l will show more details. 如果信息不完整,l将显示更多详细信息。 (the project is for testing spring mvc and spring security) (该项目用于测试Spring MVC和Spring安全性)

You can try to use the below bock in Tomcat's server.xml 您可以尝试在Tomcat的server.xml使用以下博克文件

<Connector port="8080" protocol="HTTP/1.1"
           connectionTimeout="20000"
           redirectPort="8443" />

And change the port to 8080 instead of 8425 in your pom.xml 并在pom.xml中将端口更改为8080而不是8425

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用tomcat7-maven-plugin的Tomcat部署失败,并显示错误“无法调用Tomcat管理器:对等重置连接:套接字写入错误” - Tomcat deploy using tomcat7-maven-plugin fails with error “Cannot invoke Tomcat manager: Connection reset by peer: socket write error” 软件导致连接中止:套接字写入错误 - Software caused connection abort: socket write error jvisualvm:软件导致连接中止:套接字写入错误 - jvisualvm: Software caused connection abort: socket write error 软件导致连接异常终止:写入DataOutputStream时套接字写入错误 - Software caused connection abort: socket write error while writing to DataOutputStream “软件导致连接中止:套接字写入错误”的官方原因 - Official reasons for "Software caused connection abort: socket write error" 在FTP中存储ObjectOutputStream导致java.net.SocketException:软件导致连接中止:套接字写入错误 - Store ObjectOutputStream in FTP causes java.net.SocketException: Software caused connection abort: socket write error java.net.SocketException:软件导致连接中止:重新提交请求时套接字写入错误 - java.net.SocketException: Software caused connection abort: socket write error when resubmitting the request javax.servlet.jsp.JspException:无法插入页面…软件导致连接中止:套接字写入错误 - javax.servlet.jsp.JspException: Can't insert page … Software caused connection abort: socket write error 通过串行端口java.net.SocketException的通信:软件导致连接中止:套接字写入错误 - Communication through serial port, java.net.SocketException: Software caused connection abort: socket write error 当我尝试将Maven项目部署到tomcat时出现套接字写入错误 - Socket write error when I try to deploy maven project to tomcat
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM