运行在Digital Ocean Droplet上的Meteor app停止工作,mongodb似乎已经停止了

时间:2016-07-25 11:24:43

标签: mongodb meteor digital-ocean

我有一个Meteor应用程序通过MUP在Digitial Ocean Droplet上运行。它突然停止工作 - 网站不可用。我没有做过更新或以任何方式触摸服务器,它刚刚消失!

看起来好像Mongodb已停止运行,但我不知道如何检查,如何再次启动它或如何找出它停止的原因。

我正在运行METEOR@1.2.1

更新:只需重新启动mongod似乎已经让它再次运行:

service mongodb restart

所以现在我主要想知道发生了什么。可能是Droplet上的服务器重新启动并且没有自动重启mongod?

我已经使用SSH连接到服务器并尝试命令行'mongo',结果如下:

root@myappname:~# mongo
MongoDB shell version: 2.6.11
connecting to: test
2016-07-25T06:58:23.244-0400 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2016-07-25T06:58:23.244-0400 Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146
exception: connect failed

我尝试了mup logs -f,结果如下:

[my.ip.address] error: Script restart attempt #74021[my.ip.address] 
[my.ip.address] 
[my.ip.address] /opt/myappname/app/programs/server/node_modules/fibers/future.js:278[my.ip.address] 
[my.ip.address]     [my.ip.address]     [my.ip.address]     [my.ip.address]     [my.ip.address] [my.ip.address]     [my.ip.address] throw(ex);[my.ip.address] 
[my.ip.address]     [my.ip.address]     [my.ip.address]     [my.ip.address]     [my.ip.address] [my.ip.address]     [my.ip.address]  [my.ip.address]  [my.ip.address]  [my.ip.address]  [my.ip.address]  [my.ip.address]  [my.ip.address] ^[my.ip.address] 
[my.ip.address] Error: failed to connect to [127.0.0.1:27017][my.ip.address] 
[my.ip.address]     at Object.Future.wait (/opt/myappname/app/programs/server/node_modules/fibers/future.js:398:15)[my.ip.address] 
[my.ip.address]     at new MongoConnection (packages/mongo/mongo_driver.js:213:1)[my.ip.address] 
[my.ip.address]     at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:1)[my.ip.address] 
[my.ip.address]     at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:1)[my.ip.address] 
[my.ip.address]     at Object.defaultRemoteCollectionDriver (packages/underscore/underscore.js:750:1)[my.ip.address] 
[my.ip.address]     at new Mongo.Collection (packages/mongo/collection.js:102:1)[my.ip.address] 
[my.ip.address]     at AccountsServer.AccountsCommon (accounts_common.js:23:18)[my.ip.address] 
[my.ip.address]     at new AccountsServer (accounts_server.js:16:5)[my.ip.address] 
[my.ip.address]     at Package (globals_server.js:5:12)[my.ip.address] 
[my.ip.address]     at /opt/myappname/app/programs/server/packages/accounts-base.js:1814:4[my.ip.address] 
[my.ip.address]     - - - - -[my.ip.address] 
[my.ip.address]     at [object Object].<anonymous> (/opt/myappname/app/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:556:74)[my.ip.address] 
[my.ip.address]     at [object Object].emit (events.js:106:17)[my.ip.address] 
[my.ip.address]     at [object Object].<anonymous> (/opt/myappname/app/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:156:15)[my.ip.address] 
[my.ip.address]     at [object Object].emit (events.js:98:17)[my.ip.address] 
[my.ip.address]     at Socket.<anonymous> (/opt/myappname/app/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/connection.js:534:10)[my.ip.address] 
[my.ip.address]     at Socket.emit (events.js:95:17)[my.ip.address] 
[my.ip.address]     at net.js:441:14[my.ip.address] 
[my.ip.address]     at process._tickCallback (node.js:448:13)[my.ip.address] 
[my.ip.address] error: Forever detected script exited with code: 8[my.ip.address]

我尝试过使用这些消息失败的mup部署:

mup deploy

Meteor Up: Production Quality Meteor Deployments
------------------------------------------------

“ Checkout Kadira!
  It's the best way to monitor performance of your app.
  Visit: https://kadira.io/mup ”

Building Started: .

Started TaskList: Deploy app 'myappname' (linux)
[my.ip.address] - Uploading bundle
[my.ip.address] - Uploading bundle: SUCCESS
[my.ip.address] - Setting up Environment Variables
[my.ip.address] - Setting up Environment Variables: SUCCESS
[my.ip.address] - Invoking deployment process
[my.ip.address] x Invoking deployment process: FAILED

    -----------------------------------STDERR-----------------------------------
    -gyp/0.10.40',
    gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
    gyp info spawn args   '-Dnode_lib_file=node.lib',
    gyp info spawn args   '-Dmodule_root_dir=/opt/myappname/tmp/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt',
    gyp info spawn args   '--depth=.',
    gyp info spawn args   '--no-parallel',
    gyp info spawn args   '--generator-output',
    gyp info spawn args   'build',
    gyp info spawn args   '-Goutput_dir=.' ]
    gyp info spawn make
    gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
    gyp info ok 
    npm WARN package.json meteor-dev-bundle@0.0.0 No description
    npm WARN package.json meteor-dev-bundle@0.0.0 No repository field.
    npm WARN package.json meteor-dev-bundle@0.0.0 No README data

    /usr/lib/node_modules/wait-for-mongo/bin/wait-for-mongo:14
        throw err;
              ^
    Error: TIMEOUTED_WAIT_FOR_MONGO
        at null._onTimeout (/usr/lib/node_modules/wait-for-mongo/lib/waitForMongo.js:20:14)
        at Timer.listOnTimeout [as ontimeout] (timers.js:121:15)
    -----------------------------------STDOUT-----------------------------------
    .1:27017]
    wait-for-mongo: failed to connect to [my.ip.address]
    wait-for-mongo: failed to connect to [my.ip.address]
    wait-for-mongo: failed to connect to [my.ip.address]
    wait-for-mongo: failed to connect to [my.ip.address]
    wait-for-mongo: failed to connect to [my.ip.address]
    wait-for-mongo: failed to connect to [my.ip.address]
    wait-for-mongo: failed to connect to [my.ip.address]
    wait-for-mongo: failed to connect to [my.ip.address]
    wait-for-mongo: failed to connect to [my.ip.address]
    wait-for-mongo: failed to connect to [my.ip.address]
    wait-for-mongo: failed to connect to [my.ip.address]
    wait-for-mongo: failed to connect to [my.ip.address]
    wait-for-mongo: failed to connect to [my.ip.address]
    wait-for-mongo: failed to connect to [my.ip.address]
    wait-for-mongo: failed to connect to [my.ip.address]
    wait-for-mongo: failed to connect to [my.ip.address]
    wait-for-mongo: failed to connect to [my.ip.address]
    wait-for-mongo: failed to connect to [my.ip.address]
    ----------------------------------------------------------------------------

我是服务器管理的新手,非常感谢任何帮助或建议。

非常感谢

0 个答案:

没有答案