2016-05-05 9 views
2

mupxを使ってUbuntu14.04/AWSにMeteorアプリケーションをデプロイしようとしています。mupxをMONGO_URLで使用してubuntuに流星アプリをデプロイする方法は?

ここは自分の環境です。

サーバー

ノード:v5.10.0、 NPM:3.8.9、 のUbuntu:14.04

クライアント

ノード:V5.5.0、 NPM:3.8.8、 マック:バージョン10.11.014

mupx setup - >すべてが正常です。 mupx deploy - >展開の確認:FAILEDが発生しました。

私は私が得た "mupxログ--tail = 50" ...

------------------------------------------------ 
Configuration file : mup.json 
Settings file  : settings.json 

[52.39.5.187] => Starting meteor app on port:80 
[52.39.5.187] npm WARN deprecated npm -g install [email protected] 
npm WARN deprecated 
npm WARN deprecated To upgrade to the latest stable version, run: 
npm WARN deprecated 
npm WARN deprecated npm -g install [email protected] 
npm WARN deprecated 
npm WARN deprecated (Depending on how Node.js was installed on your system, you 
npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if 
npm WARN deprecated on Windows, run them from an Administrator prompt.) 
npm WARN deprecated 
npm WARN deprecated If you're running the version of npm bundled with 
npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS 
npm WARN deprecated will be bundled with a version of [email protected], which has some small 
npm WARN deprecated backwards-incompatible changes made to `npm run-script` and 
npm WARN deprecated semver behavior. 
npm WARN package.json meteor[email protected] No description 
npm WARN package.json [email protected] No repository field. 
npm WARN package.json [email protected] No README data 
npm WARN cannot run in wd [email protected] node npm-rebuild.js (wd=/bundle/bundle/programs/server) 

/bundle/bundle/programs/server/node_modules/fibers/future.js:300 
         throw(ex); 
          ^
[object Object] 
npm WARN deprecated This version of npm lacks support for important features, 
npm WARN deprecated such as scoped packages, offered by the primary npm 
npm WARN deprecated registry. Consider upgrading to at least [email protected], if not the 
npm WARN deprecated latest stable version. To upgrade to [email protected], run: 
npm WARN deprecated 
npm WARN deprecated npm -g install [email protected] 
npm WARN deprecated 
npm WARN deprecated To upgrade to the latest stable version, run: 
npm WARN deprecated 
npm WARN deprecated npm -g install [email protected] 
npm WARN deprecated 
npm WARN deprecated (Depending on how Node.js was installed on your system, you 
npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if 
npm WARN deprecated on Windows, run them from an Administrator prompt.) 
npm WARN deprecated 
npm WARN deprecated If you're running the version of npm bundled with 
npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS 
[52.39.5.187] npm WARN deprecated will be bundled with a version of [email protected], which has some small 
npm WARN deprecated backwards-incompatible changes made to `npm run-script` and 
npm WARN deprecated semver behavior. 
npm WARN package.json [email protected] No description 
npm WARN package.json [email protected] No repository field. 
npm WARN package.json [email protected] No README data 
npm WARN cannot run in wd [email protected] node npm-rebuild.js (wd=/bundle/bundle/programs/server) 
[52.39.5.187] => Starting meteor app on port:80 

マイmup.jsonが

{ 
    // Server authentication info 
    "servers": [ 
    { 
     "host": "xxx.xxx.xxx.xxx", 
     "username": "__username___", 
     "pem": "__path_to_pem__", 
     "env": {} 
    } 
    ], 

    // Install MongoDB on the server. Does not destroy the local MongoDB on future setups 
    "setupMongo": false, 

    // Application name (no spaces). 
    "appName": "__app_name__", 

    // Location of app (local directory). This can reference '~' as the users home directory. 
    // i.e., "app": "~/Meteor/my-app", 
    // This is the same as the line below. 
    "app": "__path_to_app_source__", 

    // Configure environment 
    // ROOT_URL must be set to your correct domain (https or http) 
    "env": { 
    "PORT": 1342, 
    "ROOT_URL": "https://xxx.xxx.xxx", 
    "MONGO_URL": "mongodb://__user__:[email protected]:27017/__dbname__" 
    }, 

    // Meteor Up checks if the app comes online just after the deployment. 
    // Before mup checks that, it will wait for the number of seconds configured below. 
    "deployCheckWaitTime": 120, 

    // show a progress bar while uploading. 
    // Make it false when you deploy using a CI box. 
    "enableUploadProgressBar": true 
} 

でなかった場合は、ここでの

-----------------------------------STDERR----------------------------------- 
pm WARN deprecated 
npm WARN deprecated (Depending on how Node.js was installed on your system, you 
npm WARN deprecated may need to prefix the preceding commands with `sudo`, or if 
npm WARN deprecated on Windows, run them from an Administrator prompt.) 
npm WARN deprecated 
npm WARN deprecated If you're running the version of npm bundled with 
npm WARN deprecated Node.js 0.10 LTS, be aware that the next version of 0.10 LTS 
npm WARN deprecated will be bundled with a version of [email protected], which has some small 
npm WARN deprecated backwards-incompatible changes made to `npm run-script` and 
npm WARN deprecated semver behavior. 
npm WARN package.json [email protected] No description 
npm WARN package.json met[email protected] No repository field. 
npm WARN package.json [email protected] No README data 
npm WARN cannot run in wd [email protected] node npm-rebuild.js (wd=/bundle/bundle/programs/server) 
=> Starting meteor app on port:80 

=> Redeploying previous version of the app 

-----------------------------------STDOUT----------------------------------- 

To see more logs type 'mup logs --tail=50' 

---------------------------------------------------------------------------- 

を記録私は手動でMongoDBを用意しました。

私はここで一日過ごしたので、誰かが私にヒントを与えたら、私はそれを感謝します。 ありがとう、

+0

setupMongo(MONGO_URLなし)で同じアプリをデプロイすると、アプリを正常にデプロイできます。しかし、その場合、MongoDBは私にとって理想とはほど遠いドッカーの中に作られています。 –

+0

あなたのmongoがサーバー上にローカルにインストールされている場合、URLは '@localhost:27017'ではないでしょうか? – Ben

答えて

1

解決策が見つかりました。 これは私がAWSとDockerについて知らないために起こります。

私のセキュリティグループは、DockerプロセスがMongoにアクセスできないようにしました。 私がしなければならなかったのは、DockerがMongoにアクセスするためのIPアドレスを許可することでした。

ありがとうございます。

+0

mupxが動作するためにはmongoポート(デフォルトでは '27017')を公開しなければなりませんでした。さらに詳しい情報はこちら:http://stackoverflow.com/questions/4767989/problem-with-access-to-mongodb-on-amazon- ec2 – danwild

1

私はmupからmupxへの切り替えに多くの問題があります。 この問題はこれに関連すると思われる。 https://github.com/arunoda/meteor-up/issues/958

アプリは、それが展開し、あなたのログから見ることができるように開始されたので、私は600にdeployCheckWaitTimeを高め、この問題が解決かどうかを確認、 しようwoud:

[52.39.5.187] => Starting meteor app on port:80 

アプリが展開された後、あなたが起動時にメインスレッドで長いサーバの動作を持っている場合、それは失敗することができますので、deployCheckWaitTimeオプションで指定されたN秒後であれば、すべての作品を見るためにチェックを行いmupx。

+0

dbの移行中に同様の問題が発生しました。 'deployCheckWaitTime'を1600に上げると、このプロセスを正常に終了するのに役立ちました。 – YaTaras