Question

Unable to access CouchDB via SSL on Ubuntu

I’m trying to access my CouchDB installation on Ubuntu 16.04.5 LTS via SSL.

The command curl -k -v https://localhost:6984 produces the following output:

* Rebuilt URL to: https://localhost:6984/
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 6984 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 594 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* gnutls_handshake() failed: The TLS connection was non-properly terminated.
* Closing connection 0
curl: (35) gnutls_handshake() failed: The TLS connection was non-properly terminated.

My local.ini (with all comments removed):

[couchdb]

[couch_peruser]

[chttpd]

[httpd]

[query_servers]

[couch_httpd_auth]

[ssl]
enable = true
port = 6984
cert_file = /opt/couchdb/letsencrypt/live/db.shuttlefinder.app/cert.pem
key_file = /opt/couchdb/letsencrypt/live/db.shuttlefinder.app/privkey.pem
cacert_file = /opt/couchdb/letsencrypt/live/db.shuttlefinder.app/fullchain.pem


[admins]

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

I’ve followed this guide during the installation. Is something wrong with my config file? What else could be the issue?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello,

I can see that you are running a curl request to your https://localhost but the SSL certificate is for a different domain name. Mostlikely the connection is failing because of the SSL mismatch.

I would recommend running the curl request to the domain name that you’ve issued the SSL certificate for.

Also another thing that you could try is updating your curl version.

Hope that this helps! Regards, Bobby