Coder Social home page Coder Social logo

Comments (20)

jonatanklosko avatar jonatanklosko commented on June 13, 2024

Can you also try the nightly desktop build to make sure it's still present there?

from livebook.

mat-hek avatar mat-hek commented on June 13, 2024

Yes. With the nightly build, when I first clicked 'New notebook' from the Livebook icon menu, it shut down. After trying again, the app feels slow and the UI hangs, and the original problem persists.

from livebook.

jonatanklosko avatar jonatanklosko commented on June 13, 2024

Curious, is it the same if you run as escript or from source? It would be helpful to know if it is or isn't specific to the desktop app.

When I connect to a manually created runtime, everything works well.

You mean using the attached runtime, or something else?

from livebook.

mat-hek avatar mat-hek commented on June 13, 2024

Just installed via escript and it's the same.

You mean using the attached runtime, or something else?

The attached runtime

from livebook.

jonatanklosko avatar jonatanklosko commented on June 13, 2024

Ok, so it could be something with hostname resolution. And does it work if you start with LIVEBOOK_DISTRIBUTION=name [email protected]?

from livebook.

mat-hek avatar mat-hek commented on June 13, 2024

Yes, now it works 🎉

from livebook.

jonatanklosko avatar jonatanklosko commented on June 13, 2024

Interesting, people run into this several times due to unset or invalid host names and we even have a section on it here, but we check the resolution on boot, so I would expect an error. You can check if the host is set with scutil --get HostName.

from livebook.

jonatanklosko avatar jonatanklosko commented on June 13, 2024

It's particularly curious that it worked by attaching manually, if you want to debug more, you can check if this returns expected hostnames:

$ iex -S mix phx.server
iex> node()
:livebook_ly3srpox@chonker
iex> Livebook.Runtime.NodePool.get_name(node())
:"a34dmksi-livebook_ly3srpox@chonker"

from livebook.

mat-hek avatar mat-hek commented on June 13, 2024
scutil --get HostName
HostName: not set
Interactive Elixir (1.16.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(livebook_as2mazzi@Mateuszs-MacBook-Pro-2)1> node
:"livebook_as2mazzi@Mateuszs-MacBook-Pro-2"
iex(livebook_as2mazzi@Mateuszs-MacBook-Pro-2)2> Livebook.Runtime.NodePool.get_name node
:"vjqoxwku-livebook_as2mazzi@Mateuszs-MacBook-Pro-2"
iex(livebook_as2mazzi@Mateuszs-MacBook-Pro-2)3>

from livebook.

jonatanklosko avatar jonatanklosko commented on June 13, 2024

Ah, so it is actually the same issue, you want to set the host name as noted here.

@josevalim anything else we should be asserting in the hostname resolution check?

from livebook.

mat-hek avatar mat-hek commented on June 13, 2024

Hmm, it doesn't help 🤔 still the same behaviour

from livebook.

jonatanklosko avatar jonatanklosko commented on June 13, 2024

So there must be something else about the environment. I updated to Sonoma 14.4.1 and tried Desktop nightly to ensure the same versions, but couldn't reproduce :<

from livebook.

josevalim avatar josevalim commented on June 13, 2024

Yeah, this is a new issue, not sure how to spot it. :( probably better to wait for more cases to see how prevalent it is

from livebook.

mat-hek avatar mat-hek commented on June 13, 2024

Ok, I can help debugging further if you need ;) For now, is it possible to set LIVEBOOK_NODE and LIVEBOOK_DISTRIBUTION vars in the Livebook desktop?

from livebook.

hugobarauna avatar hugobarauna commented on June 13, 2024

Ok, I can help debugging further if you need ;) For now, is it possible to set LIVEBOOK_NODE and LIVEBOOK_DISTRIBUTION vars in the Livebook desktop?

Yes, you can use the ~/.livebookdesktop.sh file to set env vars. More about that here: https://github.com/livebook-dev/livebook?tab=readme-ov-file#livebook-desktop

from livebook.

mat-hek avatar mat-hek commented on June 13, 2024

eh, when I set

export LIVEBOOK_DISTRIBUTION=name
export [email protected]

in ~/.livebookdesktop.sh, the application crashes on startup and this is logged:

2024-04-15 15:27:13.111801 
    args: []
    label: {error_logger,info_msg}
    format: "Can't set short node name!\nPlease check your configuration\n"
2024-04-15 15:27:13.111840 crash_report        
    initial_call: {net_kernel,init,['Argument__1']}
    pid: <0.64.0>
    registered_name: []
    error_info: {exit,{error,badarg},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,961}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,241}]}]}
    ancestors: [net_sup,kernel_sup,<0.47.0>]
    message_queue_len: 0
    messages: []
    links: [<0.61.0>]
    dictionary: [{longnames,false}]
    trap_exit: true
    status: running
    heap_size: 610
    stack_size: 28
    reductions: 348
2024-04-15 15:27:13.111851 supervisor_report   
    supervisor: {local,net_sup}
    errorContext: start_error
    reason: {'EXIT',nodistribution}
    offender: [{pid,undefined},{id,net_kernel},{mfargs,{net_kernel,start_link,[#{name=>'[email protected]',supervisor=>net_sup,name_domain=>shortnames,clean_halt=>true}]}},{restart_type,permanent},{significant,false},{shutdown,2000},{child_type,worker}]
2024-04-15 15:27:13.111874 supervisor_report   
    supervisor: {local,kernel_sup}
    errorContext: start_error
    reason: {shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}
    offender: [{pid,undefined},{id,net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanent},{significant,false},{shutdown,infinity},{child_type,supervisor}]
2024-04-15 15:27:13.112463 crash_report        
    initial_call: {application_master,init,['Argument__1','Argument__2','Argument__3','Argument__4']}
    pid: <0.46.0>
    registered_name: []
    error_info: {exit,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{kernel,start,[normal,[]]}},[{application_master,init,4,[{file,"application_master.erl"},{line,142}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,241}]}]}
    ancestors: [<0.45.0>]
    message_queue_len: 1
    messages: [{'EXIT',<0.47.0>,normal}]
    links: [<0.45.0>,<0.44.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 233
    stack_size: 28
    reductions: 167
2024-04-15 15:27:13.112438 Error in process ~p with exit value:~n~p~n
	<0.65.0>
	{badarg,[{erlang,send,[code_server,{code_call,<0.65.0>,{load_module,#Ref<0.1242819413.1615724547.207451>,logger_formatter,"/Applications/Livebook.app/Contents/Resources/rel/vendor/otp/lib/kernel-9.2/ebin/logger_formatter.beam",false,#Ref<0.1242819413.1615593475.207450>}}],[{error_info,#{module=>erl_erts_errors}}]},{code_server,call,1,[{file,"code_server.erl"},{line,150}]},{error_handler,undefined_function,3,[{file,"error_handler.erl"},{line,40}]},{logger_simple_h,'-do_log/2-fun-0-',1,[{file,"logger_simple_h.erl"},{line,154}]}]}
2024-04-15 15:27:13.112523 std_info            
    application: kernel
    exited: {{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{kernel,start,[normal,[]]}}
    type: permanent
Kernel pid terminated (application_controller) ("{application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{kernel,start,[normal,[]]}}}")

Crash dump is being written to: erl_crash.dump...done

LIVEBOOK_DISTRIBUTION=name [email protected] livebook server works

from livebook.

jonatanklosko avatar jonatanklosko commented on June 13, 2024

@mat-hek try RELEASE_DISTRIBUTION=name instead. We should be setting it based on LIVEBOOK_DISTRIBUTION, but looks like the app env.sh doesn't.

from livebook.

mat-hek avatar mat-hek commented on June 13, 2024

Now the app starts, but the original problem persists

from livebook.

jonatanklosko avatar jonatanklosko commented on June 13, 2024

@mat-hek please try nightly desktop with LIVEBOOK_DISTRIBUTION=name [email protected], I've just rebuilt it to include the fix from #2570.

from livebook.

mat-hek avatar mat-hek commented on June 13, 2024

Works now! Thanks ;)

from livebook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.