使用mup deploy部署Meteor应用程序时出错

时间:2015-04-12 22:38:20

标签: mongodb deployment meteor server digital-ocean

我正在将Meteor应用程序部署到Digital Ocean和MongoDB到Compose.io,但每次都会出错。这是我第一次部署到数字海洋和compose.io,所以我完全糊涂了。有人建议我该怎么办?

[45.55.144.173] ✘ Invoking deployment process: FAILED

-----------------------------------STDERR-----------------------------------
p ERR! cwd /opt/comicsprout/tmp/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not 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
child_process: customFds option is deprecated, use stdio instead.
../src/coroutine.cc: In function ‘void* find_thread_id_key(void*)’:
../src/coroutine.cc:90:3: warning: ‘thread_id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   if (tls == thread_id) {
   ^
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to localhost port 80: Connection refused
Latest deployment failed! Reverted back to the previous version.
-----------------------------------STDOUT-----------------------------------
rget) Release/obj.target/fibers.node: Finished
COPY Release/fibers.node
make: Leaving directory /opt/comicsprout/tmp/bundle/programs/server/node_modules/fibers/build' Installed in/opt/comicsprout/tmp/bundle/programs/server/node_modules/fibers/bin/linux-x64-v8-3.28/fibers.node`
underscore@1.5.2 node_modules/underscore

eachline@2.3.3 node_modules/eachline
└── type-of@2.0.1

chalk@0.5.1 node_modules/chalk
├── escape-string-regexp@1.0.3
├── ansi-styles@1.1.0
├── supports-color@0.2.0
├── has-ansi@0.1.0 (ansi-regex@0.2.1)
└── strip-ansi@0.3.0 (ansi-regex@0.2.1)

semver@4.1.0 node_modules/semver

source-map-support@0.2.8 node_modules/source-map-support
└── source-map@0.1.32 (amdefine@0.1.0)

fibers@1.0.5 node_modules/fibers
Waiting for MongoDB to initialize. (5 minutes)
connected
comicsprout stop/waiting
comicsprout start/running, process 12827
Waiting for 30 seconds while app is booting up
Checking is app booted or not?
comicsprout stop/waiting
comicsprout start/running, process 12930

1 个答案:

答案 0 :(得分:0)

前一段时间我收到同样的错误,请参阅my post here以获得更详细的答案。这与bcrypt有关,我发现这个问题在DigitalOcean服务器上更为普遍。

总结一下:

  1. Mup将应用安装到/opt/中,您可以在其中找到your_appnodejs。删除它们。

  2. mup.json文件中验证您是否拥有正确的节点版本,仅限0.10.36以及以下设置:

    {
    
     ...
    
      "setupMongo": true,
      "setupNode": true,
      "nodeVersion" : "0.10.36",
      "setupPhantom": true,
      "enableUploadProgressBar": true,
    
      // Application name (No spaces)
      "appName": "your_app",
    
      // Location of app (local directory)
      "app": ".",
    
     ...
    
    }
    
  3. 执行命令

    $ mup setup
    $ mup deploy
    
  4. 导航到服务器上的server文件夹并重建模块:

    $ cd /opt/your_app/app/programs/server
    $ npm rebuild
    $ npm install
    

    可选:$ sudo npm update node-gyp -g

  5. 最后,重新启动应用,mogodb以及任何网络服务器进程,例如nginx。