Unable to access CouchDB via SSL on Ubuntu

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

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?

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

Have another answer? Share your knowledge.