- Run the npm install command to install the npm package from the npm remote repository in the Artifactory.
- Trace the debug logs to check npm install requests.
- The artifactory-request.log shows the npm install request consumes 10960ms.
# artifactory-request.log 2023-11-30T08:31:42.355Z|aa01d51dfc3bf331|<client_ip>|anonymous|GET|/api/npm/npmmirror-npm-remote/@codemirror/language/-/language-6.9.3.tgz|200|-1|78469|10960|npm/6.14.17 node/v14.21.2 linux x64
- The artifactory-service.log shows the redirect timeout error.
023-11-30T08:31:41.507Z [1;32m[jfrt ][0;39m [1;31m[ERROR][0;39m [aa01d51dfc3bf331] [FrogDefaultRedirectStrategy:66] [ttp-nio-8081-exec-26] - Unable to determine if redirect should be blocked because of the following: Timed out while trying to resolve cdn.npmmirror.com./ANY, id=23074 2023-11-30T08:31:41.508Z [1;32m[jfrt ][0;39m [39m[DEBUG][0;39m [aa01d51dfc3bf331] [FrogDefaultRedirectStrategy:68] [ttp-nio-8081-exec-26] - Unable to determine if redirect should be blocked because of the following: java.io.IOException: Timed out while trying to resolve cdn.npmmirror.com./ANY, id=23074 at org.xbill.DNS.Resolver.send(Resolver.java:170) at org.jfrog.client.util.DenylistValidator.getSupportedType(DenylistValidator.java:154) at org.jfrog.client.util.DenylistValidator.isBlocked(DenylistValidator.java:85) at org.jfrog.client.http.JFrogDefaultRedirectStrategy.shouldBlockRedirect(JFrogDefaultRedirectStrategy.java:64) at org.jfrog.client.http.JFrogDefaultRedirectStrategy.isRedirected(JFrogDefaultRedirectStrategy.java:53) .....
- Checking the artifactory-http.log we can get the job sending the request to https://registry.npmmirror.com at first and the target address returns the 302 status which means a redirect to the download address to https://cdn.npmmirror.com.
# artifactory-http.log # the request: 2023-11-30T08:31:31.410Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.c.p.RequestAuthCache:77 ] [ttp-nio-8081-exec-26] - Auth cache not set in the context 2023-11-30T08:31:31.411Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [ttpClientConnectionManager:267] [ttp-nio-8081-exec-26] - Connection request: [route: {s}->https://registry.npmmirror.com:443][total available: 7; route allocated: 7 of 50; total allocated: 7 of 50] 2023-11-30T08:31:31.411Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [ttpClientConnectionManager:312] [ttp-nio-8081-exec-26] - Connection leased: [id: 19603][route: {s}->https://registry.npmmirror.com:443][total available: 6; route allocated: 7 of 50; total allocated: 7 of 50] 2023-11-30T08:31:31.411Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [ManagedHttpClientConnection:88] [ttp-nio-8081-exec-26] - http-outgoing-19603: set socket timeout to 30000 2023-11-30T08:31:31.411Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [ManagedHttpClientConnection:88] [ttp-nio-8081-exec-26] - http-outgoing-19603: set socket timeout to 30000 2023-11-30T08:31:31.411Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.i.e.MainClientExec:255 ] [ttp-nio-8081-exec-26] - Executing request GET /@codemirror/language/-/language-6.9.3.tgz HTTP/1.1 2023-11-30T08:31:31.411Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.i.e.MainClientExec:260 ] [ttp-nio-8081-exec-26] - Target auth state: UNCHALLENGED 2023-11-30T08:31:31.412Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.i.e.MainClientExec:266 ] [ttp-nio-8081-exec-26] - Proxy auth state: UNCHALLENGED 2023-11-30T08:31:31.412Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:133 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 >> GET /@codemirror/language/-/language-6.9.3.tgz HTTP/1.1 2023-11-30T08:31:31.412Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:136 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 >> Connection: Keep-Alive 2023-11-30T08:31:31.412Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:136 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 >> X-Artifactory-Originated: 3c5d0a5882bf4c5e:-7723215e:18c0f6701bf:-8000 2023-11-30T08:31:31.412Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:136 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 >> Origin-Artifactory: 3c5d0a5882bf4c5e:-7723215e:18c0f6701bf:-8000 2023-11-30T08:31:31.412Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:136 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 >> Accept-Encoding: gzip 2023-11-30T08:31:31.412Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:136 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 >> uber-trace-id: aa01d51dfc3bf331:aa01d51dfc3bf331:aa01d51dfc3bf331:0 2023-11-30T08:31:31.413Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:136 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 >> Host: registry.npmmirror.com 2023-11-30T08:31:31.413Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:136 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 >> User-Agent: Artifactory/7.71.3 77103900 .... # the response: 2023-11-30T08:31:31.501Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:122 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << HTTP/1.1 302 Moved Temporarily 2023-11-30T08:31:31.501Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << Server: Tengine 2023-11-30T08:31:31.501Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << Content-Type: text/html; charset=utf-8 2023-11-30T08:31:31.501Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << Content-Length: 195 2023-11-30T08:31:31.501Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << Connection: keep-alive 2023-11-30T08:31:31.502Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << Strict-Transport-Security: max-age=5184000 2023-11-30T08:31:31.502Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << Date: Thu, 30 Nov 2023 08:31:31 GMT 2023-11-30T08:31:31.502Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << Vary: Origin 2023-11-30T08:31:31.502Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << request-id: dd1bcf80-8f5a-11ee-a794-8d17105837ca 2023-11-30T08:31:31.502Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << Location: https://cdn.npmmirror.com/packages/%40codemirror/language/6.9.3/language-6.9.3.tgz 2023-11-30T08:31:31.502Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << x-frame-options: SAMEORIGIN 2023-11-30T08:31:31.502Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << x-xss-protection: 1; mode=block 2023-11-30T08:31:31.503Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << x-download-options: noopen 2023-11-30T08:31:31.503Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << x-readtime: 0.731 2023-11-30T08:31:31.503Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << Via: cn5222.l1, kunlun12.cn5222, l2cn3084.l2, cache12.l2cn3084, registry.npmmirror.com-06, cache12.l2cn3084[32,31,302-0,M], cache26.l2cn3084[33,0], kunlun12.cn5222[47,47,302-0,M], kunlun4.cn5222[50,0] 2023-11-30T08:31:31.503Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << Ali-Swift-Global-Savetime: 1701333091 2023-11-30T08:31:31.504Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << X-Cache: MISS TCP_MISS dirn:-2:-2 2023-11-30T08:31:31.504Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << X-Swift-SaveTime: Thu, 30 Nov 2023 08:31:31 GMT 2023-11-30T08:31:31.505Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << X-Swift-CacheTime: 0 2023-11-30T08:31:31.506Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << Timing-Allow-Origin: * 2023-11-30T08:31:31.506Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.headers:125 ] [ttp-nio-8081-exec-26] - http-outgoing-19603 << EagleId: b659c00417013330914226683e 2023-11-30T08:31:31.506Z [jfrt ] [DEBUG] [aa01d51dfc3bf331] [o.a.h.i.e.MainClientExec:285 ] [ttp-nio-8081-exec-26] - Connection can be kept alive for 30000 MILLISECONDS