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:
Beautiful Log Viewer for Laravel Laravel Log Viewer is a fast and beautiful Log Viewer written by Arunas Skirius:Log Viewer supports multiple logs! You can see si… Read More
Mail SPF Checker for Laravel The Laravel Mail SPF Checker is a package to check if you can send an e-mail through a given mail server in the name of a given e-mail… Read More
A PHP SDK for the Dolby API PHP SDK for the Dolby API is a PHP package by Andréia Bohner that provides a wrapper around the Dolby API:For example, Dolby… Read More
Laravel Notification Log Laravel Notification Log is a package by Spatie to log notifications your Laravel app sends. This will allow you to query notification… Read More
Import Laravel Vapor DNS to Cloudflare Orrison/Cumulus is an open-source package that works with Laravel Vapor to allow the user to manage their DNS records better when using Clo… Read More
0 comments:
Post a Comment
Thanks