nyxcharon / vault-ui

A webapp for working with Hashicorp's Vault https://github.com/hashicorp/vault
GNU General Public License v3.0
140 stars 22 forks source link

You are not logged in #9

Closed Mykolaichenko closed 8 years ago

Mykolaichenko commented 8 years ago

root@vaultui:/home/mukolaich# docker run -it -p 3030:3030 -p 8080:8080 -e VAULT_HOST=10.10.20.205 -e CONSUL_HOST=localhost nyxcharon/vault-ui npm info it worked if it ends with ok npm info using npm@3.3.12 npm info using node@v5.3.0 npm info lifecycle vault-ui@0.0.0~prestart: vault-ui@0.0.0 npm info lifecycle vault-ui@0.0.0~start: vault-ui@0.0.0

vault-ui@0.0.0 start /usr/src/app concurrent --kill-others "npm run start-prod" "npm run start-prod-api"

[1] npm [1] info it worked if it ends with ok [1] npm info using npm@3.3.12 [1] npm info using node@v5.3.0 [0] npm [0] [0] info [0] [0] it worked if it ends with [0] ok [0] npm [0] [0] info [0] [0] using [0] npm@3.3.12 [0] npm [0] [0] info [0] [0] using [0] node@v5.3.0 [1] npm [1] info lifecycle vault-ui@0.0.0~prestart-prod-api: vault-ui@0.0.0 [1] npm [1] info lifecycle vault-ui@0.0.0~start-prod-api: vault-ui@0.0.0 [1] [1] > vault-ui@0.0.0 start-prod-api /usr/src/app [1] > better-npm-run start-prod-api [1] [0] npm [0] info lifecycle vault-ui@0.0.0~prestart-prod: vault-ui@0.0.0 [0] npm [0] info lifecycle vault-ui@0.0.0~start-prod: vault-ui@0.0.0 [0] [0] > vault-ui@0.0.0 start-prod /usr/src/app [0] > better-npm-run start-prod [0] [1] running better-npm-run in /usr/src/app [1] Executing script: start-prod-api [1] [1] to be executed: node ./bin/api.js [0] running better-npm-run in /usr/src/app [0] Executing script: start-prod [0] [0] to be executed: node ./bin/server.js [1] Attempting to discover location of consul data [1] WARNING: NODE_ENV value of 'production' did not match any deployment config file names. [1] WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode [1] Warning: connect.session() MemoryStore is not [1] designed for a production environment, as it will leak [1] memory, and will not scale past a single process. [1] ---- [1] ==> 🌎 API is running on port 3030 [1] ==> 💻 Send requests to http://localhost:3030 [1] Unhandled rejection Error: connect ECONNREFUSED 127.0.0.1:8500 [1] at Object.exports._errnoException (util.js:855:11) [1] at exports._exceptionWithHostPort (util.js:878:20) [1] at TCPConnectWrap.afterConnect as oncomplete [0] Warning: connect.session() MemoryStore is not [0] designed for a production environment, as it will leak [0] memory, and will not scale past a single process. [0] ---- [0] ==> ✅ Vault UI is running, talking to API server on 3030. [0] ==> 💻 Open http://localhost:8080 in a browser to view the app.

root@vaultui:/home/bla# telnet 127.0.0.1 8500 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. ^]

zannen commented 8 years ago

The container and the host have different network stacks. You have consul listening on the host's localhost, not the container's. Since nothing is listening inside the container on 127.0.0.1:8500, you get connection refused.

You have two possible solutions:

nyxcharon commented 8 years ago

No longer an issue due to new port. Resolving.