Maven connection reset in AWS instance

436 views Asked by At

My Maven build is running in AWS instance and it was able to download the required dependencies but at the end it is failing because of the below issue. Can anyone please suggest what is going wrong?

Note: We are not using Settings.xml file

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-jar-plugin:2.4:jar (default-jar) on project someproject: Execution default-jar of goal org.apache.maven.plugins:maven-jar-plugin:2.4:jar failed: Plugin org.apache.maven.plugins:maven-jar-plugin:2.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-jar-plugin:jar:2.4 -> org.apache.maven:maven-archiver:jar:2.5: Failed to read artifact descriptor for org.apache.maven:maven-archiver:jar:2.5: Could not transfer artifact org.apache.maven:maven-archiver:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): Connection reset -> [Help 1]

Full Stack Track Trace:

> > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
> > org.apache.maven.plugins:maven-jar-plugin:2.4:jar (default-jar) on project someproject: Execution default-jar of goal
> > org.apache.maven.plugins:maven-jar-plugin:2.4:jar failed: Plugin >  org.apache.maven.plugins:maven-jar-plugin:2.4 or one of its
> dependencies could not be resolved: Failed to collect dependencies at
> > org.apache.maven.plugins:maven-jar-plugin:jar:2.4 -> org.apache.maven:maven-archiver:jar:2.5    at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
>   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:863)  at
> org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)   at
> org.apache.maven.cli.MavenCli.main(MavenCli.java:199)     at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)     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.PluginExecutionException: Execution
> default-jar of goal org.apache.maven.plugins:maven-jar-plugin:2.4:jar
> failed: Plugin org.apache.maven.plugins:maven-jar-plugin:2.4 or one of
> its dependencies could not be resolved: Failed to collect dependencies
> at org.apache.maven.plugins:maven-jar-plugin:jar:2.4 ->
> org.apache.maven:maven-archiver:jar:2.5   at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
>   at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
>   ... 20 more Caused by:
> org.apache.maven.plugin.PluginResolutionException: Plugin
> org.apache.maven.plugins:maven-jar-plugin:2.4 or one of its
> dependencies could not be resolved: Failed to collect dependencies at
> org.apache.maven.plugins:maven-jar-plugin:jar:2.4 ->
> org.apache.maven:maven-archiver:jar:2.5   at
> org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal(DefaultPluginDependenciesResolver.java:214)
>   at
> org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:149)
>   at
> org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm(DefaultMavenPluginManager.java:400)
>   at
> org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm(DefaultMavenPluginManager.java:372)
>   at
> org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm(DefaultBuildPluginManager.java:231)
>   at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:102)
>   ... 21 more Caused by:
> org.eclipse.aether.collection.DependencyCollectionException: Failed to
> collect dependencies at
> org.apache.maven.plugins:maven-jar-plugin:jar:2.4 ->
> org.apache.maven:maven-archiver:jar:2.5   at
> org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:291)
>   at
> org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:316)
>   at
> org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal(DefaultPluginDependenciesResolver.java:202)
>   ... 26 more Caused by:
> org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to
> read artifact descriptor for org.apache.maven:maven-archiver:jar:2.5
>   at
> org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:282)
>   at
> org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:198)
>   at
> org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:535)
>   at
> org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:519)
>   at
> org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:409)
>   at
> org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)
>   at
> org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:351)
>   at
> org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:254)
>   ... 28 more Caused by:
> org.eclipse.aether.resolution.ArtifactResolutionException: Could not
> transfer artifact org.apache.maven:maven-archiver:pom:2.5 from/to
> central (https://repo.maven.apache.org/maven2): Connection reset  at
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
>   at
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
>   at
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
>   at
> org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267)
>   ... 35 more Caused by:
> org.eclipse.aether.transfer.ArtifactTransferException: Could not
> transfer artifact org.apache.maven:maven-archiver:pom:2.5 from/to
> central (https://repo.maven.apache.org/maven2): Connection reset  at
> org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
>   at
> org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
>   at
> org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
>   at
> org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
>   at
> org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
>   at
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
>   at
> org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
>   ... 38 more Caused by:
> org.apache.maven.wagon.TransferFailedException: Connection reset  at
> org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:1066)
>   at
> org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:960)
>   at
> org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
>   at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
>   at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)  at
> org.eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunner.run(WagonTransporter.java:560)
>   at
> org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:427)
>   at
> org.eclipse.aether.transport.wagon.WagonTransporter.get(WagonTransporter.java:404)
>   at
> org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
>   at
> org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
>   ... 43 more Caused by: java.net.SocketException: Connection reset   at
> java.net.SocketInputStream.read(SocketInputStream.java:209)   at
> java.net.SocketInputStream.read(SocketInputStream.java:141)   at
> sun.security.ssl.InputRecord.readFully(InputRecord.java:465)  at
> sun.security.ssl.InputRecord.read(InputRecord.java:503)   at
> sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)     at
> sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:930)
>   at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)    at
> org.apache.maven.wagon.providers.http.httpclient.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:136)
>   at
> org.apache.maven.wagon.providers.http.httpclient.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:152)
>   at
> org.apache.maven.wagon.providers.http.httpclient.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:270)
>   at
> org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
>   at
> org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
>   at
> org.apache.maven.wagon.providers.http.httpclient.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:260)
>   at
> org.apache.maven.wagon.providers.http.httpclient.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:161)
>   at
> org.apache.maven.wagon.providers.http.httpclient.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:153)
>   at
> org.apache.maven.wagon.providers.http.httpclient.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:271)
>   at
> org.apache.maven.wagon.providers.http.httpclient.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
>   at
> org.apache.maven.wagon.providers.http.httpclient.impl.execchain.MainClientExec.execute(MainClientExec.java:254)
>   at
> org.apache.maven.wagon.providers.http.httpclient.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
>   at
> org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec.execute(RetryExec.java:86)
>   at
> org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
>   at
> org.apache.maven.wagon.providers.http.httpclient.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
>   at
> org.apache.maven.wagon.providers.http.httpclient.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
>   at
> org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:832)
>   at
> org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:983)
>   ... 52 more
0

There are 0 answers