Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build jib:build #2404

Closed
dharmishra opened this issue Apr 15, 2020 · 6 comments
Closed

Unable to build jib:build #2404

dharmishra opened this issue Apr 15, 2020 · 6 comments

Comments

@dharmishra
Copy link

dharmishra commented Apr 15, 2020

Environment:

Jib version: 2.1.0
Build tool: Maven
OS: Mac Windows
Repository: Nexus
Description of the issue:

I have insecure nexus registry for now and trying to push it and pushing it with property sendCredentialsOverHttp=true but push always times out

Expected behavior:

Should be able to push

jib-gradle-plugin Configuration:

<plugin>
				<groupId>com.google.cloud.tools</groupId>
				<artifactId>jib-maven-plugin</artifactId>
				<version>2.1.0</version>
				<configuration>
					<from>
						<image>localnexusregistry:5006/adoptopenjdk/openjdk11:alpine-jre</image>
					</from>
					<to>
						<image>
							localnexusregistry:5006/demo/service:latest
						</image>
					</to>
					<container>
						<creationTime>${maven.build.timestamp}</creationTime>
					</container>
					<allowInsecureRegistries>true</allowInsecureRegistries>
				</configuration>
			</plugin>

Running following command to build

mvn  compile jib:build -DsendCredentialsOverHttp

Log output:

[INFO] --- jib-maven-plugin:2.1.0:build (default-cli) @ service ---
[WARNING] Authentication over HTTP is enabled. It is strongly recommended that you do not enable this on a public network!
[INFO]
[INFO] Containerizing application to localnexusregistry:5006/demo/service...
[WARNING] Base image 'localnexusregistry:5006/adoptopenjdk/openjdk11:alpine-jre' does not use a specific image digest - build may not be reproducible
[INFO] Using credentials from Maven settings file for localnexusregistry:5006/demo/service
[WARNING] Cannot verify server at https://localnexusregistry:5006/v2/adoptopenjdk/openjdk11/manifests/alpine-jre. Attempting again with no TLS verification.
[WARNING] Cannot verify server at https://localnexusregistry:5006/v2/. Attempting again with no TLS verification.
[WARNING] Failed to connect to https://localnexusregistry:5006/v2/ over HTTPS. Attempting again with HTTP.
[WARNING] Failed to connect to https://localnexusregistry:5006/v2/adoptopenjdk/openjdk11/manifests/alpine-jre over HTTPS. Attempting again with HTTP.
[INFO] Using base image with digest: sha256:2a8b467376cc0a995cdfe257e7b5d3c9ffa67dc24f9a06e2ea167ea0b1b446e5
[INFO]
[INFO] Container entrypoint set to [java, -cp, /app/resources:/app/classes:/app/libs/*, com.dh.ServiceApplication]
[ERROR] I/O error for image [localnexusregistry:5006/demo/service]:
[ERROR]     java.net.SocketTimeoutException
[ERROR]     Read timed out
[ERROR] I/O error for image [localnexusregistry:5006/demo/service]:
[ERROR]     java.net.SocketTimeoutException
[ERROR]     Read timed out
[ERROR] I/O error for image [localnexusregistry:5006/demo/service]:
[ERROR]     java.net.SocketTimeoutException
[ERROR]     Read timed out
[ERROR] I/O error for image [localnexusregistry:5006/demo/service]:
[ERROR]     java.net.SocketException
[ERROR]     Connection reset by peer: socket write error
[INFO] Executing tasks:
[INFO] [=======================       ] 77.8% complete
[INFO] > launching layer pushers
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

Note: I am able to push image manually however whenever i tries with jib plugin facing this issue

@chanseokoh
Copy link
Member

Hi @dharmishra,

Looks like Jib doesn't have any issue checking and pulling the base image localnexusregistry:5006/adoptopenjdk/openjdk11:alpine-jre, so at least this confirms that Jib can communicate with your Nexus registry in general. I suspect it is genuine timeout when pushing? How long does the build take before failing? And you can try increasing Jib HTTP timeout.

@dharmishra
Copy link
Author

dharmishra commented Apr 16, 2020

Hi @chanseokoh

I had tried with jib http timeout but getting the following exception

Exception

garbled output (click to expand)
mvn compile -DsendCredentialsOverHttp -Djib.httpTimeout=0 jib:build
[INFO] Scanning for projects...
[INFO]
[INFO]
[INFO] --- jib-maven-plugin:2.1.0:build (default-cli) @ service ---
[WARNING] Authentication over HTTP is enabled. It is strongly recommended that you do not enable this on a public network!
[INFO]
[INFO] Containerizing application to localnexusregistry:5006/demo/service...
[WARNING] Base image 'localnexusregistry:5006/adoptopenjdk/openjdk11:alpine-jre' does not use a specific image digest - build may not be reproducible
[INFO] Using credentials from Maven settings file for localnexusregistry:5006/demo/service
[WARNING] Cannot verify server at https://localnexusregistry:5006/v2/adoptopenjdk/openjdk11/manifests/alpine-jre. Attempting again with no TLS verification.
[WARNING] Cannot verify server at https://localnexusregistry:5006/v2/. Attempting again with no TLS verification.
[WARNING] Failed to connect to https://localnexusregistry:5006/v2/adoptopenjdk/openjdk11/manifests/alpine-jre over HTTPS. Attempting again with HTTP.
[WARNING] Failed to connect to https://localnexusregistry:5006/v2/ over HTTPS. Attempting again with HTTP.
[INFO] Using base image with digest: sha256:2a8b467376cc0a995cdfe257e7b5d3c9ffa67dc24f9a06e2ea167ea0b1b446e5
[INFO]
[INFO] Container entrypoint set to [java, -cp, /app/resources:/app/classes:/app/libs/*, com.dh.ServiceApplication]
[INFO] Executing tasks:
[INFO] [=====================         ] 68.9% complete
[INFO] > pushing blob sha256:26ecb3bf2f466f26f40ea31c3...
[INFO] > pushing blob sha256:cd63df684be0196f145db8d2a...
l.NFO] > launching layer pushers                                                         fferImp
o[rg.ERRapOacRh] e.hIt/O tp.impl.ioer.Serssoir onInfporutB iuffemagrImpe [nexuscoe.rjli.rlea.d(Seril.com:5ssionInput006/partneranBuaflfyerItmplics.j/davaev:20ice-5s)al
es      a-servti ce]or:g.
ap[acIhNFeO.http.i] mpl.iEo.ContxenetcutLinengthInputStreag tasksm:.re
a[dINFO(Con]tentLe ngth[=====InputStream.jav================         ]a 6:1768)
.9      % complaet org.apache.httpte.co
bf[.EofSIenNsoFOrInputSt] ream.read(EofSe> punsorInputStream.jasva:135)hing blob sha256:26ecb3
2f      at org.ap466f26f40eaache.http.conn.EofSe31c3...nsor
.apha256FOStreamo   ooglepi
tionienEt.RRhttp.HttOpRResp]onse.par seAsS tri   java.nng(HtteptRe.spoSnocketEsxe.cejpava:497)
        at cRom.goo]gle .a
t [comINF.googOle]. api.Eclxecuient.tihttp.ng tasks:Htt
pResponseException$[BuiINFlderO.] <i[nit>(=H===ttpR=====es=ponseException=.j====av=====a:164)=         ] 68.9% 
complete        at
 co[m.googleI.NFOapi.client].h ttp.HttpResponseExceptio>n p.ushing blob sha<256:26ecb3bf2f46init>(H6ttf2pRes6ponsefException.40jeaa3v1ca:633)
.       .at com.google.ap.i.client.http.
d[pointECRRORalle] r.java:139)   pushiny  d
  Connection     reaset bt com.ygoogle.clou d.tools.jipb.eer: socket writer eerrogirstr
y.RegistryEndp[ointCaller.Icall(RegistryEndpointCalNFOl] er.java:115)E
ols.jib.actu tcom.googing tale.closuks:d.to
r[egistry.RegisItNFOryClient.callReg] istryEndpoint(RegistryCl[===================== i e n t . jav a:603)
m.goog   ] a68.9% tcomplete co
bva:93)uId.toNoFlOs.] jib> .pushiregngistiblob shra2y56:26ecb3y   tep.j
hLauiINlFdeOr.] stepExse.cPuushLayetirnStegp tasks:.call(Pus
ye[rStIeNFOp.java]: 33)[le.cloud.tools] .j
e====   a=t com.go================ o g l e    ] 7.common.uti2l.concurrent.TrustedListe.n6% comapbleFutureTask$TrustleetdeFutureInterruptibleTask.runInterruptibly(TrustedListenabl
b[utuIrNeFTOas]k .jav>a :p1u2s5hi)ng 
m:5006/paat ERRjOaRva.]b aseI//jOa vear.rutoirl .fcoorn ciumrargee nt.ThreadPoolExecutor$Worker.run(Th[rneeadxPoolExecuustcoor.e.rjjiava:l.628)ril.co
ce-sales-service]:ics/deat java.base/java.lang.Threavd.run(Thread.java:834)i

[ERROR]     java.net.SocketException
[ERROR]     Socket closed
[INFO] Executing tasks:
[INFO] [=======================       ] 77.3% complete
[INFO] > pushing blob sha256:cd63df684be0196f145db8d2a...
[INFO] > launching layer pushers
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  49.940 s
[INFO] Finished at: 2020-04-16T10:48:44+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.1.0:build (default-cli) on project service: Connection reset by peer: 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

Note
jib:dockerBuild is executing successfully

@chanseokoh
Copy link
Member

(Pass --batch-mode or -Djib.console=plain to prevent the stack trace from being garbled.)

Looks like -Djib.httpTimeout works and you no longer see SocketTimeoutException. It's then only the Connection reset by peer error as before. It's the usual message that the server unilaterally shut down the connection on its side with no explanation. Someone equated this situation to "TCP/IP equivalent of slamming the phone back on the hook. It's more polite than merely not replying, leaving one hanging."

As such, it's unclear and difficult to know on the Jib side why the registry abnormally shuts down the connection. It's weird because I can clearly see that Jib is able to fetch a manifest for the base image on the same Nexus registry. One wild speculation is that, your connection to https://localnexusregistry:5006 is very slow and the registry imposes a short timeout on connections on the server side? I think you should take a look at the registry server log to figure out what's happening and why; it's difficult to speculate on the Jib side.

But at the same time, I'm personally curious to see low-level HTTP requests and responses. Could you follow these instructions to capture network traffic? When configured correctly, you should see HTTP logs like this.

@dharmishra
Copy link
Author

dharmishra commented Apr 17, 2020

Got following exception after applying above mentioned setting

incomplete output without HTTP logs (click to expand)
[DEBUG] =======================================================================
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1545300, ConflictMarker.markTime=699800, ConflictMarker.nodeCount=247, ConflictIdSorter.graphTime=863600, ConflictIdSorter.topsortTime=522900, ConflictIdSorter.conflictIdCount=90, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=13138800, ConflictResolver.conflictItemCount=182, DefaultDependencyCollector.collectTime=1558649000, DefaultDependencyCollector.transformTime=18960000}

[INFO] 
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ service ---
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=132900, ConflictMarker.markTime=59100, ConflictMarker.nodeCount=68, ConflictIdSorter.graphTime=109600, ConflictIdSorter.topsortTime=36700, ConflictIdSorter.conflictIdCount=28, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=581100, ConflictResolver.conflictItemCount=67, DefaultDependencyCollector.collectTime=433562400, DefaultDependencyCollector.transformTime=963500}
[DEBUG] org.apache.maven.plugins:maven-resources-plugin:jar:3.1.0
[DEBUG]    org.apache.maven:maven-plugin-api:jar:3.0:compile
[DEBUG]       org.apache.maven:maven-artifact:jar:3.0:compile
[DEBUG]       org.sonatype.sisu:sisu-inject-plexus:jar:1.4.2:compile
[DEBUG]          org.sonatype.sisu:sisu-inject-bean:jar:1.4.2:compile
[DEBUG]             org.sonatype.sisu:sisu-guice:jar:noaop:2.1.7:compile
[DEBUG]    org.apache.maven:maven-core:jar:3.0:compile
[DEBUG]       org.apache.maven:maven-settings:jar:3.0:compile
[DEBUG]       org.apache.maven:maven-settings-builder:jar:3.0:compile
[DEBUG]       org.apache.maven:maven-repository-metadata:jar:3.0:compile
[DEBUG]       org.apache.maven:maven-model-builder:jar:3.0:compile
[DEBUG]       org.apache.maven:maven-aether-provider:jar:3.0:runtime
[DEBUG]       org.sonatype.aether:aether-impl:jar:1.7:compile
[DEBUG]          org.sonatype.aether:aether-spi:jar:1.7:compile
[DEBUG]       org.sonatype.aether:aether-api:jar:1.7:compile
[DEBUG]       org.sonatype.aether:aether-util:jar:1.7:compile
[DEBUG]       org.codehaus.plexus:plexus-classworlds:jar:2.2.3:compile
[DEBUG]       org.codehaus.plexus:plexus-component-annotations:jar:1.7.1:compile (version managed from default)
[DEBUG]       org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile
[DEBUG]          org.sonatype.plexus:plexus-cipher:jar:1.4:compile
[DEBUG]    org.apache.maven:maven-model:jar:3.0:compile
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:3.1.0:compile
[DEBUG]    org.apache.maven.shared:maven-filtering:jar:3.1.1:compile
[DEBUG]       org.apache.maven.shared:maven-shared-utils:jar:3.0.0:compile
[DEBUG]          com.google.code.findbugs:jsr305:jar:2.0.1:compile
[DEBUG]       org.sonatype.plexus:plexus-build-api:jar:0.0.7:compile
[DEBUG]    commons-io:commons-io:jar:2.5:compile
[DEBUG]    org.codehaus.plexus:plexus-interpolation:jar:1.24:compile
[DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-resources-plugin:3.1.0
[DEBUG] Importing foreign packages into class realm plugin>org.apache.maven.plugins:maven-resources-plugin:3.1.0
[DEBUG]   Imported:  < maven.api
[DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-resources-plugin:3.1.0
[DEBUG]   Included: org.apache.maven.plugins:maven-resources-plugin:jar:3.1.0
[DEBUG]   Included: org.sonatype.sisu:sisu-inject-bean:jar:1.4.2
[DEBUG]   Included: org.sonatype.sisu:sisu-guice:jar:noaop:2.1.7
[DEBUG]   Included: org.sonatype.aether:aether-util:jar:1.7
[DEBUG]   Included: org.codehaus.plexus:plexus-component-annotations:jar:1.7.1
[DEBUG]   Included: org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3
[DEBUG]   Included: org.sonatype.plexus:plexus-cipher:jar:1.4
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.1.0
[DEBUG]   Included: org.apache.maven.shared:maven-filtering:jar:3.1.1
[DEBUG]   Included: org.apache.maven.shared:maven-shared-utils:jar:3.0.0
[DEBUG]   Included: com.google.code.findbugs:jsr305:jar:2.0.1
[DEBUG]   Included: org.sonatype.plexus:plexus-build-api:jar:0.0.7
[DEBUG]   Included: commons-io:commons-io:jar:2.5
[DEBUG]   Included: org.codehaus.plexus:plexus-interpolation:jar:1.24
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-resources-plugin:3.1.0:resources from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-resources-plugin:3.1.0, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@30946e09]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-resources-plugin:3.1.0:resources' with basic configurator -->
[DEBUG]   (f) addDefaultExcludes = true
[DEBUG]   (f) buildFilters = []
[DEBUG]   (s) delimiters = [@]
[DEBUG]   (f) encoding = UTF-8
[DEBUG]   (f) escapeWindowsPaths = true
[DEBUG]   (f) fileNameFiltering = false
[DEBUG]   (s) includeEmptyDirs = false
[DEBUG]   (s) outputDirectory = C:\code-repo\PA-codes\service\target\classes
[DEBUG]   (s) overwrite = false
[DEBUG]   (f) project = MavenProject: com.dh:service:0.0.1-SNAPSHOT @ C:\code-repo\PA-codes\service\pom.xml
[DEBUG]   (s) resources = [Resource {targetPath: null, filtering: true, FileSet {directory: C:\code-repo\PA-codes\service\src\main\resources, PatternSet [includes: {**/application*.yml, **/application*.yaml, **/application*.properties}, excludes: {}]}}, Resource {targetPath: null, filtering: false, FileSet {directory: C:\code-repo\PA-codes\service\src\main\resources, PatternSet [includes: {}, excludes: {**/application*.yml, **/application*.yaml, **/application*.properties}]}}]
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@5d7ca698
[DEBUG]   (f) skip = false
[DEBUG]   (f) supportMultiLineFiltering = false
[DEBUG]   (f) useBuildFilters = true
[DEBUG]   (s) useDefaultDelimiters = false
[DEBUG] -- end configuration --

[INFO] Using 'UTF-8' encoding to copy filtered resources.
[DEBUG] resource with targetPath null
directory C:\code-repo\PA-codes\service\src\main\resources
excludes []
includes [**/application*.yml, **/application*.yaml, **/application*.properties]
[DEBUG] ignoreDelta true
[INFO] Copying 1 resource
[DEBUG] Copying file application.properties
[DEBUG] file application.properties has a filtered file extension
[DEBUG] filtering C:\code-repo\PA-codes\service\src\main\resources\application.properties to C:\code-repo\PA-codes\service\target\classes\application.properties
[DEBUG] resource with targetPath null
directory C:\code-repo\PA-codes\service\src\main\resources
excludes [**/application*.yml, **/application*.yaml, **/application*.properties]
includes []
[DEBUG] ignoreDelta true
[INFO] Copying 1 resource
[DEBUG] Copying file logback-spring.xml
[DEBUG] file logback-spring.xml has a filtered file extension
[DEBUG] copy C:\code-repo\PA-codes\service\src\main\resources\logback-spring.xml to C:\code-repo\PA-codes\service\target\classes\logback-spring.xml
[DEBUG] no use filter components
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ service ---

[INFO] --- jib-maven-plugin:2.1.0:build (default-cli) @ service ---

[DEBUG] TIMING	Authenticating push to localnexusregistry:5006
[INFO] Using credentials from Maven settings file for localnexusregistry:5006/partneranalytics/service
[DEBUG] attempting bearer auth for localnexusregistry:5006/partneranalytics/service...
[WARNING] Cannot verify server at https://localnexusregistry:5006/v2/. Attempting again with no TLS verification.
[WARNING] Failed to connect to https://localnexusregistry:5006/v2/ over HTTPS. Attempting again with HTTP.
[DEBUG] server requires basic auth for localnexusregistry:5006/partneranalytics/service
[DEBUG] configured basic auth for localnexusregistry:5006/partneranalytics/service
[DEBUG] TIMED	Authenticating push to localnexusregistry:5006 : 13757.59 ms
[INFO] Getting manifest for base image localnexusregistry:5006/adoptopenjdk/openjdk11:alpine-jre...
[DEBUG] TIMING	Pulling base image manifest
[WARNING] Cannot verify server at https://localnexusregistry:5006/v2/adoptopenjdk/openjdk11/manifests/alpine-jre. Attempting again with no TLS verification.
[WARNING] Failed to connect to https://localnexusregistry:5006/v2/adoptopenjdk/openjdk11/manifests/alpine-jre over HTTPS. Attempting again with HTTP.
[INFO] Using base image with digest: sha256:2a8b467376cc0a995cdfe257e7b5d3c9ffa67dc24f9a06e2ea167ea0b1b446e5
[DEBUG] TIMED	Pulling base image manifest : 971.982 ms
[DEBUG] TIMING	Preparing base image layer pullers
[DEBUG] TIMED	Preparing base image layer pullers : 0.998 ms
[DEBUG] TIMING	Pulling base image layer sha256:aad63a9339440e7c3e1fff2b988991b9bfb81280042fa7f39a5e327023056819
[DEBUG] Skipping pull; BLOB already exists on target registry : digest: sha256:aad63a9339440e7c3e1fff2b988991b9bfb81280042fa7f39a5e327023056819, size: 2803255
[DEBUG] TIMED	Pulling base image layer sha256:aad63a9339440e7c3e1fff2b988991b9bfb81280042fa7f39a5e327023056819 : 69.003 ms
[DEBUG] TIMING	Pulling base image layer sha256:c9febaa86808b708ce790d9d2e3d6dde4ec368eb836740c7e257b36be22164fb
[DEBUG] Skipping pull; BLOB already exists on target registry : digest: sha256:c9febaa86808b708ce790d9d2e3d6dde4ec368eb836740c7e257b36be22164fb, size: 6284132
[DEBUG] TIMED	Pulling base image layer sha256:c9febaa86808b708ce790d9d2e3d6dde4ec368eb836740c7e257b36be22164fb : 238.761 ms
[DEBUG] TIMING	Pulling base image layer sha256:50b36f8b928511db9b532b985024dd49a942dfab5cd80e1fef90777de51fd863
[DEBUG] Skipping pull; BLOB already exists on target registry : digest: sha256:50b36f8b928511db9b532b985024dd49a942dfab5cd80e1fef90777de51fd863, size: 42932892
[DEBUG] TIMED	Pulling base image layer sha256:50b36f8b928511db9b532b985024dd49a942dfab5cd80e1fef90777de51fd863 : 56.971 ms
[DEBUG] TIMING	Preparing application layer builders
[DEBUG] TIMED	Preparing application layer builders : 2.005 ms
[INFO] Building dependencies layer...
[DEBUG] TIMING	Building dependencies layer
[DEBUG] Building dependencies layer built sha256:fc3c91c215fd92156c6f7330f9b4aad0df848fc96aa172f8717cd22129cd9da4
[DEBUG] TIMED	Building dependencies layer : 1419.99 ms
[INFO] Building resources layer...
[DEBUG] TIMING	Building resources layer
[DEBUG] Building resources layer built sha256:a12b166632f1f681c1c28c571a841a65e75388203b4668c9e62f9827a17766d1
[DEBUG] TIMED	Building resources layer : 243.994 ms
[INFO] Building classes layer...
[DEBUG] TIMING	Building classes layer
[DEBUG] Building classes layer built sha256:dd185ef954fc966241e58d85ff1c7f92c162cf5100be3edcda75d6bb3de8c505
[DEBUG] TIMED	Building classes layer : 81.004 ms
[DEBUG] TIMING	Building container configuration
[INFO] 
[INFO] Container entrypoint set to [java, -cp, /app/resources:/app/classes:/app/libs/*, com.dh.ServiceApplication]
[DEBUG] TIMED	Building container configuration : 1.998 ms
[DEBUG] TIMING	Preparing layer pushers
[DEBUG] TIMED	Preparing layer pushers : 0.993 ms
[DEBUG] TIMING	Preparing layer pushers
[DEBUG] TIMED	Preparing layer pushers : 0.999 ms
[DEBUG] TIMING	Pushing BLOB digest: sha256:fc3c91c215fd92156c6f7330f9b4aad0df848fc96aa172f8717cd22129cd9da4, size: 28058937
[DEBUG] TIMING	pushBlob
[DEBUG] 	TIMING	pushBlob POST sha256:fc3c91c215fd92156c6f7330f9b4aad0df848fc96aa172f8717cd22129cd9da4
[DEBUG] 	TIMED	pushBlob PATCH sha256:fc3c91c215fd92156c6f7330f9b4aad0df848fc96aa172f8717cd22129cd9da4 : 60.02 ms
[ERROR] I/O error for image [localnexusregistry:5006/partneranalytics/service]:
[ERROR]     java.net.SocketException
[ERROR]     Connection reset by peer: socket write error
[DEBUG] 	TIMED	pushBlob POST sha256:fc3c91c215fd92156c6f7330f9b4aad0df848fc96aa172f8717cd22129cd9da4 : 30296.501 ms
[DEBUG] TIMED	pushBlob : 30356.522 ms
[DEBUG] TIMED	Pushing BLOB digest: sha256:fc3c91c215fd92156c6f7330f9b4aad0df848fc96aa172f8717cd22129cd9da4, size: 28058937 : 30603.437 ms
[DEBUG] TIMING	Pushing BLOB digest: sha256:a12b166632f1f681c1c28c571a841a65e75388203b4668c9e62f9827a17766d1, size: 760
[DEBUG] TIMING	pushBlob
[DEBUG] 	TIMING	pushBlob POST sha256:a12b166632f1f681c1c28c571a841a65e75388203b4668c9e62f9827a17766d1
[DEBUG] 	TIMED	pushBlob PATCH sha256:a12b166632f1f681c1c28c571a841a65e75388203b4668c9e62f9827a17766d1 : 66.023 ms
[DEBUG] 	TIMED	pushBlob POST sha256:a12b166632f1f681c1c28c571a841a65e75388203b4668c9e62f9827a17766d1 : 30074.498 ms
[DEBUG] TIMED	pushBlob : 30141.503 ms
[DEBUG] TIMED	Pushing BLOB digest: sha256:a12b166632f1f681c1c28c571a841a65e75388203b4668c9e62f9827a17766d1, size: 760 : 30210.516 ms
[DEBUG] TIMING	Pushing BLOB digest: sha256:dd185ef954fc966241e58d85ff1c7f92c162cf5100be3edcda75d6bb3de8c505, size: 9248
[DEBUG] TIMING	pushBlob
[DEBUG] 	TIMING	pushBlob POST sha256:dd185ef954fc966241e58d85ff1c7f92c162cf5100be3edcda75d6bb3de8c505
[DEBUG] 	TIMED	pushBlob PATCH sha256:dd185ef954fc966241e58d85ff1c7f92c162cf5100be3edcda75d6bb3de8c505 : 89.998 ms
[DEBUG] 	TIMED	pushBlob POST sha256:dd185ef954fc966241e58d85ff1c7f92c162cf5100be3edcda75d6bb3de8c505 : 30266.675 ms
[DEBUG] TIMED	pushBlob : 30356.673 ms
[DEBUG] TIMED	Pushing BLOB digest: sha256:dd185ef954fc966241e58d85ff1c7f92c162cf5100be3edcda75d6bb3de8c505, size: 9248 : 30428.677 ms
[DEBUG] TIMING	Pushing container configuration
[DEBUG] TIMING	Pushing BLOB digest: sha256:7b3bcad7124588bada291db0f2763ff20ff4dadc8d22e088289ee0618abd9df3, size: 6123
[DEBUG] TIMING	pushBlob
[DEBUG] 	TIMING	pushBlob POST sha256:7b3bcad7124588bada291db0f2763ff20ff4dadc8d22e088289ee0618abd9df3
[DEBUG] 	TIMED	pushBlob PATCH sha256:7b3bcad7124588bada291db0f2763ff20ff4dadc8d22e088289ee0618abd9df3 : 737.045 ms
[DEBUG] 	TIMED	pushBlob POST sha256:7b3bcad7124588bada291db0f2763ff20ff4dadc8d22e088289ee0618abd9df3 : 30110.607 ms
[DEBUG] TIMED	pushBlob : 30847.653 ms
[DEBUG] TIMED	Pushing BLOB digest: sha256:7b3bcad7124588bada291db0f2763ff20ff4dadc8d22e088289ee0618abd9df3, size: 6123 : 30962.664 ms
[DEBUG] TIMED	Pushing container configuration : 31011.676 ms
[DEBUG] TIMED	Building and pushing image : 139148.625 ms
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:30 min
[INFO] Finished at: 2020-04-17T12:35:24+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.1.0:build (default-cli) on project service: Connection reset by peer: socket write error -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.1.0:build (default-cli) on project service: Connection reset by peer: socket write error
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Connection reset by peer: socket write error
    at com.google.cloud.tools.jib.maven.BuildImageMojo.execute (BuildImageMojo.java:151)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
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:110)
    at java.net.SocketOutputStream.write (SocketOutputStream.java:150)
    at org.apache.http.impl.io.SessionOutputBufferImpl.streamWrite (SessionOutputBufferImpl.java:124)
    at org.apache.http.impl.io.SessionOutputBufferImpl.flushBuffer (SessionOutputBufferImpl.java:136)
    at org.apache.http.impl.io.SessionOutputBufferImpl.write (SessionOutputBufferImpl.java:167)
    at org.apache.http.impl.io.ChunkedOutputStream.flushCacheWithAppend (ChunkedOutputStream.java:122)
    at org.apache.http.impl.io.ChunkedOutputStream.write (ChunkedOutputStream.java:179)
    at com.google.api.client.util.LoggingOutputStream.write (LoggingOutputStream.java:56)
    at com.google.cloud.tools.jib.http.NotifyingOutputStream.write (NotifyingOutputStream.java:61)
    at java.security.DigestOutputStream.write (DigestOutputStream.java:146)
    at com.google.cloud.tools.jib.hash.CountingDigestOutputStream.write (CountingDigestOutputStream.java:80)
    at com.google.common.io.ByteStreams.copy (ByteStreams.java:112)
    at com.google.cloud.tools.jib.hash.Digests.lambda$computeDigest$2 (Digests.java:85)
    at com.google.cloud.tools.jib.hash.Digests.computeDigest (Digests.java:102)
    at com.google.cloud.tools.jib.hash.Digests.computeDigest (Digests.java:86)
    at com.google.cloud.tools.jib.blob.FileBlob.writeTo (FileBlob.java:39)
    at com.google.cloud.tools.jib.http.BlobHttpContent.writeTo (BlobHttpContent.java:67)
    at com.google.api.client.util.LoggingStreamingContent.writeTo (LoggingStreamingContent.java:63)
    at com.google.api.client.http.apache.v2.ContentEntity.writeTo (ContentEntity.java:67)
    at org.apache.http.impl.execchain.RequestEntityProxy.writeTo (RequestEntityProxy.java:121)
    at org.apache.http.impl.DefaultBHttpClientConnection.sendRequestEntity (DefaultBHttpClientConnection.java:156)
    at org.apache.http.impl.conn.CPoolProxy.sendRequestEntity (CPoolProxy.java:152)
    at org.apache.http.protocol.HttpRequestExecutor.doSendRequest (HttpRequestExecutor.java:238)
    at org.apache.http.protocol.HttpRequestExecutor.execute (HttpRequestExecutor.java:123)
    at org.apache.http.impl.execchain.MainClientExec.execute (MainClientExec.java:272)
    at org.apache.http.impl.execchain.ProtocolExec.execute (ProtocolExec.java:186)
    at org.apache.http.impl.client.InternalHttpClient.doExecute (InternalHttpClient.java:185)
    at org.apache.http.impl.client.CloseableHttpClient.execute (CloseableHttpClient.java:83)
    at org.apache.http.impl.client.CloseableHttpClient.execute (CloseableHttpClient.java:108)
    at org.apache.http.impl.client.CloseableHttpClient.execute (CloseableHttpClient.java:56)
    at com.google.api.client.http.apache.v2.ApacheHttpRequest.execute (ApacheHttpRequest.java:73)
    at com.google.api.client.http.HttpRequest.execute (HttpRequest.java:1012)
    at com.google.cloud.tools.jib.http.FailoverHttpClient.call (FailoverHttpClient.java:317)
    at com.google.cloud.tools.jib.http.FailoverHttpClient.call (FailoverHttpClient.java:233)
    at com.google.cloud.tools.jib.registry.RegistryEndpointCaller.call (RegistryEndpointCaller.java:139)
    at com.google.cloud.tools.jib.registry.RegistryEndpointCaller.call (RegistryEndpointCaller.java:115)
    at com.google.cloud.tools.jib.registry.RegistryClient.callRegistryEndpoint (RegistryClient.java:603)
    at com.google.cloud.tools.jib.registry.RegistryClient.pushBlob (RegistryClient.java:540)
    at com.google.cloud.tools.jib.builder.steps.PushBlobStep.call (PushBlobStep.java:89)
    at com.google.cloud.tools.jib.builder.steps.PushLayerStep.call (PushLayerStep.java:93)
    at com.google.cloud.tools.jib.builder.steps.PushLayerStep.call (PushLayerStep.java:33)
    at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly (TrustedListenableFutureTask.java:125)
    at com.google.common.util.concurrent.InterruptibleTask.run (InterruptibleTask.java:69)
    at com.google.common.util.concurrent.TrustedListenableFutureTask.run (TrustedListenableFutureTask.java:78)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute (MoreExecutors.java:322)
    at java.util.concurrent.AbstractExecutorService.submit (AbstractExecutorService.java:140)
    at com.google.common.util.concurrent.AbstractListeningExecutorService.submit (AbstractListeningExecutorService.java:66)
    at com.google.common.util.concurrent.AbstractListeningExecutorService.submit (AbstractListeningExecutorService.java:36)
    at java.util.stream.ReferencePipeline$3$1.accept (ReferencePipeline.java:195)
    at java.util.Spliterators$ArraySpliterator.forEachRemaining (Spliterators.java:948)
    at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:484)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:474)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential (ReduceOps.java:913)
    at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect (ReferencePipeline.java:578)
    at com.google.cloud.tools.jib.builder.steps.StepsRunner.scheduleCallables (StepsRunner.java:435)
    at com.google.cloud.tools.jib.builder.steps.StepsRunner.lambda$pushApplicationLayers$10 (StepsRunner.java:372)
    at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly (TrustedListenableFutureTask.java:125)
    at com.google.common.util.concurrent.InterruptibleTask.run (InterruptibleTask.java:69)
    at com.google.common.util.concurrent.TrustedListenableFutureTask.run (TrustedListenableFutureTask.java:78)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute (MoreExecutors.java:322)
    at java.util.concurrent.AbstractExecutorService.submit (AbstractExecutorService.java:140)
    at com.google.common.util.concurrent.AbstractListeningExecutorService.submit (AbstractListeningExecutorService.java:66)
    at com.google.common.util.concurrent.AbstractListeningExecutorService.submit (AbstractListeningExecutorService.java:36)
    at com.google.cloud.tools.jib.builder.steps.StepsRunner.pushApplicationLayers (StepsRunner.java:370)
    at java.util.ArrayList.forEach (ArrayList.java:1540)
    at com.google.cloud.tools.jib.builder.steps.StepsRunner.run (StepsRunner.java:197)
    at com.google.cloud.tools.jib.api.Containerizer.run (Containerizer.java:341)
    at com.google.cloud.tools.jib.api.JibContainerBuilder.containerize (JibContainerBuilder.java:480)
    at com.google.cloud.tools.jib.plugins.common.JibBuildRunner.runBuild (JibBuildRunner.java:227)
    at com.google.cloud.tools.jib.maven.BuildImageMojo.execute (BuildImageMojo.java:101)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR] 
[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

May be nexus server is slow that why getting socket reset by peer, will check on that

@chanseokoh
Copy link
Member

The HTTP logs have not been generated. You need to precisely follow the instructions. Double-check the content and the path of logging.properties. Make sure the file is readable.

@chanseokoh
Copy link
Member

Closing as we didn't hear back from the user about getting the HTTP logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants