Question

Unable to access CouchDB via SSL on Ubuntu

Posted May 9, 2019 763 views
Nginx Ubuntu 16.04 Initial Server Setup Databases

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?

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.

1 answer

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

Submit an Answer