在heroku上部署Meteor 1.0应用程序后出现应用程序错误 [英] Application Error after deploying Meteor 1.0 app on heroku
问题描述
我试图在heroku上使用以下buildpack部署meteor.js app(v 1.0):
https://github.com/AdmitHub/meteor-buildpack-horse
以下是本教程:
http://www.growthux。 com / ux-html -css -js-growth-hack /安装-meteor-on-heroku
我的应用更像是一个静态网站,我使用数据库建立一个简单的后台办公室:
- 存储管理员用户和图像路径,然后在我的模板中动态呈现。
在Heroku上创建我的应用程序后,设置ROOT_URL变量,将MONGO_URL =变量设置为我在MONGO HQ上的外部数据库(也尝试了mongo实验室,同样的问题),最后推送到Heroku,当我访问网址时收到此错误消息:
$ b
应用程序错误
应用程序发生错误,您的页面无法投放。请稍后再试。
如果您是应用程序所有者,请查看日志以获取详细信息。
所以我做了:
2014-11-10T17:10:23.825922 + 00:00 heroku [ web.1]:使用SIGKILL停止进程
2014-11-10T17:10:23.825723 + 00:00 heroku [web.1]:错误R10(引导超时) - > Web进程无法绑定到$ PORT启动60秒
2014-11-10T17:10:24.584852 + 00:00 heroku [web.1]:状态从开始变为崩溃
2014-11-10T17:10:24.574995 +00:00 heroku [web.1]:进程已退出,状态为137
2014-11-10T17:10:26.415257 + 00:00 heroku [router]:at =错误代码= H10 desc =应用程序崩溃 method = GET path =/host = cle-meteor.herokuapp.com request_id = ffc312a1-316d-4337-9165-caa492aa7c15 fwd =80.13.242.126dyno = connect = service = status = 503 bytes =
不知道我是否在部署过程中做了错误,或者我是否必须重新思考应用程序与数据库交互时,不在本地运行。
有见解吗?问题,事实证明,我离开了ROOT_URL的http://。
你的日志信息是相当通用的,之前有什么吗?
以下是我如何得到流星 todos应用程序运行在heroku和mongolab上。
Heroku上的流星
安装流星
curl install.meteor.com | / bin / sh
将流星添加到我们的路径中,以便我们可以从任何地方运行流星命令。
将现有流星应用程序克隆到heroku文件夹中。
meteor create --example todos heroku
切换到流星应用程序文件夹。
cd heroku
我添加了一个如下所示的package.json文件。
{
name:myapp,
version:0.0.1,
engines :{
node:0.10.33,
npm:1.4.23
},
依赖关系:{
纤维:1.0.0
}
}
转到我们的家夹。我们希望回到以前的位置。
pushd〜
获取heroku客户端并安装它。
wget http: //assets.heroku.com/heroku-client/heroku-client.tgz
tar -zxvf heroku-client.tgz
export PATH = $ {PATH}:$ {HOME} / heroku-client / bin
回到我们以前的位置。
popd
登录到heroku。
heroku login
跳过此部分如果您已经使用HEROKU和GITHUB进行SSH配置
将您的公共SSH密钥添加到heroku (如果你还没有这样做)
heroku keys:add〜/ keys / heroku_public_key_ssh.txt
<手动>确保公共SSH密钥也已添加到您的GitHub帐户。
如果您正在运行ssh-agent,en确保您的私人SSH密钥已加载
ssh-add〜/ .ssh / id_rsa_heroku_github
将我们的子文件夹设置为git存储库,我们将推送到heroku。
git init
heroku git:remote -a mikestodos
git add。
git commit -a -mfirst deploy
创建一个 heroku 应用程序。我叫mikestodos。
heroku创建mikestodos --stack cedar --region us --buildpack https://github.com/AdmitHub/meteor- buildpack-horse.git
创建一个新的 将heroku的MONGO_URL设置为我们的MongoLabs数据库URL。格式为: 替换您自己的MongoLabs网址。 为我们的heroku应用程序设置ROOT_URL。 现在将我们的应用推送到heroku。 I'm trying to deploy a meteor.js app (v 1.0) on heroku using the following buildpack: My app is more like a static website, i'm using the database to build a simple back office: After having created my app on Heroku, set ROOT_URL variable, set the MONGO_URL= variable to my external db on MONGO HQ, (tried mongo lab as well, same problem) and finally push to Heroku, i'm getting this error message when I visit the url: Application Error An error occurred in the application and your page could not be served. Please try again in a few moments. If you are the application owner, check your logs for details. So I did: 2014-11-10T17:10:23.825922+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-11-10T17:10:23.825723+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch Not sure if I did something wrong regarding the deployment process, or if I must rethink how my app interact with the database when not running locally. I had a similar issue, it turned out that I'd left off the "http://" from the ROOT_URL. Your log messages are fairly generic, is there anything before that? Here's how I got the meteor "todos" app running on heroku and mongolab. Install meteor Add meteor to our path so we can run the "meteor" command from anywhere. clone an existing meteor app into the heroku folder. change to the meteor app's folder. I added a package.json file that looks like the following. change to our home folder. We want to come back to our previous spot. get the heroku client and install it. Go back to our previous location. login to heroku.
SKIP THIS PART IF YOU ALREADY HAVE SSH CONFIGURED NICELY WITH HEROKU AND GITHUB Add your public SSH key to heroku (if you haven't already done so) (Manually) Ensure that public SSH key has also been added to your GitHub account. If you're running ssh-agent, ensure your matching private SSH key is loaded
Set up our subfolder as a git repository, which we will push to heroku. Substitute your own heroku app name for "mikestodos" below. Create a heroku app. Mine is called mikestodos. Create a new mongolab database, and a new database user as well. Set the MONGO_URL for heroku to be our MongoLabs database URL. The format is: substitute your own MongoLabs URL below. Set the ROOT_URL for our heroku app. Now push our app to heroku.
这篇关于在heroku上部署Meteor 1.0应用程序后出现应用程序错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
heroku config:set MONGO_URL = mongodb://< my_mongouser>:< my_mongodbpassword> @< mymongoserver>:其中mymongoport> /< mymongodbname>
heroku config:set MONGO_URL = mongodb:// mikestodos:< dbpassword> @ ds051980.mongolab.com:51980 / mikestodos
heroku config: set ROOT_URL = http://mikestodos.herokuapp.com
git push heroku master
https://github.com/AdmitHub/meteor-buildpack-horse
and following along this tutorial:
http://www.growthux.com/ux-html-css-js-growth-hack/installing-meteor-on-heroku
- storing the admin user and image paths which are then dynamically rendered in my templates.
2014-11-10T17:10:24.584852+00:00 heroku[web.1]: State changed from starting to crashed
2014-11-10T17:10:24.574995+00:00 heroku[web.1]: Process exited with status 137
2014-11-10T17:10:26.415257+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=cle-meteor.herokuapp.com request_id=ffc312a1-316d-4337-9165-caa492aa7c15 fwd="80.13.242.126" dyno= connect= service= status=503 bytes=
Any insights?
Meteor on Heroku
curl install.meteor.com | /bin/sh
meteor create --example todos heroku
cd heroku
{
"name": "myapp",
"version": "0.0.1",
"engines": {
"node": "0.10.33",
"npm": "1.4.23"
},
"dependencies": {
"fibers": "1.0.0"
}
}
pushd ~
wget http://assets.heroku.com/heroku-client/heroku-client.tgz
tar -zxvf heroku-client.tgz
export PATH=${PATH}:${HOME}/heroku-client/bin
popd
heroku login
heroku keys:add ~/keys/heroku_public_key_ssh.txt
ssh-add ~/.ssh/id_rsa_heroku_github
git init
heroku git:remote -a mikestodos
git add .
git commit -a -m "first deploy"
heroku create mikestodos --stack cedar --region us --buildpack https://github.com/AdmitHub/meteor-buildpack-horse.git
heroku config:set MONGO_URL=mongodb://<my_mongouser>:<my_mongodbpassword>@<mymongoserver>:<mymongoport>/<mymongodbname>
heroku config:set MONGO_URL=mongodb://mikestodos:<dbpassword>@ds051980.mongolab.com:51980/mikestodos
heroku config:set ROOT_URL=http://mikestodos.herokuapp.com
git push heroku master