Amazon ec2 Meteor Up部署到Amazon EC(Ubuntu 14.04)不起作用
我用Ubuntu14.04设置了一个标准的Amazon微实例,设置了一个sudo用户,基本上按照Meteor Up的说明进行操作。我在“调用部署过程”阶段遇到这个错误Amazon ec2 Meteor Up部署到Amazon EC(Ubuntu 14.04)不起作用,amazon-ec2,meteor,meteor-up,Amazon Ec2,Meteor,Meteor Up,我用Ubuntu14.04设置了一个标准的Amazon微实例,设置了一个sudo用户,基本上按照Meteor Up的说明进行操作。我在“调用部署过程”阶段遇到这个错误 -----------------------------------STDERR----------------------------------- Warning: Permanently added 'ec2-54-200-136-28.us-west-2.compute.amazonaws.com,54
-----------------------------------STDERR-----------------------------------
Warning: Permanently added 'ec2-54-200-136-28.us-west-2.compute.amazonaws.com,54.200.136.28' (ECDSA) to the list of known hosts.
npm http GET https://registry.npmjs.org/fibers
npm http 304 https://registry.npmjs.org/fibers
% 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-----------------------------------
> fibers@1.0.1 install /opt/meteor/tmp/bundle/programs/server/node_modules/fibers
> node ./build.js
我做错什么了吗?我在Amazon EC2设置中打开了端口80,我的mup.json文件如下所示:
{
// Server authentication info
"servers": [
{
"host": "[amazon_IP]",
"username": "ubuntu",
"password": "password"
// or pem file (ssh based authentication)
//"pem": "~/.ssh/id_rsa"
}
],
// Install MongoDB in the server, does not destroy local MongoDB on future setup
"setupMongo": true,
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,
// WARNING: If nodeVersion omitted will setup 0.10.25 by default. Do not use v, only version number.
"nodeVersion": "0.10.25",
// Install PhantomJS in the server
"setupPhantom": true,
// Application name (No spaces)
"appName": "meteor",
// Location of app (local directory)
"app": "/home/meteor_apps/thestory",
// Configure environment
"env": {
"PORT": 80,
"ROOT_URL": "http://54.200.136.28"
},
// Meteor Up checks if the app comes online just after the deployment
// before mup checks that, it will wait for no. of seconds configured below
"deployCheckWaitTime": 15
}
我只是将我的根URL设置为Amazon公共IP。。。不确定Meteor在何处使用ROOT_URL env变量和一个微实例,Meteor需要更长的时间才能完成应用程序绑定。将
deployCheckWaitTime
增加到大约300
(5分钟)
现在发生的是Meteor放弃等待它完成,所以您需要增加此超时
此外,您可能需要检查节点版本,根据Meteor版本的不同,您可能需要使用更高版本,例如0.8.1.2/3的0.10.28。您可以尝试安装它,但如果遇到问题,则需要再次运行
mup安装程序
,或者手动安装节点。hmm。。好的,我会再试一次,我的settings.json文件中需要什么吗?我没有碰它,甚至不知道它为什么会在那里。appName是什么也很重要吗?我正绞尽脑汁思考如何为ROOT\u URL添加内容。@JasonIp再试一次,如果在部署时出现任何错误,我会抱怨,如果没有domainworks,ROOT\u URL看起来很好!谢谢你,先生!嗯,计划最终会有一个域名。。我计划做的是将一个域指向我的Amazon微实例,如果我这样做,我需要设置根URL吗?如果没有,Meteor何时以及如何使用ROOT_URL?Meteor使用它来正确路由请求,例如,如果您使用类似于facebook的oauth登录,facebook需要知道在您登录后重定向到哪里。您可以在获得域后更改它并重新部署。