Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-3012

HTTPS / SSL certificate (letsEncrypt) works with apache webserver but not with couchDB

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.6.1
    • None
    • HTTP Interface
    • None
    • Linux vserver3488 3.2.0-24-virtual #39-Ubuntu SMP Mon May 21 20:59:37 UTC 2012 i686 i686 i386 GNU/Linux
      Description: Ubuntu 12.04.5 LTS
      Release: 12.04
      Codename: precise

    Description

      I have installed couchdb on my vserver, which says:

      {"couchdb":"Welcome","uuid":"6f37da04e99f90f8f2ba3b8165202922","version":"1.6.1","vendor":{"name":"Ubuntu","version":"12.04"}}

      I wanted to add SSL. So I used https://letsencrypt.org/ to get free & automated HTTPS certificates which are authority signed. These certificates work well, tested with chrome, on my apache webserver.

      I'v spend the hole night, but unfortunately I have not got couchDB to work in SSL mode with these certificates. Chrome says: ERR_CONNECTION_RESET when I try to connect using https://mydomain.de:6984

      The problem is still described here with more DETAILS by an other user:
      http://serverfault.com/questions/743452/configure-couchdb-with-lets-encrypt-ssl-certificate

      Possibly it's related to the fact, the certs are cross signed, like described here?:
      https://letsencrypt.org/certificates/

      When I send a https request I get this log:

      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.178.0>] {error_report,<0.62.0>,
      {<0.178.0>,std_error,
      [83,83,76,58,32,"1095",58,32,"error",58,
      [123,
      ["try_clause",44,
      [123,["error",44,"eacces"],125]],
      125],
      32,
      "/etc/letsencrypt/live/www.digiscales.de/cert.pem",
      "\n",32,32,
      [91,
      [[123,
      ["ssl_manager",44,"cache_pem_file",44,
      "2"],
      125],
      44,10," ",
      [123,
      ["ssl_certificate",44,
      "file_to_certificats",44,"2"],
      125],
      44,10," ",
      [123,
      ["ssl_connection",44,
      "init_certificates",44,"6"],
      125],
      44,10," ",
      [123,
      ["ssl_connection",44,"ssl_init",44,"2"],
      125],
      44,10," ",
      [123,
      ["ssl_connection",44,"init",44,"1"],
      125],
      44,10," ",
      [123,
      ["gen_fsm",44,"init_it",44,"6"],
      125],
      44,10," ",
      [123,
      ["proc_lib",44,"init_p_do_apply",44,
      "3"],
      125]],
      93],
      "\n"]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.178.0>] {error_report,<0.62.0>,
      {<0.178.0>,crash_report,
      [[{initial_call,
      {ssl_connection,init,['Argument__1']}},

      {pid,<0.178.0>},
      {registered_name,[]},
      {error_info,
      {exit,ecertfile,
      [{gen_fsm,init_it,6},
      {proc_lib,init_p_do_apply,3}]}},
      {ancestors,[ssl_connection_sup,ssl_sup,<0.63.0>]},
      {messages,[]},
      {links,[<0.67.0>]},
      {dictionary,[]},
      {trap_exit,false},
      {status,running},
      {heap_size,987},
      {stack_size,24},
      {reductions,1488}],
      []]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.153.0>] {error_report,<0.31.0>,
      {<0.153.0>,std_error,
      [{application,mochiweb},
      "Accept failed error",
      "{error,ecertfile}"]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.153.0>] {error_report,<0.31.0>,
      {<0.153.0>,crash_report,
      [[{initial_call,
      {mochiweb_acceptor,init,
      ['Argument_1','Argument_2',
      'Argument__3']}},
      {pid,<0.153.0>},
      {registered_name,[]},
      {error_info,
      {exit,
      {error,accept_failed},
      [{mochiweb_acceptor,init,3},
      {proc_lib,init_p_do_apply,3}]}},
      {ancestors, [https,couch_secondary_services, couch_server_sup,<0.32.0>]},
      {messages,[]},
      {links,[<0.146.0>,#Port<0.2906>]},
      {dictionary,[]},
      {trap_exit,false},
      {status,running},
      {heap_size,1597},
      {stack_size,24},
      {reductions,1828}],
      []]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.146.0>] {error_report,<0.31.0>,
      {<0.146.0>,std_error,
      {mochiweb_socket_server,297,
      {acceptor_error,{error,accept_failed}}}}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.179.0>] {error_report,<0.62.0>,
      {<0.179.0>,std_error,
      [83,83,76,58,32,"1095",58,32,"error",58,
      [123,
      ["try_clause",44,
      [123,["error",44,"eacces"],125]],
      125],
      32,
      "/etc/letsencrypt/live/www.digiscales.de/cert.pem",
      "\n",32,32,
      [91,
      [[123,
      ["ssl_manager",44,"cache_pem_file",44,
      "2"],
      125],
      44,10," ",
      [123,
      ["ssl_certificate",44,
      "file_to_certificats",44,"2"],
      125],
      44,10," ",
      [123,
      ["ssl_connection",44,
      "init_certificates",44,"6"],
      125],
      44,10," ",
      [123,
      ["ssl_connection",44,"ssl_init",44,"2"],
      125],
      44,10," ",
      [123,
      ["ssl_connection",44,"init",44,"1"],
      125],
      44,10," ",
      [123,
      ["gen_fsm",44,"init_it",44,"6"],
      125],
      44,10," ",
      [123,
      ["proc_lib",44,"init_p_do_apply",44,
      "3"],
      125]],
      93],
      "\n"]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.179.0>] {error_report,<0.62.0>,
      {<0.179.0>,crash_report,
      [[{initial_call,
      {ssl_connection,init,['Argument__1']}},
      {pid,<0.179.0>},
      {registered_name,[]},
      {error_info,
      {exit,ecertfile,
      [{gen_fsm,init_it,6},
      {proc_lib,init_p_do_apply,3}]}},
      {ancestors,[ssl_connection_sup,ssl_sup,<0.63.0>]},
      {messages,[]},
      {links,[<0.67.0>]},
      {dictionary,[]},
      {trap_exit,false},
      {status,running},
      {heap_size,987},
      {stack_size,24},
      {reductions,1498}],
      []]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.67.0>] {error_report,<0.62.0>,
      {<0.67.0>,supervisor_report,
      [{supervisor,{local,ssl_connection_sup}},
      {errorContext,child_terminated},
      {reason,ecertfile},
      {offender,
      [{pid,<0.178.0>}

      ,

      {name,undefined},
      {mfargs,{ssl_connection,start_link,undefined}},
      {restart_type,temporary},
      {shutdown,4000},
      {child_type,worker}]}]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.67.0>] {error_report,<0.62.0>,
      {<0.67.0>,supervisor_report,
      [{supervisor,{local,ssl_connection_sup}},
      {errorContext,child_terminated},
      {reason,ecertfile},
      {offender,
      [{pid,<0.179.0>},
      {name,undefined}

      ,
      {mfargs,{ssl_connection,start_link,undefined}},

      {restart_type,temporary},
      {shutdown,4000},
      {child_type,worker}]}]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.154.0>] {error_report,<0.31.0>,
      {<0.154.0>,std_error,
      [{application,mochiweb},
      "Accept failed error",
      "{error,ecertfile}"]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.154.0>] {error_report,<0.31.0>,
      {<0.154.0>,crash_report,
      [[{initial_call,
      {mochiweb_acceptor,init,
      ['Argument_1','Argument_2',
      'Argument__3']}},
      {pid,<0.154.0>},
      {registered_name,[]},
      {error_info,
      {exit,
      {error,accept_failed},
      [{mochiweb_acceptor,init,3},
      {proc_lib,init_p_do_apply,3}]}},
      {ancestors, [https,couch_secondary_services, couch_server_sup,<0.32.0>]},
      {messages,[]},
      {links,[<0.146.0>,#Port<0.2933>]},
      {dictionary,[]},
      {trap_exit,false},
      {status,running},
      {heap_size,1597},
      {stack_size,24},
      {reductions,1860}],
      []]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.146.0>] {error_report,<0.31.0>,
      {<0.146.0>,std_error,
      {mochiweb_socket_server,297,
      {acceptor_error,{error,accept_failed}}}}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.181.0>] {error_report,<0.62.0>,
      {<0.181.0>,std_error,
      [83,83,76,58,32,"1095",58,32,"error",58,
      [123,
      ["try_clause",44,
      [123,["error",44,"eacces"],125]],
      125],
      32,
      "/etc/letsencrypt/live/www.digiscales.de/cert.pem",
      "\n",32,32,
      [91,
      [[123,
      ["ssl_manager",44,"cache_pem_file",44,
      "2"],
      125],
      44,10," ",
      [123,
      ["ssl_certificate",44,
      "file_to_certificats",44,"2"],
      125],
      44,10," ",
      [123,
      ["ssl_connection",44,
      "init_certificates",44,"6"],
      125],
      44,10," ",
      [123,
      ["ssl_connection",44,"ssl_init",44,"2"],
      125],
      44,10," ",
      [123,
      ["ssl_connection",44,"init",44,"1"],
      125],
      44,10," ",
      [123,
      ["gen_fsm",44,"init_it",44,"6"],
      125],
      44,10," ",
      [123,
      ["proc_lib",44,"init_p_do_apply",44,
      "3"],
      125]],
      93],
      "\n"]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.181.0>] {error_report,<0.62.0>,
      {<0.181.0>,crash_report,
      [[{initial_call,
      {ssl_connection,init,['Argument__1']}},
      {pid,<0.181.0>},
      {registered_name,[]},
      {error_info,
      {exit,ecertfile,
      [{gen_fsm,init_it,6},
      {proc_lib,init_p_do_apply,3}]}},
      {ancestors,[ssl_connection_sup,ssl_sup,<0.63.0>]},
      {messages,[]},
      {links,[<0.67.0>]},
      {dictionary,[]},
      {trap_exit,false},
      {status,running},
      {heap_size,987},
      {stack_size,24},
      {reductions,1474}],
      []]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.67.0>] {error_report,<0.62.0>,
      {<0.67.0>,supervisor_report,
      [{supervisor,{local,ssl_connection_sup}},
      {errorContext,child_terminated},
      {reason,ecertfile},
      {offender,
      [{pid,<0.181.0>},
      {name,undefined},
      {mfargs,{ssl_connection,start_link,undefined}},
      {restart_type,temporary}

      ,

      {shutdown,4000},
      {child_type,worker}]}]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.155.0>] {error_report,<0.31.0>,
      {<0.155.0>,std_error,
      [{application,mochiweb},
      "Accept failed error",
      "{error,ecertfile}"]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.155.0>] {error_report,<0.31.0>,
      {<0.155.0>,crash_report,
      [[{initial_call,
      {mochiweb_acceptor,init,
      ['Argument_1','Argument_2',
      'Argument__3']}},
      {pid,<0.155.0>},
      {registered_name,[]},
      {error_info,
      {exit,
      {error,accept_failed},
      [{mochiweb_acceptor,init,3},
      {proc_lib,init_p_do_apply,3}]}},
      {ancestors, [https,couch_secondary_services, couch_server_sup,<0.32.0>]},
      {messages,[]},
      {links,[<0.146.0>,#Port<0.2995>]},
      {dictionary,[]},
      {trap_exit,false},
      {status,running},
      {heap_size,1597},
      {stack_size,24},
      {reductions,1832}],
      []]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.146.0>] {error_report,<0.31.0>,
      {<0.146.0>,std_error,
      {mochiweb_socket_server,297,
      {acceptor_error,{error,accept_failed}}}}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.185.0>] {error_report,<0.62.0>,
      {<0.185.0>,std_error,
      [83,83,76,58,32,"1095",58,32,"error",58,
      [123,
      ["try_clause",44,
      [123,["error",44,"eacces"],125]],
      125],
      32,
      "/etc/letsencrypt/live/www.digiscales.de/cert.pem",
      "\n",32,32,
      [91,
      [[123,
      ["ssl_manager",44,"cache_pem_file",44,
      "2"],
      125],
      44,10," ",
      [123,
      ["ssl_certificate",44,
      "file_to_certificats",44,"2"],
      125],
      44,10," ",
      [123,
      ["ssl_connection",44,
      "init_certificates",44,"6"],
      125],
      44,10," ",
      [123,
      ["ssl_connection",44,"ssl_init",44,"2"],
      125],
      44,10," ",
      [123,
      ["ssl_connection",44,"init",44,"1"],
      125],
      44,10," ",
      [123,
      ["gen_fsm",44,"init_it",44,"6"],
      125],
      44,10," ",
      [123,
      ["proc_lib",44,"init_p_do_apply",44,
      "3"],
      125]],
      93],
      "\n"]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.185.0>] {error_report,<0.62.0>,
      {<0.185.0>,crash_report,
      [[{initial_call,
      {ssl_connection,init,['Argument__1']}},
      {pid,<0.185.0>},
      {registered_name,[]},
      {error_info,
      {exit,ecertfile,
      [{gen_fsm,init_it,6},
      {proc_lib,init_p_do_apply,3}]}},
      {ancestors,[ssl_connection_sup,ssl_sup,<0.63.0>]},
      {messages,[]},
      {links,[<0.67.0>]},
      {dictionary,[]},
      {trap_exit,false},
      {status,running},
      {heap_size,987},
      {stack_size,24},
      {reductions,1474}],
      []]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.67.0>] {error_report,<0.62.0>,
      {<0.67.0>,supervisor_report,
      [{supervisor,{local,ssl_connection_sup}},
      {errorContext,child_terminated},
      {reason,ecertfile},
      {offender,
      [{pid,<0.185.0>},
      {name,undefined},
      {mfargs,{ssl_connection,start_link,undefined}},
      {restart_type,temporary},
      {shutdown,4000}

      ,

      {child_type,worker}

      ]}]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.180.0>] {error_report,<0.31.0>,
      {<0.180.0>,std_error,
      [

      {application,mochiweb}

      ,
      "Accept failed error",
      "

      {error,ecertfile}

      "]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.180.0>] {error_report,<0.31.0>,
      {<0.180.0>,crash_report,
      [[{initial_call,
      {mochiweb_acceptor,init,
      ['Argument_1','Argument_2',
      'Argument__3']}},

      {pid,<0.180.0>}

      ,

      {registered_name,[]}

      ,
      {error_info,
      {exit,

      {error,accept_failed},
      [{mochiweb_acceptor,init,3},
      {proc_lib,init_p_do_apply,3}]}},
      {ancestors, [https,couch_secondary_services, couch_server_sup,<0.32.0>]},
      {messages,[]},
      {links,[<0.146.0>,#Port<0.2996>]},
      {dictionary,[]},
      {trap_exit,false},
      {status,running},
      {heap_size,1597},
      {stack_size,24},
      {reductions,804}],
      []]}}
      [Mon, 09 May 2016 10:54:04 GMT] [error] [<0.146.0>] {error_report,<0.31.0>,
      {<0.146.0>,std_error,
      {mochiweb_socket_server,297,
      {acceptor_error,{error,accept_failed}

      }}}}

      Attachments

        Activity

          People

            Unassigned Unassigned
            luxxx@gmx.de Lutz Hohle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: