Stormpath和Heroku

时间:2016-05-23 01:27:11

标签: heroku stormpath

我一直在尝试向Heroku发布Stormpath教程应用程序,但Heroku告诉我'应用程序中发生了错误,无法提供您的页面。请稍后重试。如果您是应用程序所有者,请查看日志以获取详细信息。'

我检查了日志,主要的事情似乎是'错误:API密钥ID和秘密是必需的。',但我不知道这应该是什么意思。我已经按照指南https://stormpath.com/blog/build-nodejs-express-stormpath-app进行操作,并在终端中设置密钥ID和密码。我该怎么做才能在Heroku上正确启动这个东西?

一切都在本地运行得很好,这里是完整的日志:

2016-05-23T00:57:21.912777+00:00 app[web.1]: > node server.js
2016-05-23T00:57:21.912752+00:00 app[web.1]:
2016-05-23T00:57:21.912773+00:00 app[web.1]: > my-webapp@1.0.0 start /app
2016-05-23T00:57:21.912778+00:00 app[web.1]:
2016-05-23T00:57:23.236038+00:00 app[web.1]: error:  Error: API key ID and secret is required.
2016-05-23T00:57:23.236061+00:00 app[web.1]:     at /app/node_modules/async/lib/async.js:1213:16
2016-05-23T00:57:23.236061+00:00 app[web.1]:     at fn (/app/node_modules/async/lib/async.js:746:34)
2016-05-23T00:57:23.236062+00:00 app[web.1]:     at /app/node_modules/async/lib/async.js:166:37
2016-05-23T00:57:23.236060+00:00 app[web.1]:     at ValidateClientConfigStrategy.process (/app/node_modules/stormpath-config/lib/strategy/ValidateClientConfigStrategy.js:33:12)
2016-05-23T00:57:23.236056+00:00 app[web.1]:     at newError (/app/node_modules/stormpath-config/lib/strategy/ValidateClientConfigStrategy.js:15:14)
2016-05-23T00:57:23.236063+00:00 app[web.1]:     at /app/node_modules/async/lib/async.js:706:43
2016-05-23T00:57:23.236063+00:00 app[web.1]:     at /app/node_modules/async/lib/async.js:167:37
2016-05-23T00:57:23.236065+00:00 app[web.1]:     at Immediate._onImmediate (/app/node_modules/async/lib/async.js:1206:34)
2016-05-23T00:57:23.236066+00:00 app[web.1]:     at tryOnImmediate (timers.js:534:15)
2016-05-23T00:57:23.236066+00:00 app[web.1]:     at processImmediate [as _immediateCallback] (timers.js:514:5)
2016-05-23T00:58:19.594432+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-05-23T00:58:19.594683+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-05-23T00:58:20.928062+00:00 heroku[web.1]: State changed from starting to crashed
2016-05-23T00:58:20.879933+00:00 heroku[web.1]: Process exited with status 137
2016-05-23T00:58:40.721955+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=workpls.herokuapp.com request_id=a8142cf5-0e42-402b-b777-69aa7867808a fwd="73.222.253.89" dyno= connect= service= status=503 bytes=
2016-05-23T00:58:41.882687+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=workpls.herokuapp.com request_id=04db8c96-ff75-4535-9aa9-cb1415951742 fwd="73.222.253.89" dyno= connect= service= status=503 bytes=
2016-05-23T01:00:10.489523+00:00 heroku[api]: Release v6 created by brandonlum94@gmail.com
2016-05-23T01:00:10.489494+00:00 heroku[api]: Deploy 7873309 by brandonlum94@gmail.com
2016-05-23T01:00:10.619075+00:00 heroku[slug-compiler]: Slug compilation started
2016-05-23T01:00:10.619085+00:00 heroku[slug-compiler]: Slug compilation finished
2016-05-23T01:00:10.966086+00:00 heroku[web.1]: State changed from crashed to starting
2016-05-23T01:00:12.625037+00:00 heroku[web.1]: Starting process with command `npm start`
2016-05-23T01:00:15.420889+00:00 app[web.1]:
2016-05-23T01:00:15.420908+00:00 app[web.1]: > my-webapp@1.0.0 start /app
2016-05-23T01:00:15.420911+00:00 app[web.1]: > node server.js
2016-05-23T01:00:15.420912+00:00 app[web.1]:
2016-05-23T01:00:16.939751+00:00 app[web.1]: error:  Error: API key ID and secret is required.
2016-05-23T01:00:16.939761+00:00 app[web.1]:     at newError (/app/node_modules/stormpath-config/lib/strategy/ValidateClientConfigStrategy.js:15:14)
2016-05-23T01:00:16.939763+00:00 app[web.1]:     at ValidateClientConfigStrategy.process (/app/node_modules/stormpath-config/lib/strategy/ValidateClientConfigStrategy.js:33:12)
2016-05-23T01:00:16.939764+00:00 app[web.1]:     at fn (/app/node_modules/async/lib/async.js:746:34)
2016-05-23T01:00:16.939765+00:00 app[web.1]:     at /app/node_modules/async/lib/async.js:1213:16
2016-05-23T01:00:16.939766+00:00 app[web.1]:     at /app/node_modules/async/lib/async.js:706:43
2016-05-23T01:00:16.939765+00:00 app[web.1]:     at /app/node_modules/async/lib/async.js:166:37
2016-05-23T01:00:16.939767+00:00 app[web.1]:     at /app/node_modules/async/lib/async.js:167:37
2016-05-23T01:00:16.939768+00:00 app[web.1]:     at Immediate._onImmediate (/app/node_modules/async/lib/async.js:1206:34)
2016-05-23T01:00:16.939769+00:00 app[web.1]:     at tryOnImmediate (timers.js:534:15)
2016-05-23T01:00:16.939770+00:00 app[web.1]:     at processImmediate [as _immediateCallback] (timers.js:514:5)
2016-05-23T01:01:13.074993+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-05-23T01:01:13.074993+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-05-23T01:01:13.918547+00:00 heroku[web.1]: State changed from starting to crashed
2016-05-23T01:01:13.916299+00:00 heroku[web.1]: Process exited with status 137
2016-05-23T01:01:16.688198+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=workpls.herokuapp.com request_id=b8b03962-66f9-4b67-be55-009dff78c8b0 fwd="73.222.253.89" dyno= connect= service= status=503 bytes=
2016-05-23T01:01:17.984769+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=workpls.herokuapp.com request_id=5a6a9d91-a144-415c-9293-951aedc0f26b fwd="73.222.253.89" dyno= connect= service= status=503 bytes=
2016-05-23T01:02:40.694187+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=workpls.herokuapp.com request_id=b004fcf9-f3d8-482f-bae3-3e4cfe90160e fwd="73.222.253.89" dyno= connect= service= status=503 bytes=
2016-05-23T01:02:41.552456+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=workpls.herokuapp.com request_id=80a2b214-7a03-4a32-b09d-7ed210685b1e fwd="73.222.253.89" dyno= connect= service= status=503 bytes=
2016-05-23T01:04:23.179785+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=workpls.herokuapp.com request_id=47a5a69e-b26b-4318-9c34-869a1f488e54 fwd="73.222.253.89" dyno= connect= service= status=503 bytes=
2016-05-23T01:04:24.057028+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=workpls.herokuapp.com request_id=1736845b-b276-435d-ac09-dd308592f290 fwd="73.222.253.89" dyno= connect= service= status=503 bytes=
2016-05-23T01:07:39.697756+00:00 heroku[api]: Release v7 created by brandonlum94@gmail.com
2016-05-23T01:07:39.697756+00:00 heroku[api]: Set STORMPATH_SECRET_KEY config vars by brandonlum94@gmail.com
2016-05-23T01:07:40.390722+00:00 heroku[web.1]: State changed from crashed to starting
2016-05-23T01:07:42.158518+00:00 heroku[web.1]: Starting process with command `npm start`
2016-05-23T01:07:44.211079+00:00 app[web.1]:
2016-05-23T01:07:44.211110+00:00 app[web.1]: > my-webapp@1.0.0 start /app
2016-05-23T01:07:44.211113+00:00 app[web.1]: > node server.js
2016-05-23T01:07:44.211119+00:00 app[web.1]:
2016-05-23T01:07:45.303304+00:00 app[web.1]: error:  Error: API key ID and secret is required.
2016-05-23T01:07:45.303317+00:00 app[web.1]:     at newError (/app/node_modules/stormpath-config/lib/strategy/ValidateClientConfigStrategy.js:15:14)
2016-05-23T01:07:45.303318+00:00 app[web.1]:     at ValidateClientConfigStrategy.process (/app/node_modules/stormpath-config/lib/strategy/ValidateClientConfigStrategy.js:33:12)
2016-05-23T01:07:45.303319+00:00 app[web.1]:     at fn (/app/node_modules/async/lib/async.js:746:34)
2016-05-23T01:07:45.303320+00:00 app[web.1]:     at /app/node_modules/async/lib/async.js:1213:16
2016-05-23T01:07:45.303320+00:00 app[web.1]:     at /app/node_modules/async/lib/async.js:166:37
2016-05-23T01:07:45.303321+00:00 app[web.1]:     at /app/node_modules/async/lib/async.js:706:43
2016-05-23T01:07:45.303321+00:00 app[web.1]:     at /app/node_modules/async/lib/async.js:167:37
2016-05-23T01:07:45.303322+00:00 app[web.1]:     at Immediate._onImmediate (/app/node_modules/async/lib/async.js:1206:34)
2016-05-23T01:07:45.303324+00:00 app[web.1]:     at processImmediate [as _immediateCallback] (timers.js:514:5)
2016-05-23T01:07:45.303323+00:00 app[web.1]:     at tryOnImmediate (timers.js:534:15)
2016-05-23T01:08:42.173794+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-05-23T01:08:42.173889+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-05-23T01:08:42.972327+00:00 heroku[web.1]: State changed from starting to crashed
2016-05-23T01:08:42.960998+00:00 heroku[web.1]: Process exited with status 137
2016-05-23T01:08:42.973810+00:00 heroku[web.1]: State changed from crashed to starting
2016-05-23T01:08:44.895681+00:00 heroku[web.1]: Starting process with command `npm start`
2016-05-23T01:08:47.490885+00:00 app[web.1]:
2016-05-23T01:08:47.490893+00:00 app[web.1]: > my-webapp@1.0.0 start /app
2016-05-23T01:08:47.490900+00:00 app[web.1]:
2016-05-23T01:08:47.490899+00:00 app[web.1]: > node server.js
2016-05-23T01:08:48.673636+00:00 app[web.1]: error:  Error: API key ID and secret is required.
2016-05-23T01:08:48.673657+00:00 app[web.1]:     at newError (/app/node_modules/stormpath-config/lib/strategy/ValidateClientConfigStrategy.js:15:14)
2016-05-23T01:08:48.673659+00:00 app[web.1]:     at ValidateClientConfigStrategy.process (/app/node_modules/stormpath-config/lib/strategy/ValidateClientConfigStrategy.js:33:12)
2016-05-23T01:08:48.673660+00:00 app[web.1]:     at fn (/app/node_modules/async/lib/async.js:746:34)
2016-05-23T01:08:48.673660+00:00 app[web.1]:     at /app/node_modules/async/lib/async.js:1213:16
2016-05-23T01:08:48.673661+00:00 app[web.1]:     at /app/node_modules/async/lib/async.js:166:37
2016-05-23T01:08:48.673665+00:00 app[web.1]:     at tryOnImmediate (timers.js:534:15)
2016-05-23T01:08:48.673661+00:00 app[web.1]:     at /app/node_modules/async/lib/async.js:706:43
2016-05-23T01:08:48.673666+00:00 app[web.1]:     at processImmediate [as _immediateCallback] (timers.js:514:5)
2016-05-23T01:08:48.673662+00:00 app[web.1]:     at /app/node_modules/async/lib/async.js:167:37
2016-05-23T01:08:48.673664+00:00 app[web.1]:     at Immediate._onImmediate (/app/node_modules/async/lib/async.js:1206:34)
2016-05-23T01:09:44.945559+00:00 app[web.1]: Error waiting for process to terminate: No child processes
2016-05-23T01:09:44.916097+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-05-23T01:09:44.916097+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-05-23T01:09:45.800059+00:00 heroku[web.1]: Process exited with status 22
2016-05-23T01:09:45.849441+00:00 heroku[web.1]: State changed from starting to crashed
2016-05-23T01:17:24.998834+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=workpls.herokuapp.com request_id=f573e1ab-6029-4115-b925-3034b93ca7dc fwd="73.222.253.89" dyno= connect= service= status=503 bytes=
2016-05-23T01:17:25.895402+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=workpls.herokuapp.com request_id=eca422af-0a7c-4d10-9bd6-16fc54b6b10d fwd="73.222.253.89" dyno= connect= service= status=503 bytes=
2016-05-23T01:21:00.461372+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=workpls.herokuapp.com request_id=89189a45-6415-48e4-be08-0fb2a83291e8 fwd="73.222.253.89" dyno= connect= service= status=503 bytes=
2016-05-23T01:21:01.050242+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=workpls.herokuapp.com request_id=6d4fa6d5-1feb-4a10-8864-ef50fe72845b fwd="73.222.253.89" dyno= connect= service= status=503 bytes=

1 个答案:

答案 0 :(得分:0)

我在Stormpath工作,所以只是在这里跳来跳去。我们最近发布了一个新版本的express-stormpath库,它查找的名称与Heroku上默认包含的名称不同。

我现在要在Heroku文档中修复此问题。

你可以做些什么来让事情在过渡期间发挥作用:

$ heroku config:set STORMPATH_APPLICATION_HREF=$(heroku config:get STORMPATH_URL)
$ heroku config:set STORMPATH_CLIENT_APIKEY_ID=$(heroku config:get STORMPATH_API_KEY_ID)
$ heroku config:set STORMPATH_CLIENT_APIKEY_SECRET=$(heroku config:get STORMPATH_API_KEY_SECRET)

上述命令将复制Stormpath的Heroku环境变量,并正确命名。

对于这种混乱感到抱歉,我正在努力解决这个问题=)