Skip to content

Can't connect to MongoDB via SSL and certificate #1026

Closed
@markuswinkler

Description

@markuswinkler

I am trying to run a local parse-server for development that connects to the hosted mongoDB instance on compose.io via SSL.

Compose.io provides a custom SSL certificate. I can successfully connect via
mongo --ssl aws....com:10637/dbname -u <user> -p <password> --sslCAFile=compose_io.pem

However, if I specify the URL in the parse server config file with ssl=true I am getting the following error message at the console when an app (e.g. dashboard) tries to connect:

Uncaught internal server error. { [MongoError: unable to verify the first certificate]
  name: 'MongoError',
  message: 'unable to verify the first certificate' } Error: unable to verify the first certificate
    at Error (native)
    at TLSSocket.<anonymous> (_tls_wrap.js:1057:38)
    at emitNone (events.js:80:13)
    at TLSSocket.emit (events.js:179:7)
    at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishInit (_tls_wrap.js:596:8)
    at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:428:38)

I found this article on compose.io regarding SSL connections:
https://www.compose.io/articles/one-missing-key-and-how-it-broke-node-js-and-mongodb/

I can't seem to find though options to specify the certificate in the parse-server config.
Trusting the certificate in the OSX keychain doesn't help either.

What am I missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions