正在将Elixir Docker部署到Heroku,无法设置长节点名

xytpbqjk  于 2022-11-22  发布在  Docker
关注(0)|答案(2)|浏览(119)

我正在尝试将Dockerfile部署到Heroku,当应用程序启动时,它立即崩溃并显示以下错误:

=INFO REPORT==== 2-Apr-2022::16:20:30.959748 ===
Can't set long node name!
Please check your configuration

=SUPERVISOR REPORT==== 2-Apr-2022::16:20:30.960208 ===
supervisor: {local,net_sup}
errorContext: start_error
reason: {'EXIT',nodistribution}
offender: [{pid,undefined},
{id,net_kernel},
{mfargs,{net_kernel,start_link,
[[api@,longnames],true,net_sup]}},
{restart_type,permanent},
{significant,false},
{shutdown,2000},
{child_type,worker}]

=CRASH REPORT==== 2-Apr-2022::16:20:30.960246 ===
crasher:
initial call: net_kernel:init/1
pid: <0.3363.0>
registered_name: []
exception exit: {error,badarg}
in function  gen_server:init_it/6 (gen_server.erl, line 407)
ancestors: [net_sup,kernel_sup,<0.3349.0>]
message_queue_len: 0
messages: []
links: [<0.3360.0>]
dictionary: [{longnames,true}]
trap_exit: true
status: running
heap_size: 987
stack_size: 28
reductions: 770
neighbours:

=SUPERVISOR REPORT==== 2-Apr-2022::16:20:30.963246 ===
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}]

=CRASH REPORT==== 2-Apr-2022::16:20:30.966821 ===
crasher:
initial call: application_master:init/4
pid: <0.3348.0>
registered_name: []
exception exit: {{shutdown,
{failed_to_start_child,net_sup,
{shutdown,
{failed_to_start_child,net_kernel,
{'EXIT',nodistribution}}}}},
{kernel,start,[normal,[]]}}
in function  application_master:init/4 (application_master.erl, line 142)
ancestors: [<0.3347.0>]
message_queue_len: 1
messages: [{'EXIT',<0.3349.0>,normal}]
links: [<0.3347.0>,<0.3346.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 610
stack_size: 28
reductions: 165
neighbours:

=INFO REPORT==== 2-Apr-2022::16:20:30.967283 ===
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,[]]}}}"}
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}}}}},{ker

Crash dump is being written to: erl_crash.dump...done
Process exited with status 1
State changed from starting to crashed

让我知道,如果有具体的信息,你需要帮助我缩小问题。
有人有什么想法吗?

vngu2lb8

vngu2lb81#

我有一个rel/env.sh.eex文件

export RELEASE_DISTRIBUTION=name
export RELEASE_NODE=api@${POD_IP}

其中未设置POD_IP,导致错误。

xiozqbni

xiozqbni2#

你应该检查你的电脑的操作系统主机名。它应该包含“.",否则长名称不能使用。

相关问题