OpenIPC / majestic

Majestic Community edition integration kit
MIT License
36 stars 5 forks source link

Majestic doesn't reload correctly after config change/ HUP signal on T21n #107

Closed jayfan0 closed 8 months ago

jayfan0 commented 1 year ago

Required information

Issue description

A brief description of the problem. Should include what you were attempting to do, what you did, what happened and what you expected to see happen.

Majestic doesnt reload properly when receiving the kill -1 HUP signal. It is my understanding that whenever a config value is changed i the HUP signal is sent and majestic reloads.

No changes have been made to replicate this issue. Default majestic.yaml config. Send kill -1 and it will not load again. Some majestic web UI pages (port :85) will show 500 Internal Server Error

All works fine on first boot.

Expectations

Majestic to successfully reload on config change/ HUP signal

Steps to reproduce

  1. Step one Boot camera

  2. Step two get PID from ps aux | grep majestic

  3. Step three Send HUP signal with kill -1 <PID>

  1. Step four Load a Majestic settings page on webUI port 85 and see 500 Internal Server Error

Information to attach

Running killall majestic and manually starting mjaestic in the foreground. Then sending kill -1 signal from another window shows these logs:

17:54:59  <       majestic> [  levent] signal_hup_cb@78              Signal HUP received, reloading config
i264e[info]: kb/s:3690.08
17:55:00  <       majestic> [app_conf] load_config@89                Using /etc/majestic.yaml as main configuration
17:55:00  <       majestic> [sns_conf] try_sensor_config@13          SENSOR=jxf23
17:55:00  <       majestic> [sns_conf] load_sensor_config@44         Using /etc/sensor/jxf23.yaml as sensor config
17:55:00  <       majestic> [sns_conf] parse_sensor_config@128       VI: jxf23 @ 0x40 [1920x1080]
17:55:00  <       majestic> [     sdk] start_sdk@1120                CPU T21-N, SDK SYSUTILS-1.0.29, model Turkey, devID 
17:55:00  <       majestic> [     log] printf@268                    err: dsys_func_share_mem_register,80 
17:55:00  <       majestic> [     log] printf@268                    fid register already name = fs_info
17:55:00  <       majestic> [     log] printf@268                    err: dsys_func_user_mem_register,104 
17:55:00  <       majestic> [     log] printf@268                    fid register already name = misc_save_pic
17:55:00  <       majestic> [     log] printf@268                    err: dsys_func_share_mem_register,80 
17:55:00  <       majestic> [     log] printf@268                    fid register already name = misc_system_info
17:55:00  <       majestic> [     log] printf@268                    err: dsys_func_share_mem_register,80 
17:55:00  <       majestic> [     log] printf@268                    fid register already name = misc_simple_cmd
17:55:00  <       majestic> [     log] printf@268                    err: dsys_func_share_mem_register,80 
17:55:00  <       majestic> [     log] printf@268                    fid register already name = enc_info
17:55:00  <       majestic> [     log] printf@268                    err: dsys_func_share_mem_register,80 
17:55:00  <       majestic> [     log] printf@268                    fid register already name = enc_rc_s
17:55:00  <       majestic> [     log] printf@268                    err: dsys_func_share_mem_register,80 
17:55:00  <       majestic> [     log] printf@268                    fid register already name = superfrm_info
17:55:00  <       majestic> [     log] printf@268                    err: dsys_func_share_mem_register,80 
17:55:00  <       majestic> [     log] printf@268                    fid register already name = superfrm_set
17:55:00  <       majestic> [     log] printf@268                    err: dsys_func_share_mem_register,80 
17:55:00  <       majestic> [     log] printf@268                    fid register already name = enc_rcfile_s
17:55:00  <       majestic> [     sdk] imp_system_init@372           ImpSystemInit success
i264e[info]: profile High, level 4.0
17:55:00  <       majestic> [     sdk] start_sdk@1259                [0] H.264 1920x1080 25fps 4096Kbit [VB:2]
17:55:00  <       majestic> [     sdk] start_sdk@1318                Ingenic SDK started
17:55:00  <       majestic> [   httpd] new_http_server@368           HTTP server started on :::80
17:55:00  <       majestic> [    rtsp] rtsp_init@31                  RTSP server started on port 554
17:55:00  <       majestic> [   netip] netip_start@2055              NETIP server started on port 34567
flyrouter commented 8 months ago

Done