helium / gateway-config

The Helium configuration application. Enables configuring the Helium Hotspot over Bluetooth
Apache License 2.0
38 stars 25 forks source link

Exception elli_http,get_headers when talking to miner over RPC #93

Open Xykon opened 2 years ago

Xykon commented 2 years ago

Hello,

I've got a setup with latest miner 2022.06.09.0 running inside docker with host network privileges (at least for testing purposes).

I'm running gateway_config natively on the host OS (currently Raspbian Lite arm64 but also tried Ubuntu Server for RPi arm64).

Everything seems to work well but when I try to turn on advertising my router isn't able to talk to the miner over RPC.

In /var/log/gateway_config/crash.log I see the following:

2022-06-19 23:11:10 =CRASH REPORT====
  crasher:
    initial call: http2_client:init/1
    pid: <0.684.0>
    registered_name: []
    exception exit: {{receiving_settings_frame,closed},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,401}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}
    ancestors: [gateway_config_miner,gateway_config_sup,<0.636.0>]
    message_queue_len: 0
    messages: []
    links: [<0.640.0>,#Port<0.75>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 376
    stack_size: 28
    reductions: 1059
  neighbours:

On the miner in /var/log/miner/crash.log I get the following:

2022-06-20 00:29:38 =CRASH REPORT====
  crasher:
    initial call: elli_http:accept/4
    pid: <0.1820.0>
    registered_name: []
    exception error: {function_clause,[{elli_http,get_headers,[{plain,#Port<0.2016>},{2,0},<<13,10,83,77,13,10,13,10,0,0,6,4,0,0,0,0,0,0,2,0,0,0,0>>,[{accept_timeout,10000},{request_timeout,60000},{header_timeout,10000},{body_timeout,30000},{max_body_size,1024000}],{miner_jsonrpc_handler,undefined}],[{file,"elli_http.erl"},{line,452}]},{elli_http,handle_request,4,[{file,"elli_http.erl"},{line,92}]},{elli_http,keepalive_loop,5,[{file,"elli_http.erl"},{line,71}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}
    ancestors: [<0.1810.0>,miner_restart_sup,miner_sup,<0.1605.0>]
    message_queue_len: 0
    messages: []
    links: [<0.1810.0>,#Port<0.2016>]
    dictionary: [{{time,request_start},-576458497515446293},{{time,accepted},-576458497515501144},{{time,headers_start},-576458497515437293}]
    trap_exit: false
    status: running
    heap_size: 1598
    stack_size: 28
    reductions: 16390
  neighbours:

In the console.log from gateway_config:

2022-06-20 01:28:38.493 [notice] <0.633.0>@gateway_config:diagnostics:298 Failed to get p2p status: {receiving_settings_frame,closed}
2022-06-20 01:28:38.494 [warning] <0.632.0>@gateway_config_miner:handle_info:100 unhandled info message {'EXIT',<0.666.0>,{receiving_settings_frame,closed}}
2022-06-20 01:29:08.613 [notice] <0.633.0>@gateway_config:diagnostics:298 Failed to get p2p status: {receiving_settings_frame,closed}
2022-06-20 01:29:08.613 [error] <0.667.0> CRASH REPORT Process <0.667.0> with 0 neighbours exited with reason: {receiving_settings_frame,closed} in gen_server:init_it/6 line 358
2022-06-20 01:29:08.613 [warning] <0.632.0>@gateway_config_miner:handle_info:100 unhandled info message {'EXIT',<0.667.0>,{receiving_settings_frame,closed}}
2022-06-20 01:29:38.732 [notice] <0.633.0>@gateway_config:diagnostics:298 Failed to get p2p status: {receiving_settings_frame,closed}
2022-06-20 01:29:38.733 [error] <0.668.0> CRASH REPORT Process <0.668.0> with 0 neighbours exited with reason: {receiving_settings_frame,closed} in gen_server:init_it/6 line 358
2022-06-20 01:29:38.733 [warning] <0.632.0>@gateway_config_miner:handle_info:100 unhandled info message {'EXIT',<0.668.0>,{receiving_settings_frame,closed}}

And the error.log from gateway_config:

2022-06-20 01:29:38.733 [error] <0.668.0> CRASH REPORT Process <0.668.0> with 0 neighbours exited with reason: {receiving_settings_frame,closed} in gen_server:init_it/6 line 358

I can see the Hotspot advertising over bluetooth but neither the maker app nor the helium app are able to communicate with it over bluetooth.

Any help would be greatly appreciated.