Skip to content
This repository has been archived by the owner on Nov 11, 2018. It is now read-only.

can not establish a connection to the server #100

Open
guillaumevincent opened this issue Dec 23, 2014 · 6 comments
Open

can not establish a connection to the server #100

guillaumevincent opened this issue Dec 23, 2014 · 6 comments
Labels

Comments

@guillaumevincent
Copy link
Contributor

Hi,

TV doesn't work if the hostname is not properly configured.

Firefox can not establish a connection to the server at ws://hostname:59755/

hostname should point to 127.0.0.1 in /etc/hosts.
I know this is not related to TV, but maybe it could be noted in the doc ? (known issue)

@geek geek added the request label Dec 23, 2014
@geek
Copy link
Contributor

geek commented Dec 23, 2014

I think I'll move it to use the origins hostname serving the page, and use a websocket path instead of a separate listener/port.

@guillaumevincent
Copy link
Contributor Author

yes maybe tv can use the host define in server.connection({host: 'localhost', port: 3000}); from hapi server

@osukaa
Copy link
Contributor

osukaa commented Jan 21, 2015

I think my problem is related. Because when I access the Tv console I can see it but on the Chrome Dev Tools it shows -> WebSocket connection to 'ws://localhost:42421/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

@realyze
Copy link

realyze commented Apr 26, 2015

+1 seeing similar error with Chrome 41 on Mac Yosemite, node 0.12.0.

WebSocket connection to 'ws://tomass-mbp:59087/' failed: Error in connection establishment: net::ERR_NAME_NOT_RESOLVED

@geek
Copy link
Contributor

geek commented Apr 27, 2015

@realyze when you register tv set the host option to localhost or 127.0.0.1 (https://github.com/hapijs/tv#options)

@craigbeck
Copy link

What about using the hostname form the request location? I've had the same issue where the hostname of the machine is not directly routable e.g. I can reach the debug console at http://myservice.example.com/debug/console but the hostname that the app tries to connect to is a hostname which is not routeable. See this PR: https://github.com/craigbeck/tv/pull/1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants