- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在处理请求时捕获了一个I/O异常(java.net.SocketException):Connection reset by peer: socket write error
问题在使用maven插件部署tomcat时这个问题困扰了我好几天。由于 connection reset by peers
错误,我无法使用 tomcat7:deploy 通过 maven 插件上传我的 war 文件。这是我的 pom.xml 的一部分
<build>
<finalName>Project</finalName>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<server>tomcat</server>
<url>http://myserver/manager/text</url>
<username>admin</username>
<password>admin</password>
<path>/plainart</path>
</configuration>
</plugin>
</plugins>
</pluginManagement>
这是控制台日志
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for cn.edu.xmu.plainart:cn.edu.xmu.plainart:war:0.0.1-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: cglib:cglib:jar -> version ${cglib.version} vs 2.2.2 @ line 89, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cn.edu.xmu.plainart 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.2:deploy (default-cli) > package @ cn.edu.xmu.plainart >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ cn.edu.xmu.plainart ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ cn.edu.xmu.plainart ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ cn.edu.xmu.plainart ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ cn.edu.xmu.plainart ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ cn.edu.xmu.plainart ---
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) @ cn.edu.xmu.plainart ---
[INFO] Packaging webapp
[INFO] Assembling webapp [cn.edu.xmu.plainart] in [C:\Users\Luna\Documents\GitHub\PiedPiper\Project\target\Project]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\Users\Luna\Documents\GitHub\PiedPiper\Project\src\main\webapp]
[INFO] Webapp assembled in [3376 msecs]
[INFO] Building war: C:\Users\Luna\Documents\GitHub\PiedPiper\Project\target\Project.war
[INFO] WEB-INF\web.xml already added, skipping
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.2:deploy (default-cli) < package @ cn.edu.xmu.plainart <<<
[INFO]
[INFO] --- tomcat7-maven-plugin:2.2:deploy (default-cli) @ cn.edu.xmu.plainart ---
[INFO] Deploying war to http://104.236.166.121:8080/plainart
Uploading: http://104.236.166.121:8080/manager/text/deploy?path=%2Fplainart
[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
[INFO] Retrying request
Uploading: http://104.236.166.121:8080/manager/text/deploy?path=%2Fplainart
[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
[INFO] Retrying request
Uploading: http://104.236.166.121:8080/manager/text/deploy?path=%2Fplainart
[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
[INFO] Retrying request
Uploading: http://104.236.166.121:8080/manager/text/deploy?path=%2Fplainart
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 40.818 s
[INFO] Finished at: 2015-12-23T10:51:22+08:00
[INFO] Final Memory: 19M/160M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:deploy (default-cli) on project cn.edu.xmu.plainart: Cannot invoke Tomcat manager: Connection reset by peer: socket write error -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:deploy (default-cli) on project cn.edu.xmu.plainart: Cannot invoke Tomcat manager
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot invoke Tomcat manager
at org.apache.tomcat.maven.plugin.tomcat7.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:141)
at org.apache.tomcat.maven.plugin.tomcat7.AbstractWarCatalinaMojo.execute(AbstractWarCatalinaMojo.java:68)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 20 more
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
at java.net.SocketOutputStream.write(SocketOutputStream.java:159)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.write(AbstractSessionOutputBuffer.java:181)
at org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:115)
at org.apache.tomcat.maven.common.deployer.TomcatManager$RequestEntityImplementation.writeTo(TomcatManager.java:880)
at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:89)
at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:117)
at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:265)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.sendRequestEntity(ManagedClientConnectionImpl.java:203)
at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:236)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:121)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:682)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:486)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.tomcat.maven.common.deployer.TomcatManager.invoke(TomcatManager.java:742)
at org.apache.tomcat.maven.common.deployer.TomcatManager.deployImpl(TomcatManager.java:705)
at org.apache.tomcat.maven.common.deployer.TomcatManager.deploy(TomcatManager.java:388)
at org.apache.tomcat.maven.plugin.tomcat7.deploy.AbstractDeployWarMojo.deployWar(AbstractDeployWarMojo.java:85)
at org.apache.tomcat.maven.plugin.tomcat7.deploy.AbstractDeployMojo.invokeManager(AbstractDeployMojo.java:82)
at org.apache.tomcat.maven.plugin.tomcat7.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:132)
... 23 more
[ERROR]
[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
并且配置了远程tomcat-user.xml。
我不知道如何解决这个问题。如果我可以提供任何对故障排除有用的信息,请告诉我。
提前致谢
最佳答案
试试这些,
使用redeploy代替deploy
tomcat 中的默认 war 大小为 50 MB,如果您的 war 大于 50 MB,请尝试增加它
列出的许多用户导致我在 tomcat-users.xml 中缺少角色。如果缺少,请尝试添加管理脚本角色,Question Link
Tomcat7 插件可能会从 maven conf settings.xml 而不是 .m2\settings.xml 中选取服务器详细信息。在该文件中添加服务器信息可能会解决问题。
关于java - (java.net.SocketException) 在处理请求 : Connection reset by peer: socket write error 时被捕获,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34427901/
每次暂存文件时,如果您需要取消暂存文件,Git 都会提供有用的说明: (use "git reset HEAD ..." to unstage) 不过体面Git Tutorials by Atlass
我需要添加几个文件以将它们组合到一个提交中,但我必须排除其中一个。在 this answer ,执行此操作的代码是: git add -u git reset -- file_to_ignore.da
这个问题在这里已经有了答案: What are typical use cases of git-reset's --merge and --keep flags? (4 个答案) 关闭 6 年前。
有时候,进行了错误的提交,但是还没有push到远程分支,想要撤销本次提交,可以使用git reset –-soft/hard命令。 1、二者区别: git reset –-soft:回退到某个版
我认为:软重置:从重置向量启动。硬复位:拉CPU的电平。 最佳答案 硬复位当然意味着整个CPU芯片及其所有外设都被复位。造成这种情况的原因可能有很多:复位引脚被外部拉高、时钟故障、片内低电压检测、看门
$python manage.py reset Unknown command: 'reset' Type 'manage.py help' for usage. 在django 1.6中是否取消了这
我是 git 的新手,所以问题可能很简单,git reset --hard HEAD 和 git reset --hard 有什么区别? 最佳答案 HEAD 在您未指定该参数时是隐含的。 但是,您可以
我使用 apollo-link-state 来本地存储错误,但清除缓存后出现以下错误。 我已在 apollo 客户端配置选项中将 errors 的默认值设置为空数组 []。 但是,在 apolloCl
我正在使用 bool 数组来存储标志(类似于“已更改”)。数组的大小是静态的,在编译时已知。 我需要定期重置数组,即将所有元素设置为 false。我应该使用常规数组和类似 memset 或 memcp
在 git 文档(和许多 SO 线程)中,推荐使用这种重置方法: $ git reset --soft HEAD^ ;# go back to WIP state $ git reset
在我的实验中,我没能发现两者之间的任何功能差异 git reset --hard 和 git reset --merge 使用说明也没有给出任何提示 --hard res
如何重置所有列过滤器?调用 reset() 似乎重置了表,但过滤器的所有字段保持不变。 最佳答案 您可以将输入值绑定(bind)到表的过滤器,如下所示: 注意 [value] 绑定(bind)。 关
使用 std::unique_ptr::reset,您可以轻松地将您的实例恢复到新状态。 C++11 之前,为了实现类似的行为,我看到很多类都定义了一个 Reset() 方法来重置其所有内部成员。但现
为了恢复工作树和索引中的更改,此答案 ( https://stackoverflow.com/a/5812972/8278160) 建议运行以下命令: git reset --hard 运行它是否与运
我目前正在测试竞技场。我本来以为这段代码会编译,但在运行时失败了,令人惊喜的是,编译器发现了这个问题。但我不知道它的推理是否正确。有人能给我解释一下吗?。错误:。来自umpalo的相关代码:
我目前正在测试竞技场。我本来以为这段代码会编译,但在运行时失败了,令人惊喜的是,编译器发现了这个问题。但我不知道它的推理是否正确。有人能给我解释一下吗?。错误:。来自umpalo的相关代码:
我正在尝试在不触发“重置”事件的情况下重置我的收藏。我已经设置了我的收藏来收听“重置”和“添加”事件 @.listenTo(@options.muses, 'add', @addOne) @.list
根据http://en.cppreference.com/w/cpp/memory/unique_ptr/reset , void reset( pointer ptr = pointer() );
我有一个别名,unstage,用于从暂存区域中删除更改。 unstage = reset -- 我注意到 git 的帮助建议改为 git reset HEAD。我还注意到 git rm --cache
这个问题在这里已经有了答案: What's the difference between HEAD^ and HEAD~ in Git? (17 个答案) 关闭 6 年前。 git reset --
我是一名优秀的程序员,十分优秀!