Skip to content

erl.exe -noshell -eval erlang:get_cookie() -s init stop -name undefined failed with Can't set long node name! #9736

@inikulshin

Description

@inikulshin

Describe the bug
erl.exe -noshell -eval erlang:get_cookie() -s init stop -name undefined failed with

  Can't set long node name!
  Please check your configuration
  
  2025-04-14 15:58:55.230000 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,true}]
      trap_exit: true
      status: running
      heap_size: 6772
      stack_size: 28
      reductions: 2516
  2025-04-14 15:58:55.230000 supervisor_report   
      supervisor: {local,net_sup}
      errorContext: start_error
      reason: {'EXIT',nodistribution}
      offender: [{pid,undefined},{id,net_kernel},{mfargs,{net_kernel,start_link,[#{name=>undefined,supervisor=>net_sup,name_domain=>longnames,clean_halt=>true}]}},{restart_type,permanent},{significant,false},{shutdown,2000},{child_type,worker}]
  2025-04-14 15:58:55.230000 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}]
  2025-04-14 15:58:55.230000 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: 376
      stack_size: 28
      reductions: 169
  2025-04-14 15:58:55.230000 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,[]]}}}")

To Reproduce
I can't reproduce it, same command worked thousands times before. But maybe as a code authors you can think of reproduction scenario/environment.

Expected behavior
Must succeed, according to https://www.erlang.org/docs/26/man/erl#flags

If Name is set to undefined the node will be started in a special mode optimized to be the temporary client of another node.

Affected versions
26.2.5 on Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue is reported as a bugstalledwaiting for input by the Erlang/OTP teamteam:PSAssigned to OTP team PSteam:VMAssigned to OTP team VM

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions