erlyaws / yaws

Yaws webserver
https://erlyaws.github.io
BSD 3-Clause "New" or "Revised" License
1.28k stars 267 forks source link

Can't start Yaws web server on Ubuntu 22 #475

Closed alexandrkirilov closed 11 months ago

alexandrkirilov commented 11 months ago

Just installed Yaws web server via command: $ sudo apt-get update $ sudo apt-get install yaws on MacOS and FreeBSD all is working and when trying to start Yaws on Ubuntu 22 got crashed with message: ` yaws Erlang/OTP 24 [erts-12.2.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]

Eshell V12.2.1 (abort with ^G) 1> =INFO REPORT==== 16-Oct-2023::05:45:50.177290 === Yaws: Using config file /etc/yaws/yaws.conf

=ERROR REPORT==== 16-Oct-2023::05:45:50.196936 === use_old_ssl in yaws.conf is no longer supported - ignoring

=INFO REPORT==== 16-Oct-2023::05:45:50.205856 === Ctlfile : /root/.yaws/yaws/default/CTL

=ERROR REPORT==== 16-Oct-2023::05:45:50.347879 === Generic server yaws_log terminating Last message in was {setup,{gconf,"/usr/lib/yaws",false,100, "/var/log/yaws", ["/usr/local/lib/yaws-appmods/ebin", "/usr/lib/yaws/examples/ebin"], [],[],30000,nolimit,400,1000000,8000, nolimit,[],10240,[],0,30, ["/usr/local/lib/yaws-appmods/include", "/usr/lib/yaws/examples/include"], "/usr/bin/php-cgi","Yaws 2.1.1", "default",false,[],8,undefined, [inet], yaws_session_server,undefined,120000, 3600000,disable}, []} When Server state == {state,false,undefined, ["[","16","/","Oct","/","2023",":","05",":", "45",":","50"," ", [43,"00","00"], "]"], 1000000,undefined,false} Reason for termination == {{badmatch, {error, {handler_not_added, {invalid_config,logger_std_h,#{max_no_bytes => 0}}}}}, [{yaws_log,handle_call,3,[{file,"yaws_log.erl"},{line,177}]}, {gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,721}]}, {gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,750}]}, {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]} Client yaws_server stacktrace ** [{gen,do_call,4,[{file,"gen.erl"},{line,214}]}, {gen_server,call,3,[{file,"gen_server.erl"},{line,243}]}, {yaws_server,init2,5,[{file,"yaws_server.erl"},{line,237}]}, {gen_server,init_it,2,[{file,"gen_server.erl"},{line,423}]}, {gen_server,init_it,6,[{file,"gen_server.erl"},{line,390}]}, {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]

=CRASH REPORT==== 16-Oct-2023::05:45:50.350323 === crasher: initial call: yaws_log:init/1 pid: <0.86.0> registered_name: yaws_log exception error: no match of right hand side value {error, {handler_not_added, {invalid_config,logger_std_h,

{max_no_bytes => 0}}}}

  in function  yaws_log:handle_call/3 (yaws_log.erl, line 177)
  in call from gen_server:try_handle_call/4 (gen_server.erl, line 721)
  in call from gen_server:handle_msg/6 (gen_server.erl, line 750)
ancestors: [yaws_sup,<0.82.0>]
message_queue_len: 0
messages: []
links: [<0.83.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 10958
stack_size: 29
reductions: 15813

neighbours:

=SUPERVISOR REPORT==== 16-Oct-2023::05:45:50.351857 === supervisor: {local,yaws_sup} errorContext: start_error reason: {{{badmatch, {error, {handler_not_added, {invalid_config,logger_std_h,

{max_no_bytes => 0}}}}},

          [{yaws_log,handle_call,3,[{file,"yaws_log.erl"},{line,177}]},
           {gen_server,try_handle_call,4,
               [{file,"gen_server.erl"},{line,721}]},
           {gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,750}]},
           {proc_lib,init_p_do_apply,3,
               [{file,"proc_lib.erl"},{line,226}]}]},
         {gen_server,call,
             [yaws_log,
              {setup,
                  {gconf,"/usr/lib/yaws",false,100,"/var/log/yaws",
                      ["/usr/local/lib/yaws-appmods/ebin",
                       "/usr/lib/yaws/examples/ebin"],
                      [],[],30000,nolimit,400,1000000,8000,nolimit,[],
                      10240,[],0,30,
                      ["/usr/local/lib/yaws-appmods/include",
                       "/usr/lib/yaws/examples/include"],
                      "/usr/bin/php-cgi","Yaws 2.1.1","default",false,[],
                      8,undefined,
                      [inet],
                      yaws_session_server,undefined,120000,3600000,
                      disable},
                  []},
              infinity]}}
offender: [{pid,undefined},
           {id,yaws_server},
           {mfargs,
               {yaws_server,start_link,
                   [{env,false,false,false,false,false,false,"default",
                        latin1}]}},
           {restart_type,permanent},
           {significant,false},
           {shutdown,120000},
           {child_type,worker}]

=SUPERVISOR REPORT==== 16-Oct-2023::05:45:50.352115 === supervisor: {local,yaws_sup} errorContext: shutdown_error reason: {{badmatch, {error, {handler_not_added, {invalid_config,logger_std_h,#{max_no_bytes => 0}}}}}, [{yaws_log,handle_call,3,[{file,"yaws_log.erl"},{line,177}]}, {gen_server,try_handle_call,4, [{file,"gen_server.erl"},{line,721}]}, {gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,750}]}, {proc_lib,init_p_do_apply,3, [{file,"proc_lib.erl"},{line,226}]}]} offender: [{pid,<0.86.0>}, {id,yaws_log}, {mfargs,{yaws_log,start_link,[]}}, {restart_type,permanent}, {significant,false}, {shutdown,5000}, {child_type,worker}]

=CRASH REPORT==== 16-Oct-2023::05:45:50.352267 === crasher: initial call: application_master:init/4 pid: <0.81.0> registered_name: [] exception exit: {{shutdown, {failed_to_start_child,yaws_server, {{{badmatch, {error, {handler_not_added, {invalid_config,logger_std_h,

{max_no_bytes => 0}}}}},

                     [{yaws_log,handle_call,3,
                       [{file,"yaws_log.erl"},{line,177}]},
                      {gen_server,try_handle_call,4,
                       [{file,"gen_server.erl"},{line,721}]},
                      {gen_server,handle_msg,6,
                       [{file,"gen_server.erl"},{line,750}]},
                      {proc_lib,init_p_do_apply,3,
                       [{file,"proc_lib.erl"},{line,226}]}]},
                    {gen_server,call,
                     [yaws_log,
                      {setup,
                       {gconf,"/usr/lib/yaws",false,100,"/var/log/yaws",
                        ["/usr/local/lib/yaws-appmods/ebin",
                         "/usr/lib/yaws/examples/ebin"],
                        [],[],30000,nolimit,400,1000000,8000,nolimit,[],
                        10240,[],0,30,
                        ["/usr/local/lib/yaws-appmods/include",
                         "/usr/lib/yaws/examples/include"],
                        "/usr/bin/php-cgi","Yaws 2.1.1","default",false,
                        [],8,undefined,
                        [inet],
                        yaws_session_server,undefined,120000,3600000,
                        disable},
                       []},
                      infinity]}}}},
                 {yaws_app,start,[normal,[]]}}
  in function  application_master:init/4 (application_master.erl, line 142)
ancestors: [<0.80.0>]
message_queue_len: 1
messages: [{'EXIT',<0.82.0>,normal}]
links: [<0.80.0>,<0.44.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 987
stack_size: 29
reductions: 235

neighbours:

=CRASH REPORT==== 16-Oct-2023::05:45:50.352044 === crasher: initial call: yaws_server:init/1 pid: <0.90.0> registered_name: [] exception exit: {{{badmatch, {error, {handler_not_added, {invalid_config,logger_std_h,

{max_no_bytes => 0}}}}},

                  [{yaws_log,handle_call,3,
                       [{file,"yaws_log.erl"},{line,177}]},
                   {gen_server,try_handle_call,4,
                       [{file,"gen_server.erl"},{line,721}]},
                   {gen_server,handle_msg,6,
                       [{file,"gen_server.erl"},{line,750}]},
                   {proc_lib,init_p_do_apply,3,
                       [{file,"proc_lib.erl"},{line,226}]}]},
                 {gen_server,call,
                     [yaws_log,
                      {setup,
                          {gconf,"/usr/lib/yaws",false,100,
                              "/var/log/yaws",
                              ["/usr/local/lib/yaws-appmods/ebin",
                               "/usr/lib/yaws/examples/ebin"],
                              [],[],30000,nolimit,400,1000000,8000,
                              nolimit,[],10240,[],0,30,
                              ["/usr/local/lib/yaws-appmods/include",
                               "/usr/lib/yaws/examples/include"],
                              "/usr/bin/php-cgi","Yaws 2.1.1","default",
                              false,[],8,undefined,
                              [inet],
                              yaws_session_server,undefined,120000,
                              3600000,disable},
                          []},
                      infinity]}}
  in function  gen_server:call/3 (gen_server.erl, line 247)
  in call from yaws_server:init2/5 (yaws_server.erl, line 237)
  in call from gen_server:init_it/2 (gen_server.erl, line 423)
  in call from gen_server:init_it/6 (gen_server.erl, line 390)
ancestors: [yaws_sup,<0.82.0>]
message_queue_len: 0
messages: []
links: [<0.92.0>,#Port<0.5>,<0.83.0>]
dictionary: [{gc,{gconf,"/usr/lib/yaws",false,100,"/var/log/yaws",
                         ["/usr/local/lib/yaws-appmods/ebin",
                          "/usr/lib/yaws/examples/ebin"],
                         [],[],30000,nolimit,400,1000000,8000,nolimit,[],
                         10240,[],0,30,
                         ["/usr/local/lib/yaws-appmods/include",
                          "/usr/lib/yaws/examples/include"],
                         "/usr/bin/php-cgi","Yaws 2.1.1","default",false,
                         [],8,undefined,
                         [inet],
                         yaws_session_server,undefined,120000,3600000,
                         disable}},
              {start_time,{{2023,10,16},{5,45,50}}}]
trap_exit: true
status: running
heap_size: 2586
stack_size: 29
reductions: 24309

neighbours: neighbour: pid: <0.92.0> registered_name: [] initial call: yaws_ctl:run/1 current_function: {prim_inet,accept0,3} ancestors: [yaws_server,yaws_sup,<0.82.0>] message_queue_len: 0 links: [<0.90.0>,#Port<0.7>] trap_exit: false status: waiting heap_size: 1598 stack_size: 15 reductions: 4780 current_stacktrace: [{prim_inet,accept0,3,[]}, {inet_tcp,accept,1,[{file,"inet_tcp.erl"},{line,173}]}, {yaws_ctl,aloop,3,[{file,"yaws_ctl.erl"},{line,124}]}, {proc_lib,init_p_do_apply,3, [{file,"proc_lib.erl"},{line,226}]}] =INFO REPORT==== 16-Oct-2023::05:45:50.352633 === application: yaws exited: {{shutdown, {failed_to_start_child,yaws_server, {{{badmatch, {error, {handler_not_added, {invalid_config,logger_std_h,

{max_no_bytes => 0}}}}},

                   [{yaws_log,handle_call,3,
                        [{file,"yaws_log.erl"},{line,177}]},
                    {gen_server,try_handle_call,4,
                        [{file,"gen_server.erl"},{line,721}]},
                    {gen_server,handle_msg,6,
                        [{file,"gen_server.erl"},{line,750}]},
                    {proc_lib,init_p_do_apply,3,
                        [{file,"proc_lib.erl"},{line,226}]}]},
                  {gen_server,call,
                      [yaws_log,
                       {setup,
                           {gconf,"/usr/lib/yaws",false,100,
                               "/var/log/yaws",
                               ["/usr/local/lib/yaws-appmods/ebin",
                                "/usr/lib/yaws/examples/ebin"],
                               [],[],30000,nolimit,400,1000000,8000,
                               nolimit,[],10240,[],0,30,
                               ["/usr/local/lib/yaws-appmods/include",
                                "/usr/lib/yaws/examples/include"],
                               "/usr/bin/php-cgi","Yaws 2.1.1","default",
                               false,[],8,undefined,
                               [inet],
                               yaws_session_server,undefined,120000,
                               3600000,disable},
                           []},
                       infinity]}}}},
         {yaws_app,start,[normal,[]]}}
type: permanent

{"Kernel pid terminated",application_controller,"{application_start_failure,yaws,{{shutdown,{failed_to_start_child,yaws_server,{{{badmatch,{error,{handler_not_added,{invalid_config,logger_std_h,#{max_no_bytes => 0}}}}},[{yaws_log,handle_call,3,[{file,\"yaws_log.erl\"},{line,177}]},{gen_server,try_handle_call,4,[{file,\"gen_server.erl\"},{line,721}]},{gen_server,handle_msg,6,[{file,\"gen_server.erl\"},{line,750}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,226}]}]},{gen_server,call,[yaws_log,{setup,{gconf,\"/usr/lib/yaws\",false,100,\"/var/log/yaws\",[\"/usr/local/lib/yaws-appmods/ebin\",\"/usr/lib/yaws/examples/ebin\"],[],[],30000,nolimit,400,1000000,8000,nolimit,[],10240,[],0,30,[\"/usr/local/lib/yaws-appmods/include\",\"/usr/lib/yaws/examples/include\"],\"/usr/bin/php-cgi\",\"Yaws 2.1.1\",\"default\",false,[],8,undefined,[inet],yaws_session_server,undefined,120000,3600000,disable},[]},infinity]}}}},{yaws_app,start,[normal,[]]}}}"} Kernel pid terminated (application_controller) ({application_start_failure,yaws,{{shutdown,{failed_to_start_child,yaws_server,{{{badmatch,{error,{handler_not_added,{invalid_config,logger_std_h,#{max_no_bytes => 0}}}}},[{yaws_log,handle_call,3,[{file,"yaws_log.erl"},{line,177}]},{gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,721}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,750}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]},{gen_server,call,[yaws_log,{setup,{gconf,"/usr/lib/yaws",false,100,"/var/log/yaws",["/usr/local/lib/yaws-appmods/ebin","/usr/lib/yaws/examples/ebin"],[],[],30000,nolimit,400,1000000,8000,nolimit,[],10240,[],0,30,["/usr/local/lib/yaws-appmods/include","/usr/lib/yaws/examples/include"],"/usr/bin/php-cgi","Yaws 2.1.1","default",false,[],8,undefined,[inet],yaws_session_server,undefined,120000,3600000,disable},[]},infinity]}}}},{yaws_app,start,[normal,[]]}}})

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

vinoski commented 11 months ago

I've duplicated the problem, and will take a closer look.

vinoski commented 11 months ago

Duplicate of #473.