vctls
vctls

Reputation: 735

CouchDB 2 on Windows 7 crashes on startup when SSL is enabled

I've just installed CouchDB on my machine for testing with StackEdit, which needs SSL.

CouchDB starts fine after a fresh install.

But when I try to enable SSL with a self-signed certificate, as explained here, CouchDB won't start.

Here's what the log says:

[error] 2016-09-29T16:16:01.402000Z couchdb@localhost <0.201.0> -------- Error starting Apache CouchDB:

    {error,{shutdown,{failed_to_start_child,couch_secondary_services,{shutdown,{failed_to_start_child,httpsd,{'EXIT',{badarg,[{erlang,'++',[undefined,"."],[]},{couch_util,parse_term,1,[{file,"src/couch_util.erl"},{line,164}]},{couch_httpd,start_link,1,[{file,"src/couch_httpd.erl"},{line,46}]},{supervisor,do_start_child,2,[{file,"supervisor.erl"},{line,314}]},{supervisor,start_children,3,[{file,"supervisor.erl"},{line,297}]},{supervisor,init_children,2,[{file,"supervisor.erl"},{line,263}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,306}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}}}}}}}

full log here.

My CouchDB sits in C:\CouchDB. I've put the key and certificate files there too.

My OpenSSL version is 1.0.2d.

Upvotes: 2

Views: 487

Answers (2)

redgeoff
redgeoff

Reputation: 3341

As @Robin mentions, there is a bug in CouchDB 2

For me, it was a matter of adding the following lines in local.ini:

[ssl] 
ciphers = undefined 
tls_versions = undefined 
secure_renegotiate = undefined 

[daemons]
httpsd = {chttpd, start_link, [https]} 

And, another important detail is that SSL support in CouchDB 2 appears to be broken when using Erlang versions before 18.

See https://groups.google.com/forum/#!topic/couchdb-user-archive/cBrZ25DHHVA for more info.

Upvotes: 5

Robin
Robin

Reputation: 21

I was faced with this issue for the last 2 days and found out it was a bug in CouchDB 2.0.0

https://issues.apache.org/jira/browse/COUCHDB-3162

Hopefully it will really be fixed on V2.0.1

Upvotes: 3

Related Questions