Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Could not connect to LiveReload server." #110

Open
eramdam opened this issue Jun 13, 2014 · 27 comments
Open

"Could not connect to LiveReload server." #110

eramdam opened this issue Jun 13, 2014 · 27 comments

Comments

@eramdam
Copy link

eramdam commented Jun 13, 2014

When I try to connect guard-livereload to the LiveReload Chrome extension I get this error in Chrome. I'm under Mac OS 10.9.3 with Ruby 2.0.0-p247 using rbenv.

Could not connect to LiveReload server. Please make sure that LiveReload 2.3 (or later) or another compatible server is running.

Here is the content of my Guardfile

guard 'jekyll-plus', :serve => true, :drafts => true do
  watch /.*/
  ignore /^_site/
end

guard 'livereload' do
  watch /.*/
end

And this is the output of guard in the terminal

WARN: Unresolved specs during Gem::Specification.reset:
      rb-inotify (>= 0.9)
      rb-kqueue (>= 0.2)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
15:17:18 - INFO - Guard here! It looks like your project has a Gemfile, yet you are running
> [#] `guard` outside of Bundler. If this is your intent, feel free to ignore this
> [#] message. Otherwise, consider using `bundle exec guard` to ensure your
> [#] dependencies are loaded correctly.
> [#] (You can run `guard` with --no-bundler-warning to get rid of this message.)
Configuration file: _config.yml
15:17:19 - INFO - Guard is using  to send notifications.
15:17:19 - INFO - Jekyll building...
    Server address: http://0.0.0.0:4000
  Server running... press ctrl-c to stop.
15:17:26 - INFO - Jekyll build complete ./ → _site
15:17:26 - INFO - Jekyll watching and serving at 0.0.0.0:4000/
15:17:26 - INFO - LiveReload is waiting for a browser to connect.
15:17:26 - INFO - Guard is now watching at '/Users/Damien/Documents/LBSRF'
[1] guard(main)> 15:17:28 - INFO - Browser connected.
15:17:28 - INFO - Browser disconnected.
@thibaudgg
Copy link
Member

Weird because there's 15:17:28 - INFO - Browser connected., are you using the last version of the LiveReload chrome extension?

@eramdam
Copy link
Author

eramdam commented Jun 16, 2014

@thibaudgg Yeah, I use the Web Store version (2.0.9), is this really the last version ? https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei

@thibaudgg
Copy link
Member

Hmm, what the url of your assets in your browser? Because with watch /.*/ guard-livereload will send the local path to the browser, maybe guard-jekyll-plus is serving something different.

@eramdam
Copy link
Author

eramdam commented Jun 16, 2014

The assets got link without http at the beginning (things like "/images/image.png"). If you wanna try on my projet, you can clone http://github.com/eramdam/LBSRF and try for yourself, as I'm a complete noob in Ruby/Guard 😁

@thibaudgg
Copy link
Member

Sadly I haven't much time this week, maybe you could try to ask on support@livereload.com, thanks!

@eramdam
Copy link
Author

eramdam commented Jun 16, 2014

Don't worry, I can wait ;)

@alexpchin
Copy link

Any solution to this issue?

@thibaudgg
Copy link
Member

@alexpchin no idea, please try to contact support@livereload.com.

@tristil
Copy link

tristil commented Aug 22, 2014

For others with this problem try changing the host to '127.0.0.1' I also had to upgrade to the most recent version or there would be an error when it actually tried to connect.

@phyllisstein
Copy link

@tristil That did the trick for me—thanks so much for the tip!

@jrodl3r
Copy link

jrodl3r commented Sep 2, 2014

While testing out Grunt operations, livereload servers were started and (assumedly) stopped consecutively 5 of 6 times - Then this issue started happening. I tried all the posted solutions to resolve and even saw them still running as node commands using: lsof -iTCP:35729. Ultimately, the only thing that worked for me was to close and relaunch the terminal app (iTerm2).

@volkanunsal
Copy link

Same thing is happening for me. I also see an error in the console:

WebSocket connection to 'ws://0.0.0.0:35729/livereload' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

This started happening after I tried out a Node project that uses tiny-lr to watch for changes in the file system. After using that, Node processes are able to watch for changes but Ruby processes are not able to anymore.

@amites
Copy link

amites commented Sep 19, 2014

I'm getting this error as of a couple days ago

host was already defined as '127.0.0.1'

12:13:36 - INFO - LiveReload is waiting for a browser to connect.
12:13:38 - INFO - Browser connected.
12:13:38 - INFO - Browser disconnected.

same in browser pop-up error

@amites
Copy link

amites commented Sep 19, 2014

when I add the livereload js to the browser it outputs the following in console

GET http://localhost:35729/livereload.js?snipver=1 net::ERR_EMPTY_RESPONSE 

and guard doesn't report any attempts to connect

hoping someone with more Ruby experience can take a stab at this 👍

@amites
Copy link

amites commented Sep 25, 2014

tinkering with this a bit more seems similar to issues #37

the following was run after try to connect with a browser -- IP has been defined as 127.0.0.1

$ telnet 127.0.0.1 35729
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

this comes back when I restart the server and connect with telnet first

$ telnet 127.0.0.1 35729
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

uggg...

@volkanunsal
Copy link

I switched to using gulp-livereload. It works pretty well. This is my Gulpfile, in case anyone is interested.

@exlee
Copy link

exlee commented Sep 26, 2014

I'm experiencing the same problem using Ruby 2.1.1 with RVM on OSX 10.9.5. Both Firefox and Chrome show this issue. I've noticed that after initial connection port closes.

Tried connecting both through 'localhost' as well as through IP127.0.0.1.

@podo
Copy link

podo commented Oct 16, 2014

Any progress with this issue? I have the same problem.

@eramdam eramdam closed this as completed Oct 16, 2014
@amites
Copy link

amites commented Oct 16, 2014

there are numerous reports of this same issue, yet you closed it without any notice of an update or request for testing?

come on.... poor project management 👎

@volkanunsal
Copy link

@eramdam isn't the project owner. He probably wanted to stop the notifications coming from this issue, not to close it. He should have unsubscribed from it instead.

@jasperf
Copy link

jasperf commented Nov 16, 2014

Having the same issue now
WebSocket connection to 'ws://127.0.0.1:35729/livereload' failed: Error in connection
establishment:net::ERR_CONNECTION_REFUSED
Using a local virtualhost file to load the site under site.local. Really want to keep on using it instead of 127.0.0.1 ..

@ghost
Copy link

ghost commented Oct 15, 2015

changing 0.0.0.0 to 127.0.0.1 solved the issue for me try it

@njt1982
Copy link

njt1982 commented Oct 26, 2015

the localhost thing did not fix it for me:

WebSocket connection to 'ws://127.0.0.1:35729/livereload' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

I also get:

GET http://127.0.0.1:35729/livereload.js?ext=Chrome&extver=2.1.0 net::ERR_CONNECTION_REFUSED

@e2
Copy link
Contributor

e2 commented Oct 26, 2015

If anyone here is having connection issues, I urge you to first try: #150

and let me know if work (or not!).

@njt1982
Copy link

njt1982 commented Oct 28, 2015

@e2 Tried it - didn't work, see coments in #150.

@njt1982
Copy link

njt1982 commented Oct 29, 2015

I can confirm that #150 is much better now I am running a decent version of Ruby ;)

@Klass-A
Copy link

Klass-A commented May 11, 2018

It could be that you have a new setup and haven't installed Livereload extension in your Text Editor.
Had the same issue, but solved my problem by installing Livereload in Sublime.

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

No branches or pull requests

16 participants