aws-es-kibana
aws-es-kibana copied to clipboard
App crashed on Heroku
After configuring the access policy on aws, I can access kibana via aws-es-kibana proxy.
But after deploying to heroku, I can see the log message like this:
2017-06-30T09:03:16.344356+00:00 app[web.1]: Kibana available at http://127.0.0.1:50970/_plugin/kibana/
2017-06-30T09:03:16.344258+00:00 app[web.1]: AWS ES cluster available at http://127.0.0.1:50970
But when I access to https://<MY_HEROKUAPP>.herokuapp.com
or https://<MY_HEROKUAPP>.herokuapp.com/_plugin/kibana
,
Errors suddenly show up:
2017-06-30T09:04:33.967079+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=<MY_HEROKUAPP>.herokuapp.com request_id=7b787b96-d988-4cab-9845-adf89a2d5bf4 fwd="IP" dyno= connect= service= status=503 bytes= protocol=https
2017-06-30T09:04:34.778436+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/_plugin/kibana" host=<MY_HEROKUAPP>.herokuapp.com request_id=2cc7a8ee-e679-47a2-b599-766e9325579c fwd="IP" dyno= connect= service= status=503 bytes= protocol=http
The weird thing is I don't get any other error message, and the local version went just fine.
Looks like it is expecting to use the aws-cli credentials
~ $ cat Procfile
web: node index.js
~ $ node index.js
__________ _________ _________________ ________ ______
___ |_ | / /_ ___/ ___ ____/_ ___/ ___ __ \________________ ______ ____ /
__ /| |_ | /| / /_____ \ __ __/ _____ \ __ /_/ /_ ___/ __ \_ |/_/_ / / /_ /
_ ___ |_ |/ |/ / ____/ / _ /___ ____/ / _ ____/_ / / /_/ /_> < _ /_/ / /_/
/_/ |_|___/|__/ /____/ /_____/ /____/ /_/ /_/ \____//_/|_| _\__, / (_)
/____/
AWS ES cluster available at http://0.0.0.0:40397
Kibana available at http://0.0.0.0:40397/_plugin/kibana/
internal/fs/watchers.js:173
throw error;
^
Error: ENOENT: no such file or directory, watch '/app/.aws/credentials'
at FSWatcher.start (internal/fs/watchers.js:165:26)
at Object.watch (fs.js:1275:11)
at Object.<anonymous> (/app/index.js:211:4)
at Module._compile (internal/modules/cjs/loader.js:736:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:747:10)
at Module.load (internal/modules/cjs/loader.js:628:32)
at tryModuleLoad (internal/modules/cjs/loader.js:568:12)
at Function.Module._load (internal/modules/cjs/loader.js:560:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:801:12)
at executeUserCode (internal/bootstrap/node.js:526:15)
@abalone0204 Try adding this buildpack https://github.com/Shopify/heroku-buildpack-awscli
and setting the proper AWS_*
environment variables and it should work for you