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

Windows 10 - Protocol 'inet_tcp': register/listen error: econnrefused #196

Closed
samaaron opened this issue Apr 15, 2021 · 4 comments
Closed

Comments

@samaaron
Copy link

Hi,

I just tried to get livebook up and running on Windows 10.

I cloned the repo, fetched the deps and the only thing I changed from the README's instructions was to set the env variable as a separate command (I couldn't figure how to do this on the same line as is typical for bash-like shells).

However, whilst the firewall did pop up a window to ask me for permission (and I've checked the rules and all instances of erl.exe do have permission) it failed to boot:

C:\Users\samaa\Development\elixir\livebook>set MIX_ENV=prod

C:\Users\samaa\Development\elixir\livebook>mix phx.server
==> earmark_parser
Compiling 1 file (.yrl)
Compiling 2 files (.xrl)
Compiling 3 files (.erl)
Compiling 32 files (.ex)
Generated earmark_parser app
===> Compiling ranch
===> Compiling telemetry
==> telemetry_metrics
Compiling 7 files (.ex)
Generated telemetry_metrics app
===> Compiling telemetry_poller
==> jason
Compiling 8 files (.ex)
Generated jason app
==> phoenix_pubsub
Compiling 11 files (.ex)
Generated phoenix_pubsub app
===> Compiling cowlib
===> Compiling cowboy
===> Compiling cowboy_telemetry
==> mime
Compiling 2 files (.ex)
Generated mime app
==> plug_crypto
Compiling 5 files (.ex)
Generated plug_crypto app
==> plug
Compiling 1 file (.erl)
Compiling 41 files (.ex)
warning: System.stacktrace/0 is deprecated, use __STACKTRACE__ instead
  lib/plug/conn/wrapper_error.ex:23

Generated plug app
==> phoenix_html
Compiling 8 files (.ex)
Generated phoenix_html app
==> plug_cowboy
Compiling 5 files (.ex)
Generated plug_cowboy app
==> phoenix
Compiling 66 files (.ex)
Generated phoenix app
==> phoenix_live_view
Compiling 22 files (.ex)
Generated phoenix_live_view app
==> phoenix_live_dashboard
Compiling 36 files (.ex)
Generated phoenix_live_dashboard app
==> livebook
Compiling 70 files (.ex)
Generated livebook app
09:44:35.165 [info] Protocol 'inet_tcp': register/listen error: econnrefused

** (Mix) Could not start application livebook: exited in: Livebook.Application.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (RuntimeError) failed to start distributed node
            (livebook 0.1.0) lib/livebook/application.ex:47: Livebook.Application.ensure_distribution!/0
            (livebook 0.1.0) lib/livebook/application.ex:9: Livebook.Application.start/2
            (kernel 7.2) application_master.erl:277: :application_master.start_it_old/4
09:44:35.169 [info] Application livebook exited: exited in: Livebook.Application.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (RuntimeError) failed to start distributed node
            (livebook 0.1.0) lib/livebook/application.ex:47: Livebook.Application.ensure_distribution!/0
            (livebook 0.1.0) lib/livebook/application.ex:9: Livebook.Application.start/2
            (kernel 7.2) application_master.erl:277: :application_master.start_it_old/4

C:\Users\samaa\Development\elixir\livebook>mix phx.server
09:44:51.824 [info] Protocol 'inet_tcp': register/listen error: econnrefused

09:44:51.831 [info] Application livebook exited: exited in: Livebook.Application.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (RuntimeError) failed to start distributed node
            (livebook 0.1.0) lib/livebook/application.ex:47: Livebook.Application.ensure_distribution!/0
            (livebook 0.1.0) lib/livebook/application.ex:9: Livebook.Application.start/2
            (kernel 7.2) application_master.erl:277: :application_master.start_it_old/4
** (Mix) Could not start application livebook: exited in: Livebook.Application.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (RuntimeError) failed to start distributed node
            (livebook 0.1.0) lib/livebook/application.ex:47: Livebook.Application.ensure_distribution!/0
            (livebook 0.1.0) lib/livebook/application.ex:9: Livebook.Application.start/2
            (kernel 7.2) application_master.erl:277: :application_master.start_it_old/4
@juhalehtonen
Copy link
Contributor

Hi Sam! What happens if you first run iex --sname test or equivalent, and then try to start Livebook again? Does Windows ask you for any additional firewall rules?

@samaaron
Copy link
Author

Yep, that fixed it.

Running iex --sname test made the firewall ask me to allow epmd.exe which then allowed mix phx.server to run :-)

Did I miss a step somewhere?

@josevalim
Copy link
Contributor

@samaaron No, nothing is missing. I will improve the error message. :)

@samaaron
Copy link
Author

Thanks @juhalehtonen and @josevalim!

LiveBook does now start, but now I can't evaluate any code. I'm guessing it's similar to #194

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

No branches or pull requests

3 participants