meteorhacks / meteord

MeteorD - Docker Runtime for Meteor Apps for Production Deployments
https://registry.hub.docker.com/u/meteorhacks/meteord/
MIT License
439 stars 371 forks source link

Exception thrown with accounts-base. #79

Open mlschuh opened 8 years ago

mlschuh commented 8 years ago

I've encountered the following error message after running a new image of the meteor example simple-todos. It takes it a minute to hit this point but it always does.

root@docker-staging:~/simple-todos# docker run -d \
    -e ROOT_URL=http://172.24.0.245 \
    -e MONGO_URL=mongodb://admin:xxxx@172.24.0.245:27020/admin \
    -e MONGO_OPLOG_URL=mongodb://admin:xxxx@172.24.0.245:27020/admin \
    -p 8080:80 \
    smi/simpletodotest

smi@docker-staging:~$ docker logs sad_lovelace 
=> Starting meteor app on port:80

/built_app/programs/server/node_modules/fibers/future.js:278
                        throw(ex);
                              ^
[object Object]
    at Object.Future.wait (/built_app/programs/server/node_modules/fibers/future.js:398:15)
    at new MongoConnection (packages/mongo/mongo_driver.js:213:1)
    at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:1)
    at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:1)
    at Object.defaultRemoteCollectionDriver (packages/underscore/underscore.js:750:1)
    at new Mongo.Collection (packages/mongo/collection.js:102:1)
    at AccountsServer.AccountsCommon (accounts_common.js:23:18)
    at new AccountsServer (accounts_server.js:16:5)
    at Package (globals_server.js:5:12)
    at /built_app/programs/server/packages/accounts-base.js:1814:4

When executing the app with meteor and having it connect to the remote database using the same MONGO_URL, it works without a problem.

To replicate, I simply clone the meteor github, browse into the example folder, and then follow the instructions on the readme of meteord.

Any tips on where to start digging?

-Mitch

ghost commented 8 years ago

I have something like this. I managed to fire it up without docker in production mode by installing node 10.4.X and manually reinstall fibers in bundle, but I can not make it work in docker. Its really a problem, cause I don't want to lock myself with node 10.4.X on my server

jshimko commented 8 years ago

@aquator Node 0.10.4x is currently a requirement of Meteor. That's not optional.

ghost commented 8 years ago

@jshimko yeah, I ended up with building a docker image from node:0.10 and do it step by step, so I can reinstall fibers and do magic... there were of course some other issues as well regarding remote mongodb, oplog, etc, so once all other issues are behind me I'll take another shot with mongod - the fact that I am new do docker also not helping :D

johannchen commented 8 years ago

It's interesting that I can run my app with meteord in my local docker virtual machine, but the container fails to run in a production vps. It gave the same error as @mlschuh described. I thought that a container should work in any machine. What might be the cause of the problem?

johannchen commented 8 years ago

Is it possible because that the production vps failed to connect to the mLab?