mongodb-memory-server: Postinstall Failure `linux/mongodb-linux-x86_64-debian81-latest.tgz`

Not sure if this is upstream or mongodb themselves, but the above resolved binary is throwing:

<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>3BB9EE1261D433D5</RequestId>
<HostId>
z8fk3EzYBQAo83J9pdvWOmxLqiROkYc116+r8jpAOWlAQ7yBYz1jlFPlxHt+1OESUeB2cMy1AAU=
</HostId>
</Error>

This happens when not specifying a version - as a workaround specifying 3.4.19-rc1 seems to work.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 20
  • Comments: 34 (12 by maintainers)

Commits related to this issue

Most upvoted comments

I have managed to install with the following command (thanks to @Moggers for suggesting to specifically define the version of mongodb)

MONGOMS_VERSION=4.0.0 yarn add mongodb-memory-server --dev

Just published new MAJOR 3.0.0. version for fixing this issue.

screen shot 2019-01-16 at 10 46 11 pm

Please check it and confirm that all works as expected in your codebases. Except that you are working on 4.0.3 version instead of latest.

Thank you for reporting the issue to us! We’ve been looking into this today and now have a fix in place. The next -latest build links should be working correctly and in the meantime we’re trying to manually correct the ones already in place.

I also want to note that the -latest builds are ~ nightly builds from a given GitHub branch – where no version means master. So linux/mongodb-linux-x86_64-debian81-latest.tgz would in fact be a ~ nightly build from the master branch, which is the 4.1 development branch today (not GA). It seems that perhaps you were assuming that -latest was a static link to the latest GA release (4.0.5 as of today)? It’s reasonable given the build name, but -latest is just a build from the branch at the time – it’s not an official release. I’ll look into renaming these to something more clear, e.g. “-nightly” (even though they’re generated on events vs a schedule) or instead leaving those as-is and creating and maintaining new static links to get the latest GA release and/or the latest GA release for a specific major version, so for example as of right now:

linux/mongodb-linux-x86_64-debian81-stable.tgz   --> linux/mongodb-linux-x86_64-debian81-4.0.5.tgz
linux/mongodb-linux-x86_64-debian81-36stable.tgz --> linux/mongodb-linux-x86_64-debian81-3.6.9.tgz

That way you have a static link that can be used to get the latest official GA release, which is I think what you really wanted here.

Thanks again! Please let me know if you have any followup questions or issues.

My travis builds recently started failing as well. Related?

> mongodb-memory-server@2.9.3 postinstall /home/travis/build/nikhilkamineni/codex/node_modules/mongodb-memory-server
> node ./postinstall.js
mongodb-memory-server: checking MongoDB binaries cache...
failed to download/install MongoDB binaries. The error:
Error: MongoBinaryDownload: md5 check is failed
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mongodb-memory-server@2.9.3 postinstall: `node ./postinstall.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the mongodb-memory-server@2.9.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@hpgmiskin Is MongoDB version specified in tests?

  binary: {
    version: '4.0.5',
  },

I am having the same issue. I am able to get past the post install script using MONGOMS_DISABLE_POSTINSTALL=true yarn install which @rocknrolla777 mentions. However when running tests the binary attempts to download again and fails with the same md5 check is failed.

The output to getos() command is { os: 'linux', dist: 'Debian', release: '8.11' }

I passed this tweet to some friends at MongoDB. Let’s see what they say.

workaround: you can use “MONGOMS_DISABLE_POSTINSTALL=1” variable.

MONGOMS_DISABLE_POSTINSTALL=1 npm install

@nikhilkamineni yes it’s the same issue - the download server is reporting access denied when downloading the binary or looking up the md5.