Uploaded image for project: 'Community Support - Open Source Project Repository Hosting'
  1. Community Support - Open Source Project Repository Hosting
  2. OSSRH-45918

Consistent java.net.SocketException: Connection reset during POST /service/local/staging/profiles/e789115b6c941/finish

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Labels:

      Description

      When publishing our project, we're consistently getting java.net.SocketException: Connection reset.

      Maven Version: 3.5.4
      nexus-staging-maven-plugin Version: 1.6.8

      What we know:

      • The reset always occurs at the same step: POST /service/local/staging/profiles/e789115b6c941/finish HTTP/1.1
      • The reset occurs within a second of the POST being sent.
      • The reset does not happen when it is just one module of our project. It's only when we're publishing the whole (large) project that it occurs.
      • The reset happens even if we disable -DautoReleaseAfterClose=true

      What we see:

      [DEBUG] >> \"POST /service/local/staging/profiles/e789115b6c941/finish HTTP/1.1\\r \\n\"\n"
      [DEBUG] >> \"Content-Type: application/xml; charset=UTF-8\\r \\n\"\n"
      [DEBUG] >> \"Accept: application/xml; charset=UTF-8\\r \\n\"\n"
      [DEBUG] >> \"Content-Length: 178\\r \\n\"\n"
      [DEBUG] >> \"Host: oss.sonatype.org:443\\r \\n\"\n"
      [DEBUG] >> \"Connection: Keep-Alive\\r \\n\"\n"
      [DEBUG] >> \"User-Agent: Nexus-Client/2.14.3-02\\r \\n\"\n"
      [DEBUG] >> \"\\r \\n\"\n"
      [DEBUG] >> POST /service/local/staging/profiles/e789115b6c941/finish HTTP/1.1\n"
      [DEBUG] >> Content-Type: application/xml; charset=UTF-8\n"
      [DEBUG] >> Accept: application/xml; charset=UTF-8\n"
      [DEBUG] >> Content-Length: 178\n"
      [DEBUG] >> Host: oss.sonatype.org:443\n"
      [DEBUG] >> Connection: Keep-Alive\n"
      [DEBUG] >> User-Agent: Nexus-Client/2.14.3-02\n"
      [DEBUG] >> Authorization: XXXXX\n"
      [DEBUG] >> \"<promoteRequest><data><stagedRepositoryId>softwareamazon-1412</stagedRepositoryId><description>software.amazon.awssdk:aws-sdk-java-pom:2.3.1</description></data></promoteRequest>\"\n"
      Jan 12, 2019 3:42:57 AM com.sun.jersey.api.client.filter.LoggingFilter log\n"
      INFO: 6 * Client out-bound request\n"
      6 > POST https://oss.sonatype.org:443/service/local/staging/profiles/e789115b6c941/finish\n"
      6 > Content-Type: application/xml; charset=UTF-8\n"
      6 > Accept: application/xml; charset=UTF-8\n"
      <promoteRequest><data><stagedRepositoryId>softwareamazon-1412</stagedRepositoryId><description>software.amazon.awssdk:aws-sdk-java-pom:2.3.1</description></data></promoteRequest>\n"
      \n"
      [DEBUG] Connection 0.0.0.0:55004<->54.226.35.221:443 closed\n"
      [DEBUG] Closing the connection.\n"
      [DEBUG] Connection 0.0.0.0:55004<->54.226.35.221:443 closed\n"
      [DEBUG] Connection 0.0.0.0:55004<->54.226.35.221:443 shut down\n"
      [DEBUG] Connection 0.0.0.0:55004<->54.226.35.221:443 closed\n"
      [DEBUG] Connection released: [id: 197][route:{s}->https://oss.sonatype.org:443[total] kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]\n"
      [ERROR] Remote staging finished with a failure: java.net.SocketException: Connection reset\n"

      What we expect:

      [DEBUG] >> POST /service/local/staging/profiles/e789115b6c941/finish HTTP/1.1
      [DEBUG] >> Content-Type: application/xml; charset=UTF-8
      [DEBUG] >> Accept: application/xml; charset=UTF-8
      [DEBUG] >> Content-Length: 178
      [DEBUG] >> Host: oss.sonatype.org:443
      [DEBUG] >> Connection: Keep-Alive
      [DEBUG] >> User-Agent: Nexus-Client/2.14.3-02
      [DEBUG] >> Authorization: XXXXX
      [DEBUG] >> "<promoteRequest><data><stagedRepositoryId>softwareamazon-1452</stagedRepositoryId><description>software.amazon.awssdk:aws-sdk-java-pom:2.3.8</des
      cription></data></promoteRequest>"
      [INFO] 6 * Client out-bound request
      6 > POST https://oss.sonatype.org:443/service/local/staging/profiles/e789115b6c941/finish
      6 > Content-Type: application/xml; charset=UTF-8
      6 > Accept: application/xml; charset=UTF-8
      <promoteRequest><data><stagedRepositoryId>softwareamazon-1452</stagedRepositoryId><description>software.amazon.awssdk:aws-sdk-java-pom:2.3.8</description></da
      ta></promoteRequest>

      [DEBUG] << "HTTP/1.1 201 Created[\r][\n]"
      [DEBUG] << "Date: Fri, 25 Jan 2019 03:34:27 GMT[\r][\n]"
      [DEBUG] << "Content-Length: 0[\r][\n]"
      [DEBUG] << "Connection: keep-alive[\r][\n]"
      [DEBUG] << "Server: nginx[\r][\n]"
      [DEBUG] << "X-Frame-Options: SAMEORIGIN[\r][\n]"
      [DEBUG] << "X-Content-Type-Options: nosniff[\r][\n]"
      [DEBUG] << "[\r][\n]"
      [DEBUG] Receiving response: HTTP/1.1 201 Created
      [DEBUG] << HTTP/1.1 201 Created
      [DEBUG] << Date: Fri, 25 Jan 2019 03:34:27 GMT
      [DEBUG] << Content-Length: 0
      [DEBUG] << Connection: keep-alive
      [DEBUG] << Server: nginx
      [DEBUG] << X-Frame-Options: SAMEORIGIN
      [DEBUG] << X-Content-Type-Options: nosniff

      Full stack trace:

       [ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project release-scripts: Remote staging failed: java.net.SocketException: Connection reset -> [Help 1]\n"
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project release-scripts: Remote staging failed: java.net.SocketException: Connection reset\n"
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)\n"
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)\n"
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)\n"
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)\n"
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)\n"
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)\n"
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)\n"
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)\n"
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)\n"
      at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)\n"
      at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)\n"
      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)\n"
      at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)\n"
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)\n"
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)\n"
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)\n"
      at java.lang.reflect.Method.invoke (Method.java:498)\n"
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)\n"
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)\n"
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)\n"
      at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)\n"
      Caused by: org.apache.maven.plugin.MojoExecutionException: Remote staging failed: java.net.SocketException: Connection reset\n"
      at org.sonatype.nexus.maven.staging.deploy.DeployMojo.execute (DeployMojo.java:216)\n"
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)\n"
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)\n"
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)\n"
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)\n"
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)\n"
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)\n"
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)\n"
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)\n"
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)\n"
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)\n"
      at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)\n"
      at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)\n"
      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)\n"
      at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)\n"
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)\n"
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)\n"
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)\n"
      at java.lang.reflect.Method.invoke (Method.java:498)\n"
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)\n"
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)\n"
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)\n"
      at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)\n"
      Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Remote staging failed: java.net.SocketException: Connection reset\n"
      at org.sonatype.nexus.maven.staging.deploy.strategy.StagingDeployStrategy.finalizeDeploy (StagingDeployStrategy.java:155)\n"
      at org.sonatype.nexus.maven.staging.deploy.DeployMojo.execute (DeployMojo.java:213)\n"
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)\n"
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)\n"
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)\n"
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)\n"
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)\n"
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)\n"
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)\n"
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)\n"
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)\n"
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)\n"
      at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)\n"
      at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)\n"
      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)\n"
      at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)\n"
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)\n"
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)\n"
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)\n"
      at java.lang.reflect.Method.invoke (Method.java:498)\n"
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)\n"
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)\n"
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)\n"
      at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)\n"
      Caused by: com.sun.jersey.api.client.ClientHandlerException: java.net.SocketException: Connection reset\n"
      at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle (ApacheHttpClient4Handler.java:184)\n"
      at com.sun.jersey.api.client.filter.LoggingFilter.handle (LoggingFilter.java:183)\n"
      at org.sonatype.sisu.siesta.client.filters.RequestFilters.handle (RequestFilters.java:48)\n"
      at com.sun.jersey.api.client.Client.handle (Client.java:648)\n"
      at com.sun.jersey.api.client.WebResource.voidHandle (WebResource.java:704)\n"
      at com.sun.jersey.api.client.WebResource.access$400 (WebResource.java:74)\n"
      at com.sun.jersey.api.client.WebResource$Builder.post (WebResource.java:553)\n"
      at com.sonatype.nexus.staging.client.internal.StagingWorkflowV2ServiceImpl$7.perform (StagingWorkflowV2ServiceImpl.java:203)\n"
      at com.sonatype.nexus.staging.client.internal.StagingWorkflowV2ServiceImpl$7.perform (StagingWorkflowV2ServiceImpl.java:200)\n"
      at com.sonatype.nexus.staging.client.
      at com.sun.jersey.api.client.WebResource.voidHandle (WebResource.java:704)\n"
      at com.sun.jersey.api.client.WebResource.access$400 (WebResource.java:74)\n"
      at com.sun.jersey.api.client.WebResource$Builder.post (WebResource.java:553)\n"
      at com.sonatype.nexus.staging.client.internal.StagingWorkflowV2ServiceImpl$7.perform (StagingWorkflowV2ServiceImpl.java:203)\n"
      at com.sonatype.nexus.staging.client.internal.StagingWorkflowV2ServiceImpl$7.perform (StagingWorkflowV2ServiceImpl.java:200)\n"
      at com.sonatype.nexus.staging.client.internal.ExceptionConverter.runAndReturn (ExceptionConverter.java:38)\n"
      at com.sonatype.nexus.staging.client.internal.StagingWorkflowV2ServiceImpl.finishStaging (StagingWorkflowV2ServiceImpl.java:209)\n"
      at org.sonatype.nexus.maven.staging.deploy.strategy.AbstractStagingDeployStrategy.afterUpload (AbstractStagingDeployStrategy.java:202)\n"
      at org.sonatype.nexus.maven.staging.deploy.strategy.StagingDeployStrategy.finalizeDeploy (StagingDeployStrategy.java:129)\n"
      at org.sonatype.nexus.maven.staging.deploy.DeployMojo.execute (DeployMojo.java:213)\n"
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)\n"
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)\n"
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)\n"
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)\n"
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)\n"
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)\n"
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)\n"
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)\n"
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)\n"
      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)\n"
      at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)\n"
      at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)\n"
      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)\n"
      at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)\n"
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)\n"
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)\n"
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)\n"
      at java.lang.reflect.Method.invoke (Method.java:498)\n"
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)\n"
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)\n"
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)\n"
      at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)\n"

        Attachments

          Activity

            People

            Assignee:
            jorlina Joel Orlina
            Reporter:
            amazonwebservices Amazon Web Services
            Last Updated By:
            Joel Orlina
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title