livebook
livebook copied to clipboard
Crashes on startup on Mac
Environment
- Elixir & Erlang/OTP versions (elixir --version): 1.16.1-otp-26
- Operating system: 26.2.1
- How have you started Livebook (mix phx.server, livebook CLI, Docker, etc): Livebook Desktop
- Livebook version (use
git rev-parse HEAD
if running with mix): 0.12.1 - Browsers that reproduce this bug (the more the merrier): all
- Include what is logged in the browser console:
- Include what is logged to the server console:
Current behavior
When launching Livebook Desktop, it shuts down, and the following content is left in the log.
Protocol 'inet_tcp': the name livebook_app@<host> seems to be in use by another Erlang node
However, no other Livebook instances are running, and checking with ps aux | grep beam does not seem to show that the node is launched.
Expected behavior
no error
I tried to delete and reinstall livebook desktop, but it doesn't work.
Can you try epmd -names
? It may tell you the port the other instance is running.
killall beam.smp
does the job for me though it is weird you were grepping for beam and not finding anything. Yeah id try searching for Livebook process too.
-
epmd -names
epmd: up and running on port 4369 with data:
- Open livebook desktop
- no new browser window open <-- actually error
-
epmd -names
epmd: up and running on port 4369 with data:
name livebook_app at port 65380
- Click
Open
in the menu of livebook - Crash: Livebook exited with error status 1
When I waited for long time after opening livebook desktop
ERROR!!! [Livebook] Your hostname "Jinkyous-MacBook-Pro" does not resolve to a loopback address (127.0.0.0/8), which indicates something wrong in your OS configuration, or EPMD is not running.
To address this issue, you might:
* Consult our Installation FAQ:
https://github.com/livebook-dev/livebook/wiki/Installation-FAQ
* Configure your Livebook Desktop to use long names by creating a file at /Users/json/.livebookdesktop.sh with:
export LIVEBOOK_DISTRIBUTION=name
export [email protected]
* If the issue persists, please file a bug report
And I found an issue in elixirforum https://elixirforum.com/t/livebook-failure-on-macosx/50227/5
Following the steps from the message helps?
Following the steps from the message helps?
No. It doesn't work.
I am seeing the same behavior as @nallwhy, but with a different error in the logs. The name livebook_app at port 65380
line in the quoted text also doesn't ever appear for me.
epmd -names
epmd: up and running on port 4369 with data:
- Open livebook desktop
- no new browser window open <-- actually error
epmd -names
epmd: up and running on port 4369 with data:
- Click
Open
in the menu of livebook- Crash: Livebook exited with error status 1
The logs I see after livebook has crashed look like this:
07:08:41.857 [error] GenServer #PID<0.748.0> terminating
** (KeyError) key :pid not found in: nil. If you are using the dot syntax, such as map.field, make sure the left-hand side of the dot is a map
(livebook 0.9.0) lib/livebook_web/channels/js_view_channel.ex:54: LivebookWeb.JSViewChannel.handle_in/3
(phoenix 1.7.1) lib/phoenix/channel/server.ex:317: Phoenix.Channel.Server.handle_info/2
(stdlib 4.0.1) gen_server.erl:1120: :gen_server.try_dispatch/4
(stdlib 4.0.1) gen_server.erl:1197: :gen_server.handle_msg/6
(stdlib 4.0.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Last message: %Phoenix.Socket.Message{topic: "js_view", event: "ping", payload: %{"ref" => "f3c45gjzssrovbutsjhdr3kxe4fj3u3j"}, ref: "128", join_ref: "127"}
[os_mon] memory supervisor port (memsup): Erlang has closed
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
[Livebook] Application running at http://localhost:60038/?token=kthpahqndruolsoqevisqu5ecuadmxky
[os_mon] memory supervisor port (memsup): Erlang has closed
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
[Livebook] Application running at http://localhost:52889/?token=dm7ueawe7xiqnfobqgajn5e3mlepknbk
[Livebook] Application running at http://localhost:50584/?token=ylbuknhjulpazhz62j36uwkk5dgfqmbr
[Livebook] Application running at http://localhost:53483/?token=rjjd5r35xuqqznv2omksnuuep4xrmzj3
[Livebook] Application running at http://localhost:61763/?token=p4q6mkdy63eeobdqodidm62jyac37fhb
Protocol 'inet_tcp': register/listen error: etimedout
If this looks like a different issue, let me know and I'll open another one.
@jmcdl it seems in your case Livebook was running fine before, correct? did something change once it started failing? Did you upgrade the OS version for example?
If this looks like a different issue, let me know and I'll open another one.
For the record, I think that error would never happen on the latest Livebook, but yeah, it's not related to booting.
@josevalim It appears my bug has resolved itself after I fully exited VS Code. I had a project open that included some elixir scripts and livemd files. When I tried to exit VS Code I was shown a prompt asking if I wanted to terminate the running livebook process (I don't remember exact wording). I said yes and after that I was able to run livebook like normal using macOS 14.3.1.
For the record, I had already restarted my macbook while debugging the issue but VS Code was opened again automatically. The problem was only resolved after I restarted and then deliberately exited VS Code. So kind of weird, but definitely not related to this issue. Thanks for jumping in.
Not the same issue, but I'll let the dev to judge if it's related.
I can install the app ok on Mac, but when adding a folder with about 12K parquet files, it just freezes and I have to kill the process to get my Mac back in working conditions. The memory allocations goes nuts without even actually opening any file yet. Just adding the folder with files
Thx
@kuatroka can you please do a separate report? Please try to include more steps for reproduction. I assume this is related to the directory size, assuming you are literally trying to add 12K files to Livebook. We should maybe detect such cases or allows directories to be added instead.
I started running into the issue described in the initial report as well:
Protocol 'inet_tcp': the name livebook_app@jc-mb21-macos seems to be in use by another Erlang node
All I did was quit the Livebook Desktop app from the menubar, then attempt to reopen it through Spotlight.
$ epmd -names
epmd: up and running on port 4369 with data:
name livebook_app at port 53294
Livebook does not show up in Activity Monitor, and killall beam.smp
did not work: ps aux | grep beam
shows no Erlang processes.
Is it fixed if you restart the computer? @wojtekmach maybe we should use a random name for each Livebook instance? Or do we use livebook_app to communicate with it somehow?
Ah sorry, I am no longer in that state but I see it again I’ll try that and report back. I ended up giving up and just installing the escript version of Livebook, which launched fine even when the desktop app refused to launch.
Random name should work. UI talks with Elixir backend over separate tcp socket.
As another datapoint, I was having the same issue (latest macOS, erlang & elixir) and fixed it with the instructions from the FAQ, specifically my issue was that the hostname wasn't set. I set it with:
$ sudo scutil --set HostName _