При сборке проекта Агентом на Windows машине была пролема с загрузкой артефактов на сервер TeamCity.
Что писало в логи. На стороне Агента:
[2023-06-29 00:14:38,450] INFO - jetbrains.buildServer.AGENT - Done: Searching for artifacts to publish, found [1] file [2023-06-29 00:14:38,450] INFO - jetbrains.buildServer.AGENT - Start: Pre-processing artifacts if needed (archiving) [2023-06-29 00:14:38,450] DEBUG - jetbrains.buildServer.AGENT - Files before preprocessing: {C:\BuildAgent\work\78b1c5aa3d08f176\client\Project-1\Build\Android=android_81.zip} [2023-06-29 00:14:38,497] DEBUG - r.agent.impl.AgentLogProxyImpl - Action "2 log messages" performed for build id=302 [2023-06-29 00:14:38,544] DEBUG - r.agent.impl.AgentLogProxyImpl - Call flush command while flush. explicit request from TC: 00:14:38 Executing command Runnable 'Publishing finished task', build with id 302. Current progress: 2/1; 00:14:38 Flush messages for AgentLogProxyImpl::executor; 00:14:38 flush AgentLogProxy; Agent Log Proxy [2023-06-29 00:14:38,591] INFO - ernalArtifactsProcessingLogger - Publishing artifacts process finished [2023-06-29 00:14:38,591] DEBUG - r.agent.impl.AgentLogProxyImpl - Action "Publishing finished task" performed for build id=302 [2023-06-29 00:14:42,513] DEBUG - ldServer.AGENT.PollingProtocol - Asking server for the new command by GET https://new-teamcity.company.com/app/agents/v1/commands/next [2023-06-29 00:14:43,606] DEBUG - r.agent.impl.AgentLogProxyImpl - Flush messages for AgentLogProxyImpl::executor [2023-06-29 00:14:43,606] DEBUG - r.agent.impl.AgentLogProxyImpl - Later executor invocation for 1 remote commands, requestor: AgentLogProxyImpl::executor [2023-06-29 00:14:43,653] DEBUG - r.agent.impl.AgentLogProxyImpl - Action "6 log messages" performed for build id=302 [2023-06-29 00:14:47,841] DEBUG - r.agent.impl.AgentLogProxyImpl - Add message (1): Put "1 log messages" to queue for build id 302 [2023-06-29 00:14:47,841] DEBUG - jetbrains.buildServer.AGENT - Files after preprocessing: {C:\BuildAgent\temp\buildTmp\ZipPreprocessor2060713571344574050\android_81.zip=} [2023-06-29 00:14:47,841] INFO - jetbrains.buildServer.AGENT - Done: Pre-processing artifacts if needed (archiving) [2023-06-29 00:14:47,841] DEBUG - r.agent.impl.AgentLogProxyImpl - Add message (2): Put "Checking ArtifactsPublishingPrecondition MaxSizeInternalBuildCachePublishingPrecondition" to queue for build id 302 [2023-06-29 00:14:47,841] DEBUG - r.agent.impl.AgentLogProxyImpl - Flush messages for AgentLogProxyImpl::executor [2023-06-29 00:14:47,841] DEBUG - r.agent.impl.AgentLogProxyImpl - Later executor invocation for 2 remote commands, requestor: AgentLogProxyImpl::executor [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Action "2 log messages" performed for build id=302 [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Action "Checking ArtifactsPublishingPrecondition MaxSizeInternalBuildCachePublishingPrecondition" performed for build id=302 [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Flush messages for AgentLogProxyImpl::executor [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Later executor invocation for 0 remote commands, requestor: AgentLogProxyImpl::executor [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Add message (1): Put "Checking ArtifactsPublishingPrecondition MaximumNumberOfArtifactsPublishingPrecondition" to queue for build id 302 [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Flush messages for AgentLogProxyImpl::executor [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Later executor invocation for 1 remote commands, requestor: AgentLogProxyImpl::executor [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Action "Checking ArtifactsPublishingPrecondition MaximumNumberOfArtifactsPublishingPrecondition" performed for build id=302 [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Flush messages for AgentLogProxyImpl::executor [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Later executor invocation for 0 remote commands, requestor: AgentLogProxyImpl::executor [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Add message (1): Put "Checking ArtifactsPublishingPrecondition MaximumSizeArtifactsPublishingPrecondition" to queue for build id 302 [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Flush messages for AgentLogProxyImpl::executor [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Later executor invocation for 1 remote commands, requestor: AgentLogProxyImpl::executor [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Action "Checking ArtifactsPublishingPrecondition MaximumSizeArtifactsPublishingPrecondition" performed for build id=302 [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Flush messages for AgentLogProxyImpl::executor [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Later executor invocation for 0 remote commands, requestor: AgentLogProxyImpl::executor [2023-06-29 00:14:47,888] INFO - jetbrains.buildServer.AGENT - Start: Publishing files using WebPublisher [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Add message (1): Put "1 log messages" to queue for build id 302 [2023-06-29 00:14:47,888] INFO - jetbrains.buildServer.AGENT - Start: Publishing files using ArtifactsCachePublisherImpl [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Add message (2): Put "Publishing 1 files to 'android_81.zip'" to queue for build id 302 [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Flush messages for AgentLogProxyImpl::executor [2023-06-29 00:14:47,888] DEBUG - r.agent.impl.AgentLogProxyImpl - Later executor invocation for 2 remote commands, requestor: AgentLogProxyImpl::executor [2023-06-29 00:14:47,935] DEBUG - r.agent.impl.AgentLogProxyImpl - Action "2 log messages" performed for build id=302 [2023-06-29 00:15:09,989] DEBUG - ldServer.AGENT.PollingProtocol - Server answered with status 204 on the next command request GET https://new-teamcity.company.com/app/agents/v1/commands/next, body: [2023-06-29 00:15:09,989] DEBUG - jetbrains.buildServer.AGENT - Agent ping from server [2023-06-29 00:15:14,990] DEBUG - ldServer.AGENT.PollingProtocol - Asking server for the new command by GET https://new-teamcity.company.com/app/agents/v1/commands/next [2023-06-29 00:15:42,504] DEBUG - ldServer.AGENT.PollingProtocol - Server answered with status 204 on the next command request GET https://new-teamcity.company.com/app/agents/v1/commands/next, body: [2023-06-29 00:15:42,504] DEBUG - jetbrains.buildServer.AGENT - Agent ping from server [2023-06-29 00:15:47,517] DEBUG - ldServer.AGENT.PollingProtocol - Asking server for the new command by GET https://new-teamcity.company.com/app/agents/v1/commands/next [2023-06-29 00:16:14,994] DEBUG - ldServer.AGENT.PollingProtocol - Server answered with status 204 on the next command request GET https://new-teamcity.company.com/app/agents/v1/commands/next, body: [2023-06-29 00:16:14,994] DEBUG - jetbrains.buildServer.AGENT - Agent ping from server [2023-06-29 00:16:19,994] DEBUG - ldServer.AGENT.PollingProtocol - Asking server for the new command by GET https://new-teamcity.company.com/app/agents/v1/commands/next [2023-06-29 00:16:47,502] DEBUG - ldServer.AGENT.PollingProtocol - Server answered with status 204 on the next command request GET https://new-teamcity.company.com/app/agents/v1/commands/next, body: [2023-06-29 00:16:47,502] DEBUG - jetbrains.buildServer.AGENT - Agent ping from server [2023-06-29 00:16:48,084] WARN - jetbrains.buildServer.AGENT - Failed to publish artifacts [C:\BuildAgent\temp\buildTmp\ZipPreprocessor2060713571344574050\android_81.zip (size: 189691152)] because of error: java.net.SocketException: Connection reset by peer: socket write error, will try again. [2023-06-29 00:16:48,084] WARN - jetbrains.buildServer.AGENT - Failed to publish artifacts, will try again: jetbrains.buildServer.agent.ArtifactPublishingFailedException: java.net.SocketException: Connection reset by peer: socket write error [2023-06-29 00:16:48,084] DEBUG - jetbrains.buildServer.AGENT - Failed to publish artifacts, will try again jetbrains.buildServer.agent.ArtifactPublishingFailedException: java.net.SocketException: Connection reset by peer: socket write error at jetbrains.buildServer.agent.publisher.WebPublisher.doPublish(WebPublisher.java:276) ~[agent.jar:?] at jetbrains.buildServer.agent.publisher.WebPublisher.splitByPartsAndPublish(WebPublisher.java:127) ~[agent.jar:?] at jetbrains.buildServer.agent.publisher.WebPublisher.publishFilesWithDigests(WebPublisher.java:73) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.artifacts.ArtifactProcessor.lambda$publishWithDigests$2(ArtifactProcessor.java:362) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.artifacts.ArtifactProcessor$4.run(ArtifactProcessor.java:472) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$6.run(AgentLogProxyImpl.java:306) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$RemoteActionPendingCommand.run(AgentLogProxyImpl.java:787) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$LaterExecutorTask.flushMessages(AgentLogProxyImpl.java:629) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$LaterExecutorTask.access$800(AgentLogProxyImpl.java:589) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$LaterExecutorTask$1.run(AgentLogProxyImpl.java:602) ~[agent.jar:?] at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76) ~[common.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$LaterExecutorTask.run(AgentLogProxyImpl.java:599) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$1$1.run(AgentLogProxyImpl.java:115) ~[agent.jar:?] at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76) ~[common.jar:?] at jetbrains.buildServer.util.ExceptionUtil$1.run(ExceptionUtil.java:42) ~[common.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$1.run(AgentLogProxyImpl.java:124) ~[agent.jar:?] at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_372] Caused by: java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) ~[?:1.8.0_372] at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111) ~[?:1.8.0_372] at java.net.SocketOutputStream.write(SocketOutputStream.java:155) ~[?:1.8.0_372] at sun.security.ssl.SSLSocketOutputRecord.deliver(SSLSocketOutputRecord.java:319) ~[?:1.8.0_372] at sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1193) ~[?:1.8.0_372] at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122) ~[?:1.8.0_372] at jetbrains.buildServer.agent.publisher.WebPublisher$LimitedOutputStream.write(WebPublisher.java:430) ~[agent.jar:?] at org.apache.commons.httpclient.methods.multipart.FilePart.sendData(FilePart.java:223) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.methods.multipart.Part.send(Part.java:312) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.methods.multipart.Part.sendParts(Part.java:385) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity.writeRequest(MultipartRequestEntity.java:164) ~[commons-httpclient-3.1.jar:?] at jetbrains.buildServer.agent.publisher.WebPublisher$2.writeRequest(WebPublisher.java:262) ~[agent.jar:?] at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) ~[commons-httpclient-3.1.jar:?] at jetbrains.buildServer.agent.publisher.WebPublisher.doPublish(WebPublisher.java:272) ~[agent.jar:?] ... 16 more [2023-06-29 00:16:48,225] INFO - jetbrains.buildServer.AGENT - Recoverable problem publishing artifacts (will retry): java.net.SocketException: Connection reset by peer: socket write error: jetbrains.buildServer.agent.ArtifactPublishingFailedException: java.net.SocketException: Connection reset by peer: socket write error [2023-06-29 00:16:48,225] DEBUG - jetbrains.buildServer.AGENT - Recoverable problem publishing artifacts (will retry): java.net.SocketException: Connection reset by peer: socket write error jetbrains.buildServer.agent.ArtifactPublishingFailedException: java.net.SocketException: Connection reset by peer: socket write error at jetbrains.buildServer.agent.publisher.WebPublisher.doPublish(WebPublisher.java:276) ~[agent.jar:?] at jetbrains.buildServer.agent.publisher.WebPublisher.splitByPartsAndPublish(WebPublisher.java:127) ~[agent.jar:?] at jetbrains.buildServer.agent.publisher.WebPublisher.publishFilesWithDigests(WebPublisher.java:73) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.artifacts.ArtifactProcessor.lambda$publishWithDigests$2(ArtifactProcessor.java:362) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.artifacts.ArtifactProcessor$4.run(ArtifactProcessor.java:472) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$6.run(AgentLogProxyImpl.java:306) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$RemoteActionPendingCommand.run(AgentLogProxyImpl.java:787) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$LaterExecutorTask.flushMessages(AgentLogProxyImpl.java:629) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$LaterExecutorTask.access$800(AgentLogProxyImpl.java:589) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$LaterExecutorTask$1.run(AgentLogProxyImpl.java:602) ~[agent.jar:?] at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76) ~[common.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$LaterExecutorTask.run(AgentLogProxyImpl.java:599) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$1$1.run(AgentLogProxyImpl.java:115) ~[agent.jar:?] at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76) ~[common.jar:?] at jetbrains.buildServer.util.ExceptionUtil$1.run(ExceptionUtil.java:42) ~[common.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$1.run(AgentLogProxyImpl.java:124) ~[agent.jar:?] at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_372] Caused by: java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) ~[?:1.8.0_372] at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111) ~[?:1.8.0_372] at java.net.SocketOutputStream.write(SocketOutputStream.java:155) ~[?:1.8.0_372] at sun.security.ssl.SSLSocketOutputRecord.deliver(SSLSocketOutputRecord.java:319) ~[?:1.8.0_372] at sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1193) ~[?:1.8.0_372] at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122) ~[?:1.8.0_372] at jetbrains.buildServer.agent.publisher.WebPublisher$LimitedOutputStream.write(WebPublisher.java:430) ~[agent.jar:?] at org.apache.commons.httpclient.methods.multipart.FilePart.sendData(FilePart.java:223) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.methods.multipart.Part.send(Part.java:312) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.methods.multipart.Part.sendParts(Part.java:385) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity.writeRequest(MultipartRequestEntity.java:164) ~[commons-httpclient-3.1.jar:?] at jetbrains.buildServer.agent.publisher.WebPublisher$2.writeRequest(WebPublisher.java:262) ~[agent.jar:?] at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) ~[commons-httpclient-3.1.jar:?] at jetbrains.buildServer.agent.publisher.WebPublisher.doPublish(WebPublisher.java:272) ~[agent.jar:?] ... 16 more [2023-06-29 00:16:48,225] INFO - jetbrains.buildServer.AGENT - Will re-try artifact publishing in 975ms: jetbrains.buildServer.agent.ArtifactPublishingFailedException: java.net.SocketException: Connection reset by peer: socket write error [2023-06-29 00:16:48,225] DEBUG - jetbrains.buildServer.AGENT - Will re-try artifact publishing in 975ms jetbrains.buildServer.agent.ArtifactPublishingFailedException: java.net.SocketException: Connection reset by peer: socket write error at jetbrains.buildServer.agent.publisher.WebPublisher.doPublish(WebPublisher.java:276) ~[agent.jar:?] at jetbrains.buildServer.agent.publisher.WebPublisher.splitByPartsAndPublish(WebPublisher.java:127) ~[agent.jar:?] at jetbrains.buildServer.agent.publisher.WebPublisher.publishFilesWithDigests(WebPublisher.java:73) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.artifacts.ArtifactProcessor.lambda$publishWithDigests$2(ArtifactProcessor.java:362) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.artifacts.ArtifactProcessor$4.run(ArtifactProcessor.java:472) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$6.run(AgentLogProxyImpl.java:306) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$RemoteActionPendingCommand.run(AgentLogProxyImpl.java:787) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$LaterExecutorTask.flushMessages(AgentLogProxyImpl.java:629) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$LaterExecutorTask.access$800(AgentLogProxyImpl.java:589) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$LaterExecutorTask$1.run(AgentLogProxyImpl.java:602) ~[agent.jar:?] at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76) ~[common.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$LaterExecutorTask.run(AgentLogProxyImpl.java:599) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$1$1.run(AgentLogProxyImpl.java:115) ~[agent.jar:?] at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76) ~[common.jar:?] at jetbrains.buildServer.util.ExceptionUtil$1.run(ExceptionUtil.java:42) ~[common.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$1.run(AgentLogProxyImpl.java:124) ~[agent.jar:?] at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_372] Caused by: java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) ~[?:1.8.0_372] at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111) ~[?:1.8.0_372] at java.net.SocketOutputStream.write(SocketOutputStream.java:155) ~[?:1.8.0_372] at sun.security.ssl.SSLSocketOutputRecord.deliver(SSLSocketOutputRecord.java:319) ~[?:1.8.0_372] at sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1193) ~[?:1.8.0_372] at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122) ~[?:1.8.0_372] at jetbrains.buildServer.agent.publisher.WebPublisher$LimitedOutputStream.write(WebPublisher.java:430) ~[agent.jar:?] at org.apache.commons.httpclient.methods.multipart.FilePart.sendData(FilePart.java:223) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.methods.multipart.Part.send(Part.java:312) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.methods.multipart.Part.sendParts(Part.java:385) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity.writeRequest(MultipartRequestEntity.java:164) ~[commons-httpclient-3.1.jar:?] at jetbrains.buildServer.agent.publisher.WebPublisher$2.writeRequest(WebPublisher.java:262) ~[agent.jar:?] at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) ~[commons-httpclient-3.1.jar:?] at jetbrains.buildServer.agent.publisher.WebPublisher.doPublish(WebPublisher.java:272) ~[agent.jar:?] ... 16 more [2023-06-29 00:16:49,213] INFO - r.agent.impl.AgentLogProxyImpl - Failed to perform remote command 'Publishing 1 files to 'android_81.zip'' for build with id 302, error: jetbrains.buildServer.agent.ArtifactPublishingFailedException: java.net.SocketException: Connection reset by peer: socket write error: jetbrains.buildServer.agent.ArtifactPublishingFailedException: java.net.SocketException: Connection reset by peer: socket write error [2023-06-29 00:16:49,213] DEBUG - r.agent.impl.AgentLogProxyImpl - Failed to perform remote command 'Publishing 1 files to 'android_81.zip'' for build with id 302, error: jetbrains.buildServer.agent.ArtifactPublishingFailedException: java.net.SocketException: Connection reset by peer: socket write error jetbrains.buildServer.agent.ArtifactPublishingFailedException: java.net.SocketException: Connection reset by peer: socket write error at jetbrains.buildServer.agent.publisher.WebPublisher.doPublish(WebPublisher.java:276) ~[agent.jar:?] at jetbrains.buildServer.agent.publisher.WebPublisher.splitByPartsAndPublish(WebPublisher.java:127) ~[agent.jar:?] at jetbrains.buildServer.agent.publisher.WebPublisher.publishFilesWithDigests(WebPublisher.java:73) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.artifacts.ArtifactProcessor.lambda$publishWithDigests$2(ArtifactProcessor.java:362) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.artifacts.ArtifactProcessor$4.run(ArtifactProcessor.java:472) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$6.run(AgentLogProxyImpl.java:306) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$RemoteActionPendingCommand.run(AgentLogProxyImpl.java:787) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$LaterExecutorTask.flushMessages(AgentLogProxyImpl.java:629) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$LaterExecutorTask.access$800(AgentLogProxyImpl.java:589) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$LaterExecutorTask$1.run(AgentLogProxyImpl.java:602) ~[agent.jar:?] at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76) ~[common.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$LaterExecutorTask.run(AgentLogProxyImpl.java:599) ~[agent.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$1$1.run(AgentLogProxyImpl.java:115) ~[agent.jar:?] at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:76) ~[common.jar:?] at jetbrains.buildServer.util.ExceptionUtil$1.run(ExceptionUtil.java:42) ~[common.jar:?] at jetbrains.buildServer.agent.impl.AgentLogProxyImpl$1.run(AgentLogProxyImpl.java:124) ~[agent.jar:?] at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_372] Caused by: java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) ~[?:1.8.0_372] at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111) ~[?:1.8.0_372] at java.net.SocketOutputStream.write(SocketOutputStream.java:155) ~[?:1.8.0_372] at sun.security.ssl.SSLSocketOutputRecord.deliver(SSLSocketOutputRecord.java:319) ~[?:1.8.0_372] at sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1193) ~[?:1.8.0_372] at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122) ~[?:1.8.0_372] at jetbrains.buildServer.agent.publisher.WebPublisher$LimitedOutputStream.write(WebPublisher.java:430) ~[agent.jar:?] at org.apache.commons.httpclient.methods.multipart.FilePart.sendData(FilePart.java:223) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.methods.multipart.Part.send(Part.java:312) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.methods.multipart.Part.sendParts(Part.java:385) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity.writeRequest(MultipartRequestEntity.java:164) ~[commons-httpclient-3.1.jar:?] at jetbrains.buildServer.agent.publisher.WebPublisher$2.writeRequest(WebPublisher.java:262) ~[agent.jar:?] at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) ~[commons-httpclient-3.1.jar:?] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) ~[commons-httpclient-3.1.jar:?] at jetbrains.buildServer.agent.publisher.WebPublisher.doPublish(WebPublisher.java:272) ~[agent.jar:?] ... 16 more [2023-06-29 00:16:49,213] INFO - r.agent.impl.AgentLogProxyImpl - Adding ping and re-register command on top of the remote command queue [2023-06-29 00:16:49,213] DEBUG - ade.AgentVersionControllerImpl - Loading agent versions file from: C:\BuildAgent\system\.teamcity-agent\teamcity-agent.xml
На стороне сервера:
Recoverable problem publishing artifacts (will retry): java.net.SocketException: Connection reset by peer: socket write error
Да, тут по короче =) В интернете причину данной проблемы в основном связывали с превышенеим размера файла, который Агнет пытается загрузить на сервер. В настройка TeamCity стоял нерграниченный размер, что сбивало с толку почему проблема всё же осталась. Оказалось, что это был ngixn. Он не пропускал файлы большого размера. Чтобы решеть данную проблему касательно nginx, надо добавить ему в конфигурацию вот такие строки:
#http { proxy_read_timeout 1200; proxy_connect_timeout 240; client_max_body_size 0; #}
У меня они вынесены в отдельный файл conf.d/teamcity_additional.conf, но можно прописать непосредственно в конфигурации настройки конретного хоста-домена. Подсказку нашёл тут — https://blog.vijay.name/2020/02/setting-up-teamcity-as-ci-cd-on-self-hosted-server-with-reverse-proxy-nginx/