[erlang-questions] [BUG] in httpd doc & strange esslerrssl error

karol skocik <>
Sun Sep 14 23:26:53 CEST 2008


Hi,
  first, there seems to be a bug in httpd documentation - option
socket_type should be fixed to com_type, as that's what is checked in
httpd_conf:config/1 (12B4). Seems like artefact from old Apache-like
configuration. Now, having this configuration:

  [{bind_address, {0, 0, 0, 0}},
 {port, 9234},
 {server_name, "localhost"},
 {server_root, "priv/log/"},
 {document_root, "priv/htdocs/"},
 {com_type, ssl},
 {ssl_certificate_file, "priv/cert/mars.uk.crt"},
 {ssl_certificate_key_file, "priv/cert/mars.uk.private.key"},
 %% {ssl_verify_client, 2},
 %% {ssl_verify_depth, 2},
 {modules, [mod_log, mod_esi]},
 {erl_script_alias, {"/secure", [webssl]}},
 {erl_script_nocache, true},
 {error_log, "httpd_ssl_error.log"},
 {security_log, "httpd_ssl_security.log"},
 {transfer_log, "httpd_ssl_transfer.log"}]

httpd runs the service properly:

=PROGRESS REPORT==== 14-Sep-2008::23:00:31 ===
          supervisor: {local,httpd_acc_sup__0_0_0_0__9234}
             started: [{pid,<0.164.0>},
                       {name,{httpd_acceptor,{0,0,0,0},9234}},
                       {mfa,
                        {httpd_acceptor,start_link,
                         [<0.160.0>,
                          {ssl,
                           [{certfile,
                             "/home/md/tactix/netskin/priv/cert/mars.uk.crt"},
                            {keyfile,

"/home/md/tactix/netskin/priv/cert/mars.uk.private.key"}]},
                          {0,0,0,0},
                          9234,httpd_conf__0_0_0_0__9234,15000]}},
                       {restart_type,permanent},
                       {shutdown,1000},
                       {child_type,worker}]

but when I actually want to make a GET request, it fails with esslerrssl error:

=ERROR REPORT==== 14-Sep-2008::23:00:42 ===
Accept error: esslerrssl

=CRASH REPORT==== 14-Sep-2008::23:00:42 ===
  crasher:
    pid: <0.164.0>
    registered_name: []
    exception exit: {accept_failed,"Accept error: esslerrssl"}
      in function  httpd_acceptor:accept_failed/2
      in call from httpd_acceptor:acceptor_loop/5
    initial call: httpd_acceptor:acceptor_init(<0.158.0>,<0.160.0>,
                                               {ssl,
                                                [{certfile,

"/home/md/tactix/netskin/priv/cert/mars.uk.crt"},
                                                 {keyfile,

"/home/md/tactix/netskin/priv/cert/mars.uk.private.key"}]},
                                               {0,0,0,0},
                                               9234,httpd_conf__0_0_0_0__9234,
                                               15000)
    ancestors: [httpd_acc_sup__0_0_0_0__9234,
                  httpd_instance_sup__0_0_0_0__9234,httpd_sup,inets_sup,
                  <0.59.0>]
    messages: []
    links: [<0.165.0>,<0.158.0>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 987
    stack_size: 23
    reductions: 1760
  neighbours:

=SUPERVISOR REPORT==== 14-Sep-2008::23:00:42 ===
     Supervisor: {local,httpd_acc_sup__0_0_0_0__9234}
     Context:    child_terminated
     Reason:     {accept_failed,"Accept error: esslerrssl"}
     Offender:   [{pid,<0.164.0>},
                  {name,{httpd_acceptor,{0,0,0,0},9234}},
                  {mfa,
                      {httpd_acceptor,start_link,
                          [<0.160.0>,
                           {ssl,
                               [{certfile,

"/home/md/tactix/netskin/priv/cert/mars.uk.crt"},
                                {keyfile,

"/home/md/tactix/netskin/priv/cert/mars.uk.private.key"}]},
                           {0,0,0,0},
                           9234,httpd_conf__0_0_0_0__9234,15000]}},
                  {restart_type,permanent},
                  {shutdown,1000},
                  {child_type,worker}]


=PROGRESS REPORT==== 14-Sep-2008::23:00:42 ===
          supervisor: {local,httpd_acc_sup__0_0_0_0__9234}
             started: [{pid,<0.187.0>},
                       {name,{httpd_acceptor,{0,0,0,0},9234}},
                       {mfa,
                        {httpd_acceptor,start_link,
                         [<0.160.0>,
                          {ssl,
                           [{certfile,
                             "/home/md/tactix/netskin/priv/cert/mars.uk.crt"},
                            {keyfile,

"/home/md/tactix/netskin/priv/cert/mars.uk.private.key"}]},
                          {0,0,0,0},
                          9234,httpd_conf__0_0_0_0__9234,15000]}},
                       {restart_type,permanent},
                       {shutdown,1000},
                       {child_type,worker}]

Do I understand correctly that this kind of error is directly from
OpenSSL stack? Any ideas how to debug that? Or is there something
wrong with the configuration?

Thanks,
  Karol



More information about the erlang-questions mailing list