I have CouchDB installed on one of my server (Ubuntu 11.04). Accessing the application on the standard http port works fine (i.e. http://www.example.com:5984/_utils). I installed some SSL certificates on the server and changed the configuration file "local.ini" to point to the certificates (i.e. certificate and key files are both PEM encoded):
[ssl] cert_file = /full/path/to/server_cert.crt key_file = /full/path/to/server_key.key The problem I get is that I cannot access the application via SSL (i.e. https://www.example.com:6984/_utils). When I restart the couchdb application, the log file says that it is started on the couchdb SSL port, but when I try to access the application via futon, I get nothing. Here is the log file statement: [Mon, 05 Dec 2011 19:30:35 GMT] [info] [<0.31.0>] Apache CouchDB has started on http://0.0.0.0:5984/ [Mon, 05 Dec 2011 19:30:35 GMT] [info] [<0.31.0>] Apache CouchDB has started on https://0.0.0.0:6984/ The complete log file: (Note that the application still works fine with http, just not with https. I wish the error messages were a bit more human readable) ================================== [Mon, 05 Dec 2011 19:30:35 GMT] [info] [<0.31.0>] Apache CouchDB has started on http://0.0.0.0:5984/ [Mon, 05 Dec 2011 19:30:35 GMT] [info] [<0.31.0>] Apache CouchDB has started on https://0.0.0.0:6984/ [Mon, 05 Dec 2011 19:31:04 GMT] [error] [<0.408.0>] {error_report,<0.60.0>, {<0.408.0>,std_error, [83,83,76,58,32,"1093",58,32,"error",58, "[]",32, "/full/path/to/server_key.key", "\n",32,32, [91, [[123, ["ssl_connection",44, "init_private_key",44,"4"], 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, 05 Dec 2011 19:31:04 GMT] [error] [<0.408.0>] {error_report,<0.60.0>, {<0.408.0>,crash_report, [[{initial_call, {ssl_connection,init,['Argument__1']}}, {pid,<0.408.0>}, {registered_name,[]}, {error_info, {exit,ekeyfile, [{gen_fsm,init_it,6}, {proc_lib,init_p_do_apply,3}]}}, {ancestors,[ssl_connection_sup,ssl_sup,<0.61.0>]}, {messages,[]}, {links,[<0.65.0>]}, {dictionary,[]}, {trap_exit,false}, {status,running}, {heap_size,987}, {stack_size,24}, {reductions,1005}], []]}} [Mon, 05 Dec 2011 19:31:04 GMT] [error] [<0.139.0>] {error_report,<0.30.0>, {<0.139.0>,std_error, [{application,mochiweb}, "Accept failed error", "{error,ekeyfile}"]}} [Mon, 05 Dec 2011 19:31:04 GMT] [error] [<0.139.0>] {error_report,<0.30.0>, {<0.139.0>,crash_report, [[{initial_call, {mochiweb_acceptor,init, ['Argument__1','Argument__2', 'Argument__3']}}, {pid,<0.139.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.31.0>]}, {messages,[]}, {links,[<0.138.0>,#Port<0.2186>]}, {dictionary,[]}, {trap_exit,false}, {status,running}, {heap_size,2584}, {stack_size,24}, {reductions,778}], []]}} [Mon, 05 Dec 2011 19:31:04 GMT] [error] [<0.138.0>] {error_report,<0.30.0>, {<0.138.0>,std_error, {mochiweb_socket_server,254, {acceptor_error,{error,accept_failed}}}}} [Mon, 05 Dec 2011 19:31:04 GMT] [error] [<0.409.0>] {error_report,<0.60.0>, {<0.409.0>,std_error, [83,83,76,58,32,"1093",58,32,"error",58, "[]",32, "/full/path/to/server_key.key", "\n",32,32, [91, [[123, ["ssl_connection",44, "init_private_key",44,"4"], 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, 05 Dec 2011 19:31:04 GMT] [error] [<0.409.0>] {error_report,<0.60.0>, {<0.409.0>,crash_report, [[{initial_call, {ssl_connection,init,['Argument__1']}}, {pid,<0.409.0>}, {registered_name,[]}, {error_info, {exit,ekeyfile, [{gen_fsm,init_it,6}, {proc_lib,init_p_do_apply,3}]}}, {ancestors,[ssl_connection_sup,ssl_sup,<0.61.0>]}, {messages,[]}, {links,[<0.65.0>]}, {dictionary,[]}, {trap_exit,false}, {status,running}, {heap_size,1597}, {stack_size,24}, {reductions,1110}], []]}} [Mon, 05 Dec 2011 19:31:04 GMT] [error] [<0.140.0>] {error_report,<0.30.0>, {<0.140.0>,std_error, [{application,mochiweb}, "Accept failed error", "{error,ekeyfile}"]}} [Mon, 05 Dec 2011 19:31:04 GMT] [error] [<0.140.0>] {error_report,<0.30.0>, {<0.140.0>,crash_report, [[{initial_call, {mochiweb_acceptor,init, ['Argument__1','Argument__2', 'Argument__3']}}, {pid,<0.140.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.31.0>]}, {messages,[]}, {links,[<0.138.0>,#Port<0.2189>]}, {dictionary,[]}, {trap_exit,false}, {status,running}, {heap_size,2584}, {stack_size,24}, {reductions,798}], []]}} [Mon, 05 Dec 2011 19:31:04 GMT] [error] [<0.138.0>] {error_report,<0.30.0>, {<0.138.0>,std_error, {mochiweb_socket_server,254, {acceptor_error,{error,accept_failed}}}}} ==================================
