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

Crashed downstream_socket_closed #76

Open
kuituoshi opened this issue Mar 31, 2022 · 0 comments
Open

Crashed downstream_socket_closed #76

kuituoshi opened this issue Mar 31, 2022 · 0 comments

Comments

@kuituoshi
Copy link

I use seriyps/mtproto-proxy docker image from docker HUB

Setup with ENV:

ENV MTP_DD_ONLY=t
MTP_TLS_ONLY=t
MTP_PORT=32000
MTP_TAG=435a1eb5a556192a3f3b1d4519546a0e
MTP_SECRET=05c12a287334386c94131ab8aa00d08a

** it work well on Docker, But get crashed when i deploy image on Kubernetes

Crash Text:

Exec: /opt/mtp_proxy/erts-10.3.5.6/bin/erlexec -noshell -noinput +Bd -boot /opt/mtp_proxy/releases/0.1.0/mtp_proxy -mode embedded -boot_var ERTS_LIB_DIR /opt/mtp_proxy/lib -config /opt/mtp_proxy/releases/0.1.0/sys.config -args_file /opt/mtp_proxy/releases/0.1.0/vm.args -- foreground -mtproto_proxy allowed_protocols [mtp_fake_tls,mtp_secure] -mtproto_proxy ports [#{name => mtproto_proxy, port => 32000, secret => <<"05c12a287334386c94131ab8aa00d08a">>, tag => <<"435a1eb5a556192a3f3b1d4519546a0e">>}]
Root: /opt/mtp_proxy
/opt/mtp_proxy
=ERROR REPORT==== 31-Mar-2022::15:05:37.420087 ===
** Generic server <0.595.0> terminating
** Last message in was {tcp_closed,#Port<0.11>}
** When Server state == {state,handshake_2,
{#Ref<0.1177133258.1843920897.113713>,
<<"IPIPPRPDTIME">>},
#Port<0.11>,
<<0,0,0,0,0,0,0,0,0,0,255,255,47,75,119,120,245,
231,0,0>>,
{codec,false,undefined,<<>>,mtp_aes_cbc,
{baes_st,16,
{<<139,59,62,196,244,65,159,133,176,7,181,
169,197,40,152,108,94,255,41,114,141,
236,214,101,44,218,142,143,36,84,190,87>>,
<<164,42,71,78,253,218,124,242,191,147,
53,63,218,174,26,101>>},
{<<196,73,121,12,108,203,45,227,248,180,
191,235,179,90,230,31,44,61,152,167,210,
243,110,101,163,125,66,18,119,116,0,107>>,
<<18,44,174,160,165,176,46,151,95,99,61,
179,99,174,207,66>>}},
<<>>,mtp_full,
{full_st,0,-1},
<<>>,5242880},
#{},#{},false,0,0,
{600,9216000,undefined,undefined},
<0.594.0>,-5,
{{91,108,56,135},8888}}
** Reason for termination ==
** downstream_socket_closed

=CRASH REPORT==== 31-Mar-2022::15:05:37.420488 ===
crasher:
initial call: mtp_down_conn:init/1
pid: <0.595.0>
registered_name: []
exception exit: downstream_socket_closed
in function gen_server:handle_common_reply/8 (gen_server.erl, line 751)
ancestors: [mtp_down_conn_sup,mtproto_proxy_sup,<0.583.0>]
message_queue_len: 0
messages: []
links: [<0.585.0>]
dictionary: [{rand_seed,{#{bits => 58,jump => #Fun<rand.8.10897371>,
next => #Fun<rand.5.10897371>,type => exrop,
uniform => #Fun<rand.6.10897371>,
uniform_n => #Fun<rand.7.10897371>,
weak_low_bits => 1},
[200693041784962431|266295928046582784]}},
{metric_backend,false}]
trap_exit: false
status: running
heap_size: 4185
stack_size: 27
reductions: 11851
neighbours:

=SUPERVISOR REPORT==== 31-Mar-2022::15:05:37.420998 ===
supervisor: {local,mtp_down_conn_sup}
errorContext: child_terminated
reason: downstream_socket_closed
offender: [{pid,<0.595.0>},
{id,mtp_down_conn},
{mfargs,{mtp_down_conn,start_link,undefined}},
{restart_type,temporary},
{shutdown,2000},
{child_type,worker}]
=ERROR REPORT==== 31-Mar-2022::15:05:37.421233 ===
** Generic server <0.596.0> terminating
** Last message in was {tcp_closed,#Port<0.12>}
** When Server state == {state,handshake_2,
{#Ref<0.1177133258.1843920897.113715>,
<<"IPIPPRPDTIME">>},
#Port<0.12>,
<<0,0,0,0,0,0,0,0,0,0,255,255,47,75,119,120,67,230,
0,0>>,
{codec,false,undefined,<<>>,mtp_aes_cbc,
{baes_st,16,
{<<187,35,208,210,52,157,183,56,58,42,165,
231,50,152,60,116,249,169,215,96,216,
132,68,134,72,40,63,7,34,59,11,66>>,
<<121,90,135,21,73,73,232,144,177,124,
187,35,111,248,105,117>>},
{<<155,240,181,134,97,33,246,159,233,188,4,
111,50,40,73,96,108,251,131,141,12,51,
100,230,248,41,21,2,166,122,163,231>>,
<<55,159,78,204,50,11,227,247,125,121,
116,107,176,221,134,21>>}},
<<>>,mtp_full,
{full_st,0,-1},
<<>>,5242880},
#{},#{},false,0,0,
{600,9216000,undefined,undefined},
<0.594.0>,-5,
{{91,108,56,104},8888}}
** Reason for termination ==
** downstream_socket_closed

=CRASH REPORT==== 31-Mar-2022::15:05:37.421599 ===
crasher:
initial call: mtp_down_conn:init/1
pid: <0.596.0>
registered_name: []
exception exit: downstream_socket_closed
in function gen_server:handle_common_reply/8 (gen_server.erl, line 751)
ancestors: [mtp_down_conn_sup,mtproto_proxy_sup,<0.583.0>]
message_queue_len: 0
messages: []
links: [<0.585.0>]
dictionary: [{rand_seed,{#{bits => 58,jump => #Fun<rand.8.10897371>,
next => #Fun<rand.5.10897371>,type => exrop,
uniform => #Fun<rand.6.10897371>,
uniform_n => #Fun<rand.7.10897371>,
weak_low_bits => 1},
[257785629336968061|45741827214882228]}},
{metric_backend,false}]
trap_exit: false
status: running
heap_size: 4185
stack_size: 27
reductions: 11804
neighbours:

=SUPERVISOR REPORT==== 31-Mar-2022::15:05:37.421962 ===
supervisor: {local,mtp_down_conn_sup}
errorContext: child_terminated
reason: downstream_socket_closed
offender: [{pid,<0.596.0>},
{id,mtp_down_conn},
{mfargs,{mtp_down_conn,start_link,undefined}},
{restart_type,temporary},
{shutdown,2000},
{child_type,worker}]
=CRASH REPORT==== 31-Mar-2022::15:05:37.422123 ===
crasher:
initial call: mtp_dc_pool:init/1
pid: <0.594.0>
registered_name: []
exception exit: {connection_failed,<0.596.0>,downstream_socket_closed}
in function mtp_dc_pool:'-wait_pending/1-fun-0-'/3 (/build/mtproto_proxy/src/mtp_dc_pool.erl, line 273)
in call from lists:foldl/3 (lists.erl, line 1263)
in call from mtp_dc_pool:init/1 (/build/mtproto_proxy/src/mtp_dc_pool.erl, line 101)
in call from gen_server:init_it/2 (gen_server.erl, line 374)
in call from gen_server:init_it/6 (gen_server.erl, line 342)
ancestors: [mtp_dc_pool_sup,mtproto_proxy_sup,<0.583.0>]
message_queue_len: 1
messages: [{'DOWN',#Ref<0.1177133258.1843920897.113709>,process,
<0.595.0>,downstream_socket_closed}]
links: [<0.586.0>]
dictionary: []
trap_exit: false
status: running
heap_size: 610
stack_size: 27
reductions: 307
neighbours:

=SUPERVISOR REPORT==== 31-Mar-2022::15:05:37.422702 ===
supervisor: {local,mtproto_proxy_sup}
errorContext: start_error
reason: {{badmatch,
{error,
{connection_failed,<0.596.0>,downstream_socket_closed}}},
[{mtp_config,'-update_downstreams/2-fun-2-',1,
[{file,"/build/mtproto_proxy/src/mtp_config.erl"},
{line,233}]},
{lists,foreach,2,[{file,"lists.erl"},{line,1338}]},
{mtp_config,update_config,1,
[{file,"/build/mtproto_proxy/src/mtp_config.erl"},
{line,199}]},
{mtp_config,init,1,
[{file,"/build/mtproto_proxy/src/mtp_config.erl"},
{line,144}]},
{gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},
{gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,249}]}]}
offender: [{pid,undefined},
{id,mtp_config},
{mfargs,{mtp_config,start_link,[]}},
{restart_type,permanent},
{shutdown,5000},
{child_type,worker}]
=CRASH REPORT==== 31-Mar-2022::15:05:37.423063 ===
crasher:
initial call: application_master:init/4
pid: <0.582.0>
registered_name: []
exception exit: {bad_return,
{{mtproto_proxy_app,start,[normal,[]]},
{'EXIT',
{{badmatch,
{error,
{shutdown,
{failed_to_start_child,mtp_config,
{{badmatch,
{error,
{connection_failed,<0.596.0>,
downstream_socket_closed}}},
[{mtp_config,'-update_downstreams/2-fun-2-',1,
[{file,
"/build/mtproto_proxy/src/mtp_config.erl"},
{line,233}]},
{lists,foreach,2,
[{file,"lists.erl"},{line,1338}]},
{mtp_config,update_config,1,
[{file,
"/build/mtproto_proxy/src/mtp_config.erl"},
{line,199}]},
{mtp_config,init,1,
[{file,
"/build/mtproto_proxy/src/mtp_config.erl"},
{line,144}]},
{gen_server,init_it,2,
[{file,"gen_server.erl"},{line,374}]},
{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,342}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,249}]}]}}}}},
[{mtproto_proxy_app,start,2,
[{file,
"/build/mtproto_proxy/src/mtproto_proxy_app.erl"},
{line,34}]},
{application_master,start_it_old,4,
[{file,"application_master.erl"},{line,277}]}]}}}}
in function application_master:init/4 (application_master.erl, line 138)
ancestors: [<0.581.0>]
message_queue_len: 1
messages: [{'EXIT',<0.583.0>,normal}]
links: [<0.581.0>,<0.479.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 1598
stack_size: 27
reductions: 266
neighbours:

=INFO REPORT==== 31-Mar-2022::15:05:37.424452 ===
application: mtproto_proxy
exited: {bad_return,
{{mtproto_proxy_app,start,[normal,[]]},
{'EXIT',
{{badmatch,
{error,
{shutdown,
{failed_to_start_child,mtp_config,
{{badmatch,
{error,
{connection_failed,<0.596.0>,
downstream_socket_closed}}},
[{mtp_config,'-update_downstreams/2-fun-2-',1,
[{file,"/build/mtproto_proxy/src/mtp_config.erl"},
{line,233}]},
{lists,foreach,2,[{file,"lists.erl"},{line,1338}]},
{mtp_config,update_config,1,
[{file,"/build/mtproto_proxy/src/mtp_config.erl"},
{line,199}]},
{mtp_config,init,1,
[{file,"/build/mtproto_proxy/src/mtp_config.erl"},
{line,144}]},
{gen_server,init_it,2,
[{file,"gen_server.erl"},{line,374}]},
{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,342}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,249}]}]}}}}},
[{mtproto_proxy_app,start,2,
[{file,"/build/mtproto_proxy/src/mtproto_proxy_app.erl"},
{line,34}]},
{application_master,start_it_old,4,
[{file,"application_master.erl"},{line,277}]}]}}}}
type: permanent
=SUPERVISOR REPORT==== 31-Mar-2022::15:05:37.432604 ===
supervisor: {local,gr_counter_sup}
errorContext: child_terminated
reason: killed
offender: [{pid,<0.550.0>},
{id,gr_lager_default_tracer_counters},
{mfargs,{gr_counter,start_link,
[gr_lager_default_tracer_counters]}},
{restart_type,transient},
{shutdown,brutal_kill},
{child_type,worker}]
=SUPERVISOR REPORT==== 31-Mar-2022::15:05:37.432622 ===
supervisor: {local,gr_param_sup}
errorContext: child_terminated
reason: killed
offender: [{pid,<0.549.0>},
{id,gr_lager_default_tracer_params},
{mfargs,{gr_param,start_link,[gr_lager_default_tracer_params]}},
{restart_type,transient},
{shutdown,brutal_kill},
{child_type,worker}]
{"Kernel pid terminated",application_controller,"{application_start_failure,mtproto_proxy,{bad_return,{{mtproto_proxy_app,start,[normal,[]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,mtp_config,{{badmatch,{error,{connection_failed,<0.596.0>,downstream_socket_closed}}},[{mtp_config,'-update_downstreams/2-fun-2-',1,[{file,"/build/mtproto_proxy/src/mtp_config.erl"},{line,233}]},{lists,foreach,2,[{file,"lists.erl"},{line,1338}]},{mtp_config,update_config,1,[{file,"/build/mtproto_proxy/src/mtp_config.erl"},{line,199}]},{mtp_config,init,1,[{file,"/build/mtproto_proxy/src/mtp_config.erl"},{line,144}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}}}}},[{mtproto_proxy_app,start,2,[{file,"/build/mtproto_proxy/src/mtproto_proxy_app.erl"},{line,34}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,277}]}]}}}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,mtproto_proxy,{bad_return,{{mtproto_proxy_app,start,[normal,[]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,m

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

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

1 participant