{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/che/issues/1925","repository_url":"https://api.github.com/repos/eclipse/che","labels_url":"https://api.github.com/repos/eclipse/che/issues/1925/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/che/issues/1925/comments","events_url":"https://api.github.com/repos/eclipse/che/issues/1925/events","html_url":"https://github.com/eclipse/che/issues/1925","id":167256349,"number":1925,"title":"Docker Launcher - wrong hostname output when running in a VM","user":{"login":"TylerJewell","id":392458,"avatar_url":"https://avatars.githubusercontent.com/u/392458?v=3","gravatar_id":"","url":"https://api.github.com/users/TylerJewell","html_url":"https://github.com/TylerJewell","followers_url":"https://api.github.com/users/TylerJewell/followers","following_url":"https://api.github.com/users/TylerJewell/following{/other_user}","gists_url":"https://api.github.com/users/TylerJewell/gists{/gist_id}","starred_url":"https://api.github.com/users/TylerJewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TylerJewell/subscriptions","organizations_url":"https://api.github.com/users/TylerJewell/orgs","repos_url":"https://api.github.com/users/TylerJewell/repos","events_url":"https://api.github.com/users/TylerJewell/events{/privacy}","received_events_url":"https://api.github.com/users/TylerJewell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eclipse/che/labels/kind/bug","name":"kind/bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-24T21:48:51Z","updated_at":"2016-07-24T22:21:51Z","closed_at":null,"body":"We print out the wrong hostname in the final line of the che-launcher output if it is running inside of a VM.\r\n\r\n\r\n**Reproduction Steps:**\r\n\r\n1: Launched CentOS 7.2 VM.\r\n\r\n2: Disabled iptables / firewalld.\r\n\r\n3: Installed Docker 1.11.2\r\n\r\n4: `docker run -v /var/run/docker.sock:/var/run/docker.sock \\ \r\n                   -CHE_HOST_IP=192.168.56.110 codenvy/che-launcher:nightly start`\r\n\r\nOutput shows `ECLIPSE CHE: http://localhost:8080`.  It should show `ECLIPSE CHE: http://192.168.56.110`.  I think that the fix is if a user provides `-CHE_HOST_IP` parameter, then we should return that value instead of `localhost`.\r\n\r\nOffending code:\r\nhttps://github.com/eclipse/che/blob/master/dockerfiles/che-launcher/launcher_funcs.sh#L120-L128"},"comment":{"url":"https://api.github.com/repos/eclipse/che/issues/comments/234806395","html_url":"https://github.com/eclipse/che/issues/1925#issuecomment-234806395","issue_url":"https://api.github.com/repos/eclipse/che/issues/1925","id":234806395,"user":{"login":"l0rd","id":606959,"avatar_url":"https://avatars.githubusercontent.com/u/606959?v=3","gravatar_id":"","url":"https://api.github.com/users/l0rd","html_url":"https://github.com/l0rd","followers_url":"https://api.github.com/users/l0rd/followers","following_url":"https://api.github.com/users/l0rd/following{/other_user}","gists_url":"https://api.github.com/users/l0rd/gists{/gist_id}","starred_url":"https://api.github.com/users/l0rd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/l0rd/subscriptions","organizations_url":"https://api.github.com/users/l0rd/orgs","repos_url":"https://api.github.com/users/l0rd/repos","events_url":"https://api.github.com/users/l0rd/events{/privacy}","received_events_url":"https://api.github.com/users/l0rd/received_events","type":"User","site_admin":false},"created_at":"2016-07-24T22:21:51Z","updated_at":"2016-07-24T22:21:51Z","body":"tl;dr You should use `CHE_HOSTNAME`to set Che server hostname and once #1644 is fixed you won't need `CHE_HOST_IP` anymore:\r\n\r\n- The user env variable used to set the hostname is `CHE_HOSTNAME`. \r\n\r\n- `CHE_HOST_IP` is the IP address used by the Che server to contact the wsagent (`localhost`in a Linux VM should work fine). That address don't correspond to the URL users have to put in their address bar (e.g. with Docker for Mac). But `CHE_HOST_IP` is used by the websocket running in the browser too: but in my opinion that's an issue and I've described it in #1644. Moreover `CHE_HOST_IP`is confusing and once #1644 is addressed user won't need to set it anymore (websockets will infer the URL based on the browser address bar).\r\n"}}
{"actor":{"display_login":"l0rd"}}