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:
winrt::hresult_class_not_registered - AudioEffectDefinition with custom effectI'm trying to create a winrt custom audio effect using this tutorial. #include "MyAudioEffect.g.h" auto effectName = winrt::name_of(); auto effect = … Read More
Error with uno module when using unoconv for file conversion in Python: 'Cannot find a suitable pyuno library' despite venv setupI only have problems with my new project. I want to build a file converter. I am doing this with Python and LibreOffice. I have installed everything… Read More
Python Web scraping [D:websockets.client] > GET %s HTTP/1.1 [D:websockets.client] > %s: %s doesn't show all the resultsI'm trying to make web scraping with Python 3.10, and the library requests-HTML 0.10.0. I attach the code: from requests_html import HTMLSession ur… Read More
How to Locate and Interact with Elements Inside Shadow DOM and iframe in Selenium?I am trying to scrape a website which has Shadow DOM and iframe. As you can see in the image I can't find any selector for the Shadow DOM so I can get… Read More
Why does emptyArray.every() return true in Javascript?Why emptyArray.every() returns true? It doesn´t make sense to me because there is no element which you can apply the callBackFunction on? Example: l… Read More
0 comments:
Post a Comment
Thanks