Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Stall after downloading mongodb version #51

Closed
flovilmart opened this issue Feb 5, 2016 · 14 comments · Fixed by mongodb-js/version-manager#78
Closed

Stall after downloading mongodb version #51

flovilmart opened this issue Feb 5, 2016 · 14 comments · Fixed by mongodb-js/version-manager#78

Comments

@flovilmart
Copy link

We're seeing a huge amount of tests failing on https://github.com/parseplatform/parse-server on random builds after the download of the mongo db.

Any idea, cue of something we'd be doing wrong.

@imlucas
Copy link
Contributor

imlucas commented Feb 7, 2016

@flovilmart sorry to keep you waiting on this. I've definitely run into this before as have some other folks but haven't been able to properly repro :/ Retrying the job on travis then passes every time...

Mind enabling debug output to see if that gets us any more info? DEBUG=* mongodb-runner start

I've done the same over here and will continue clicking retry until it fails
https://github.com/mongodb-js/collection-sample/blob/travis_hangs/package.json

@imlucas imlucas closed this as completed Feb 7, 2016
@imlucas imlucas reopened this Feb 7, 2016
imlucas added a commit to mongodb-js/collection-sample that referenced this issue Feb 7, 2016
@flovilmart
Copy link
Author

@imlucas I'll definitely try.

@flovilmart
Copy link
Author

https://s3.amazonaws.com/archive.travis-ci.org/jobs/107316511/log.txt Here's the log that we have, and we clearly see that the download don't even get any progress. A rate limit problem maybe?

@flovilmart
Copy link
Author

Here is the log from a stalled run: https://api.travis-ci.org/jobs/107587416/log.txt

@imlucas imlucas closed this as completed Mar 3, 2016
@flovilmart
Copy link
Author

@imlucas imlucas reopened this Mar 3, 2016
@flovilmart
Copy link
Author

sorry...

@imlucas
Copy link
Contributor

imlucas commented Mar 21, 2016

Misbehaving code: https://github.com/mongodb-js/version-manager/blob/master/lib/download.js#L25-L76

We should switch this to nugget which is what electron-prebuilt uses under the hood: https://github.com/electron-userland/electron-download/blob/master/index.js#L57-L75

@flovilmart
Copy link
Author

sounds like a plan, want me to pr?

@imlucas
Copy link
Contributor

imlucas commented Mar 21, 2016

@flovilmart that would be fantastic!

@flovilmart
Copy link
Author

I'll give it a shot

@imlucas
Copy link
Contributor

imlucas commented Mar 30, 2016

Found it! https://travis-ci.org/mongodb-js/runner/jobs/119598613

There's a race in mongodb-tools I believe such that this very important callback is never called: https://github.com/mongodb-js/runner/blob/master/lib/worker.js#L241

@codebreach
Copy link

I had an issue where mongodb-runner would say that mongo is running while its not running, see mongodb-tools:server_manager log messages and mongodb-runner:worker log messages below.

Is this related to this issue or should I open another one?

  mongodb-tools:server_manager Starting with cmd `mongod --smallfiles --noprealloc --setParameter enableTestCommands=1 --port 27017 --dbpath /Users/madhav/.mongodb/data/standalone --logpath /Users/madhav/.mongodb/standalone.log --rest --nojournal` +9ms
  mongodb-tools:server_manager exec completed: {"error":{"killed":false,"code":127,"signal":null,"cmd":"/bin/sh -c mongod --smallfiles --noprealloc --setParameter enableTestCommands=1 --port 27017 --dbpath /Users/madhav/.mongodb/data/standalone --logpath /Users/madhav/.mongodb/standalone.log --rest --nojournal"}}. Captured stdout and stderr: +19ms
  mongodb-tools:server_manager mongod:stdout >  +0ms 
  mongodb-tools:server_manager mongod:stderr >  +0ms /bin/sh: mongod: command not found
  mongodb-tools:server_manager mongod:stderr >  +1ms 
  mongodb-runner:worker Server started without auth +0ms
  mongodb-runner:worker Notifying parent process +0ms {
  "event": "started",
  "opts": {
    "_": [],
    "name": "standalone",
    "dbpath": "/Users/madhav/.mongodb/data/standalone",
    "logpath": "/Users/madhav/.mongodb/standalone.log",
    "port": 27017,
    "topology": "standalone",
    "mongodBin": "mongod",
    "mongosBin": "mongos",
    "purge": true,
    "auth_mechanism": "none"
  }
}
  mongodb-runner:worker server ready +1ms

@callmephilip
Copy link

Seeing a similar problem when trying to use mongodb-runner with Parse server. Runs perfectly on my Mac but someone has just reported an issue on Linux (the script stalls). Trace below:

mongodb-version-manager:activate added /home/daniel/.mongodb/versions/mongodb-current/bin to $PATH and its now /home/daniel/.mongodb/versions/mongodb-current/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/android-studio/bin/ +0ms
mongodb-runner:bin running action start +177ms
mongodb-download-url Building URL for options {"version":"stable","arch":"x86_64","platform":"linux","branch":"master","bits":"64","debug":false,"ext":".tgz","distro":"linux_64"} +3ms
mongodb-version-list getting versions list +0ms
mongodb-version-list versions cache /tmp/dl.mongodb.org/dl/src +1ms
mongodb-version-list cache last modified 1467068262444 +1ms
mongodb-version-list using cached versions html +0ms
mongodb-version-list extracting from 1772 links in table +72ms
mongodb-version-list filtering out pre 2.2 versions +44ms
mongodb-version-list 192 versions of mongodb are available +28ms
mongodb-download-url fully resolved +1ms {
"version": "3.2.7",
"arch": "x86_64",
"platform": "linux",
"branch": "master",
"bits": "64",
"debug": false,
"ext": ".tgz",
"distro": "linux_64",
"name": "mongodb",
"artifact": "mongodb-linux-x86_64-3.2.7.tgz",
"url": "http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.7.tgz"
}
mongodb-version-manager:resolve resolved +4ms { name: 'mongodb',
platform: 'linux',
version: '3.2.7',
filename: 'mongodb-linux-x86_64-3.2.7.tgz',
url: 'http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.7.tgz',
debug: false,
enterprise: false,
distro: 'linux_64',
bits: '64',
directory: '/home/daniel/.mongodb/versions',
download_directory: '/home/daniel/.mongodb/versions/downloads',
download_path: '/home/daniel/.mongodb/versions/downloads/mongodb-linux-x86_64-3.2.7.tgz',
root_directory: '/home/daniel/.mongodb/versions/mongodb-3.2.7-linux-64',
bin_directory: '/home/daniel/.mongodb/versions/mongodb-3.2.7-linux-64/bin' }
mongodb-version-manager:download downloading +11ms { name: 'mongodb',
platform: 'linux',
version: '3.2.7',
filename: 'mongodb-linux-x86_64-3.2.7.tgz',
url: 'http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.7.tgz',
debug: false,
enterprise: false,
distro: 'linux_64',
bits: '64',
directory: '/home/daniel/.mongodb/versions',
download_directory: '/home/daniel/.mongodb/versions/downloads',
download_path: '/home/daniel/.mongodb/versions/downloads/mongodb-linux-x86_64-3.2.7.tgz',
root_directory: '/home/daniel/.mongodb/versions/mongodb-3.2.7-linux-64',
bin_directory: '/home/daniel/.mongodb/versions/mongodb-3.2.7-linux-64/bin' }
◜ Starting a MongoDB deployment to test against... mongodb-version-manager:download already have artifact at /home/daniel/.mongodb/versions/downloads/mongodb-linux-x86_64-3.2.7.tgz +2ms
mongodb-version-manager::extract already extracted ~/.mongodb/versions/mongodb-3.2.7-linux-64 +0ms
mongodb-version-manager:activate removing old symlink if it exists... +1ms
mongodb-version-manager:activate symlinking /home/daniel/.mongodb/versions/mongodb-3.2.7-linux-64 -> /home/daniel/.mongodb/versions/mongodb-current... +3ms
mongodb-runner configuring... +1ms
mongodb-runner configured opts +1ms { debug: false,
action: 'start',
version: undefined,
topology: 'standalone',
name: 'standalone',
logpath: '/home/daniel/.mongodb/standalone.log',
pidpath: '/home/daniel/.mongodb/pid',
port: 27017,
mongodBin: 'mongod',
mongosBin: 'mongos',
storageEngine: undefined,
auth_mechanism: 'none',
purge: true }
mongodb-dbpath searching for writeable dbpath in +1ms [ '/home/daniel/.mongodb/data/standalone',
'/mongodb/data/standalone' ]
mongodb-dbpath dbpath is +1ms /home/daniel/.mongodb/data/standalone
mongodb-runner starting! +0ms
mongodb-runner no pid file +1ms
mongodb-runner forking worker /home/daniel/Documents/todomvc-react-native-master/node_modules/mongodb-runner/bin/mongodb-runner-worker.js with args ["--name=standalone","--dbpath=/home/daniel/.mongodb/data/standalone","--logpath=/home/daniel/.mongodb/standalone.log","--port=27017","--topology=standalone","--mongodBin=mongod","--mongosBin=mongos","--purge=true","--auth_mechanism=none"] +2ms
mongodb-runner forked proc with pid +6ms 19669 /home/daniel/Documents/todomvc-react-native-master/node_modules/mongodb-runner/bin/mongodb-runner-worker.js [ '--name=standalone',
'--dbpath=/home/daniel/.mongodb/data/standalone',
'--logpath=/home/daniel/.mongodb/standalone.log',
'--port=27017',
'--topology=standalone',
'--mongodBin=mongod',
'--mongosBin=mongos',
'--purge=true',
'--auth_mechanism=none' ]
mongodb-runner waiting for error or message from forked worker... +0ms
◜ Starting a MongoDB deployment to test against... mongodb-runner:worker worker opts: {"":[],"name":"standalone","dbpath":"/home/daniel/.mongodb/data/standalone","logpath":"/home/daniel/.mongodb/standalone.log","port":27017,"topology":"standalone","mongodBin":"mongod","mongosBin":"mongos","purge":"true","auth_mechanism":"none"} +0ms
mongodb-runner:worker starting +4ms {
"": [],
"name": "standalone",
"dbpath": "/home/daniel/.mongodb/data/standalone",
"logpath": "/home/daniel/.mongodb/standalone.log",
"port": 27017,
"topology": "standalone",
"mongodBin": "mongod",
"mongosBin": "mongos",
"purge": true,
"auth_mechanism": "none"
}
◞ Starting a MongoDB deployment to test against... mongodb-tools:server_manager setting timeout to ping server... +1s
mongodb-tools:server_manager Starting with cmd mongod --smallfiles --noprealloc --setParameter enableTestCommands=1 --port 27017 --dbpath /home/daniel/.mongodb/data/standalone --logpath /home/daniel/.mongodb/standalone.log --rest --nojournal +12ms
◠ Starting a MongoDB deployment to test against...^C
*same thing. I get here and it just spins on me....

Reported here: bakery/todomvc-react-native#3 (comment)

@flovilmart
Copy link
Author

We haven’t seen the issue in a while now, I believe we can safely close. Feel free to ring up here if we need to reopen.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants