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.
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
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
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