I am using a Nexus (3.69.0 oss) Docker image with Maven, npm, and Docker repositories feeded in it. This image needed to be deployed across different environment and use as an artifact central.
For Maven and Docker, it is working fine.
But when it comes to npm, when I use the Nexus container with these image on my local machine without internet access, everything works as expected., However, when I run the same setup in another environment(aws ec2 with 8CPU,32GB RAM), also without internet access, I encounter issues with npm.
Specifically, npm takes about five minutes to retrieve a single package. The npm repository is a combination of both proxy(2k dependencies) and hosted repositories(7 artifacts), and I have artifacts stored in both. Despite this, I am seeing significant delays.
To install a single package, it is taking around 4-5 minutes. instead, 1-2 seconds in local.
I have confirmed that npm ping works correctly, and I can download npm artifacts using wget with no problems. However, npm install is where the issue occurs.
Could you please help me understand why this is happening and how it can be resolved?
In logs also I cannot see any., regarding delays.,
Configuration details:
some packages are in hosted repo, and some are in proxy cached, I kept negative cache to 0, and turned off it, meatda age and max component ages to -1., to use the caching always…No routing rules, and no firewalls enabled etc.
and this is the data that I am using in to create proxy npm repo:
{
“name”: “‘$npm_proxy_repository_name’”,
“online”: true,
“storage”: {
“blobStoreName”: “default”,
“strictContentTypeValidation”: true
},
“cleanup”: {
“policyNames”: [
“string”
]
},
“proxy”: {
“remoteUrl”: “
https://registry.npmjs.org”,
/>
“contentMaxAge”: -1,
“metadataMaxAge”: -1
},
“negativeCache”: {
“enabled”: false,
“timeToLive”: 0
},
“httpClient”: {
“blocked”: false,
“autoBlock”: false,
“connection”: {
“retries”: 10,
“userAgentSuffix”: null,
“timeout”: 120,
“enableCircularRedirects”: false,
“enableCookies”: false,
“useTrustStore”: false
},
“authentication”: null
},
“routingRule”: “string”,
“replication”: {
“preemptivePullEnabled”: false,
“assetPathRegex”: “string”
},
“npm”: {
“removeNonCataloged”: false,
“removeQuarantined”: false
}
}
It’s a mysterious question still for us , why it is working in local mcahine, not in the aws server,
FYI, using the nexus server and npm client server, both are in same machine
Sonatype Nexus OSS 3.69.0 Npm Issue
Programing Coderfunda
September 08, 2024
No comments
Related Posts:
How to Sort Multi-dimensional Array by Value? Active … Read More
Cannot use object of type stdClass as array? Cannot use object of type stdClass as array? 563 94 … Read More
How to Fix ‘This version of this file is not compatible with the version of Windows you’re running’ Error on Windows? Windows is one of the most popular operating systems out there with more than a billion users. All of this success comes due to the numerous fea… Read More
blade route laravel “blade route laravel” Code AnswerRoute::get('user/profile', [UserProfileController::class, 'show'])->name('profile');Source: laravel.com… Read More
Ajax LARAVEL 419 POST error QuestionI would really appreciate some help on this. I tried tons of solutions as posted in this forum, but I cannot get it to work.My ajax call… Read More
0 comments:
Post a Comment
Thanks