Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-18709

Nexus 3 upgrade agent http client has HTTP socket timeouts tied to Nexus 2 global HTTP connection timeouts

    Details

      Description

      The Nexus 3 migration agent sends HTTP requests to Nexus 2 during HTTP based migration.

      1. GET /service/siesta/migrationagent/repository-changelog
      2. GET /service/siesta/migrationagent/repository-content/
      3. GET /service/siesta/migrationagent/repository-migration/

      Problem

      The socket connection and read timeouts are not set consistently on these outbound requests. Respectively

      1. use Nexus 3 global connection timeout
      2. use Nexus 2 migrated global connection timeout
      3. use Nexus 2 migrated global connection timeout

      The connection timeout set in Nexus 2 is intended for Nexus 2 outbound requests, and is not applicable or desired to be applied to Nexus 3 outbound timeouts, especially for upgrade related HTTP requests.

      The problem this creates is a conflict where the timeouts configured in Nexus 2 are not applicable to timeouts needed by Nexus 3 to successfully complete upgrade.

      Expected

      The HTTP client used for upgrade in Nexus 3 should have an independent socket/connection timeout, not affected by any setting in Nexus 2.

      Evidence

      In the below scenarios, the Nexus 2 time outs are set as follows:

      <connectionTimeout>60000</connectionTimeout>
      <retrievalRetryCount>3</retrievalRetryCount>

      In Nexus 3, the global HTTP connection/read timeout is set to 20 seconds.

      Nexus 3 outbound /service/siesta/migrationagent/repository-changelog requests using the Nexus 3 global connection timeout
      2018-12-17 16:17:45,976-0500 DEBUG [plan-executor-7-thread-2]  admin org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-26: set socket timeout to 20000
      
      2018-12-17 16:17:45,976-0500 DEBUG [plan-executor-7-thread-2]  admin org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-26: set socket timeout to 20000
      
      2018-12-17 16:17:45,976-0500 DEBUG [plan-executor-7-thread-2]  admin org.apache.http.headers - http-outgoing-26 >> GET /service/siesta/migrationagent/repository-changelog?after=000a0000000000000257&limit=100 HTTP/1.1
      
      ...
      2018-12-17 16:17:49,048-0500 DEBUG [plan-executor-7-thread-2]  admin org.apache.http.headers - http-outgoing-26 << Transfer-Encoding: chunked
      
      2018-12-17 16:17:49,048-0500 DEBUG [plan-executor-7-thread-2]  admin org.apache.http.impl.execchain.MainClientExec - Connection can be kept alive for 30000 MILLISECONDS
      
      2018-12-17 16:17:49,051-0500 DEBUG [plan-executor-7-thread-2]  admin org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-26: set socket timeout to 0
      
      
      Nexus 3 outbound /service/siesta/migrationagent/repository-content/ using the Nexus 2 migrated timeout
      2018-12-17 16:17:49,077-0500 DEBUG [change-processing-8-thread-33]  admin org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-26: set socket timeout to 20000
      
      2018-12-17 16:17:49,077-0500 DEBUG [change-processing-8-thread-33]  admin org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-26: set socket timeout to 60000
      
      2018-12-17 16:17:49,077-0500 DEBUG [change-processing-8-thread-33]  admin org.apache.http.impl.execchain.MainClientExec - Executing request GET /service/siesta/migrationagent/repository-content/example.3rdparty.svn/batik/batik/1.0.1/maven-metadata.xml HTTP/1.1
      
      
      Nexus 3 outbound /service/siesta/migrationagent/repository-migration/ using the Nexus 2 migrated timeout
      2018-12-17 16:17:47,628-0500 DEBUG [plan-executor-7-thread-3]  admin org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-12: set socket timeout to 20000
      
      2018-12-17 16:17:47,628-0500 DEBUG [plan-executor-7-thread-3]  admin org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-12: set socket timeout to 60000
      
      2018-12-17 16:17:47,628-0500 DEBUG [plan-executor-7-thread-3]  admin org.apache.http.impl.execchain.MainClientExec - Executing request GET /service/siesta/migrationagent/repository-migration/jboss-public-repository-group/status HTTP/1.1
      
      

        Attachments

          Activity

            People

            Assignee:
            mmartz Michael Martz
            Reporter:
            plynch Peter Lynch
            Last Updated By:
            Peter Lynch Peter Lynch
            Team:
            NXRM - Tron
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title