Comments (10)
please provide debug output, see Enable Debug Mode and post the full log
also please provide what environment you are running your pipeline in (like node:12
or node:12-debian
). it would also be helpful if you could provide the full output of the commands in Distribution Support.
in addition you could also try to upgrade to mongodb-memory-server 9.0
from mongodb-memory-server.
@hasezoey: Please find the required details.
Using node:18.18.2_alpine3.18.4 docker image in pipeline
Got only below logs:
DownloadError: Download failed for url "https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-5.0.19.tgz", Details:
Status Code is 403 (MongoDB's 404)
This means that the requested version-platform combination doesn't exist
Try to use different version 'new MongoMemoryServer({ binary: { version: 'X.Y.Z' } })'
List of available versions can be found here: https://www.mongodb.com/download-center/community/releases/archive
at RedirectableRequest.<anonymous> (/builds/mainstream-eng-cloud/bff-rfq/node_modules/mongodb-memory-server-core/src/util/MongoBinaryDownload.ts:426:17)
at RedirectableRequest.emit (node:events:517:28)
at RedirectableRequest.emit (node:domain:489:12)
at RedirectableRequest.Object.<anonymous>.RedirectableRequest._processResponse (/builds/mainstream-eng-cloud/bff-rfq/node_modules/follow-redirects/index.js:368:10)
at ClientRequest.RedirectableRequest._onNativeResponse (/builds/mainstream-eng-cloud/bff-rfq/node_modules/follow-redirects/index.js:65:10)
at Object.onceWrapper (node:events:632:26)
at ClientRequest.emit (node:events:529:35)
at ClientRequest.emit (node:domain:489:12)
at HTTPParser.parserOnIncomingClient (node:_http_client:700:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
at TLSSocket.socketOnData (node:_http_client:541:22)
at TLSSocket.emit (node:events:517:28)
at TLSSocket.emit (node:domain:489:12)
at addChunk (node:internal/streams/readable:335:12)
at readableAddChunk (node:internal/streams/readable:308:9)
at TLSSocket.Readable.push (node:internal/streams/readable:245:10) {
url: 'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-5.0.19.tgz',
msg: "Status Code is 403 (MongoDB's 404)\n" +
"This means that the requested version-platform combination doesn't exist\n" +
"Try to use different version 'new MongoMemoryServer({ binary: { version: 'X.Y.Z' } })'\n" +
'List of available versions can be found here: https://www.mongodb.com/download-center/community/releases/archive'
}
at MongoMemoryServer.<anonymous> (node_modules/mongodb-memory-server-core/src/MongoMemoryServer.ts:293:17)
at node_modules/mongodb-memory-server-core/node_modules/tslib/tslib.js:169:75
at __awaiter (node_modules/mongodb-memory-server-core/node_modules/tslib/tslib.js:165:16)
at node_modules/mongodb-memory-server-core/src/MongoMemoryServer.ts:284:68
from mongodb-memory-server.
Tried with "mongodb-memory-server": "9.0.X", but getting below error for that.
ENOENT: no such file or directory, open 'node:http'
from mongodb-memory-server.
Got only below logs:
there should be more logs if debug mode is enabled starting with a line of MongoMS:resolveConfig: Debug Mode Enabled
Tried with "mongodb-memory-server": "9.0.X", but getting below error for that.
ENOENT: no such file or directory, open 'node:http'
this should be supported for a long time, could you provide more error backtrace?
Using node:18.18.2_alpine3.18.4 docker image in pipeline
alpine
is completely unsupported because mongodb does not have any binaries for that and there are no known working binaries that could be used instead (like on arch you can use the ubuntu binaries), please use ubuntu or debian nodejs images.
from mongodb-memory-server.
Found these log:
There is no offical build of MongoDB for Alpine!
at MongoBinaryDownloadUrl.getLinuxOSVersionString (node_modules/mongodb-memory-server-core/src/util/MongoBinaryDownloadUrl.ts:239:15)
at MongoBinaryDownloadUrl.<anonymous> (node_modules/mongodb-memory-server-core/src/util/MongoBinaryDownloadUrl.ts:173:23)
at node_modules/mongodb-memory-server-core/node_modules/tslib/tslib.js:169:75
at __awaiter (node_modules/mongodb-memory-server-core/node_modules/tslib/tslib.js:165:16)
at MongoBinaryDownloadUrl.getArchiveNameLinux (node_modules/mongodb-memory-server-core/lib/util/MongoBinaryDownloadUrl.js:126:38)
at MongoBinaryDownloadUrl.<anonymous> (node_modules/mongodb-memory-server-core/src/util/MongoBinaryDownloadUrl.ts:94:21)
at node_modules/mongodb-memory-server-core/node_modules/tslib/tslib.js:169:75
at __awaiter (node_modules/mongodb-memory-server-core/node_modules/tslib/tslib.js:165:16)
at MongoBinaryDownloadUrl.getArchiveName (node_modules/mongodb-memory-server-core/lib/util/MongoBinaryDownloadUrl.js:55:38)
at MongoBinaryDownloadUrl.<anonymous> (node_modules/mongodb-memory-server-core/src/util/MongoBinaryDownloadUrl.ts:56:32)
at node_modules/mongodb-memory-server-core/node_modules/tslib/tslib.js:169:75
at __awaiter (node_modules/mongodb-memory-server-core/node_modules/tslib/tslib.js:165:16)
at MongoBinaryDownloadUrl.getDownloadUrl (node_modules/mongodb-memory-server-core/lib/util/MongoBinaryDownloadUrl.js:30:38)
at MongoBinaryDownload.<anonymous> (node_modules/mongodb-memory-server-core/src/util/MongoBinaryDownload.ts:170:38)
at fulfilled (node_modules/mongodb-memory-server-core/node_modules/tslib/tslib.js:166:62)
console.warn
Unknown/unsupported linux "alpine(undefined)". Falling back to legacy MongoDB build!
at MongoBinaryDownloadUrl.getLinuxOSVersionString (node_modules/mongodb-memory-server-core/src/util/MongoBinaryDownloadUrl.ts:270:13)
at MongoBinaryDownloadUrl.<anonymous> (node_modules/mongodb-memory-server-core/src/util/MongoBinaryDownloadUrl.ts:173:23)
at node_modules/mongodb-memory-server-core/node_modules/tslib/tslib.js:169:75
at __awaiter (node_modules/mongodb-memory-server-core/node_modules/tslib/tslib.js:165:16)
at MongoBinaryDownloadUrl.getArchiveNameLinux (node_modules/mongodb-memory-server-core/lib/util/MongoBinaryDownloadUrl.js:126:38)
at MongoBinaryDownloadUrl.<anonymous> (node_modules/mongodb-memory-server-core/src/util/MongoBinaryDownloadUrl.ts:94:21)
at node_modules/mongodb-memory-server-core/node_modules/tslib/tslib.js:169:75
at __awaiter (node_modules/mongodb-memory-server-core/node_modules/tslib/tslib.js:165:16)
at MongoBinaryDownloadUrl.getArchiveName (node_modules/mongodb-memory-server-core/lib/util/MongoBinaryDownloadUrl.js:55:38)
at MongoBinaryDownloadUrl.<anonymous> (node_modules/mongodb-memory-server-core/src/util/MongoBinaryDownloadUrl.ts:56:32)
at node_modules/mongodb-memory-server-core/node_modules/tslib/tslib.js:169:75
at __awaiter (node_modules/mongodb-memory-server-core/node_modules/tslib/tslib.js:165:16)
at MongoBinaryDownloadUrl.getDownloadUrl (node_modules/mongodb-memory-server-core/lib/util/MongoBinaryDownloadUrl.js:30:38)
at MongoBinaryDownload.<anonymous> (node_modules/mongodb-memory-server-core/src/util/MongoBinaryDownload.ts:170:38)
at fulfilled (node_modules/mongodb-memory-server-core/node_modules/tslib/tslib.js:166:62)
from mongodb-memory-server.
This was working fine till Oct 31, 2023 on alpine linux and started failing automatically.
Also observed that there is one url received in error which is not accessible and it return 403 status in pipeline.
DownloadError: Download failed for url "https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-5.0.19.tgz", Details:
Status Code is 403 (MongoDB's 404)
from mongodb-memory-server.
i dont know why the alpine build was working before and not now anymore, but to my knowledge there has never been a working alpine build on mongodb's archives.
please use node's debian or ubuntu images.
from mongodb-memory-server.
Issue is resolved now.
from mongodb-memory-server.
I'm very late to the party but ran into a similar issue today trying to download the database tools in a Docker file. So I want to help anyone searching frustrated the web for a solution or an explanation.
In the end, my curl command was faulty. I forgot to add a space between the url in quotations and the parameter -o
.
Wrong: curl "http://example.com"-o "myfile.deb"
Correct curl "http://example.com" -o "myfile.deb"
from mongodb-memory-server.
@YannikG, what has your comment to do with this issue? this project does not make use of curl or have a curl mentioned workaround.
from mongodb-memory-server.
Related Issues (20)
- [SOLUTION] Jest and Fake Timers HOT 1
- Amazon EC2 instance download failed, combination does not exist (403) HOT 4
- "getport" sometimes throwing an error HOT 41
- Weird "db.watch" issue HOT 1
- postinstallHelper always installs to $HOME/.cache instead of node_modules/.cache HOT 6
- Enabling debug mode through package.json does not work HOT 3
- Randomizing db names for each test
- GridFS streams not working correctly HOT 4
- Jest + mongodb-memory-server + mongoose - Calling 'find' hangs indefinitely HOT 2
- Invalid version reported for version strings ending in -latest HOT 2
- Ubuntu >= 22.04 is unsupported when using MongoDB >= 6.0.4 HOT 7
- _startUpInstance threw a Error: TypeError: (intermediate value).finally is not a function HOT 3
- Mongod instance closed with code "127" HOT 7
- Case: InMemory DB refuses to update after Making changes to model HOT 7
- Library is missing or cannot be opened: "libcrypto.so.1.1" HOT 2
- 9.1.8 not working out of the box for node:20 docker (LTS images) HOT 5
- ReplicaSet - emulate replication lag HOT 1
- Issue downloading mongo binaries with Nexus set as MONGOMS_DOWNLOAD_MIRROR HOT 8
- Error when trying to run tests HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongodb-memory-server.