meteor-file-collection
meteor-file-collection copied to clipboard
File-collection SSL connection to MongoDB 3.2
Hello,
File-collection is not supporting the ssl option parameter (set to true) in the MONGO_URL.
mongodb://user:[email protected]:10000/database?ssl=true
It gives the following error:
(STDERR) Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE
(STDERR) at Object.Future.wait (/home/home/seb/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:398:15)
(STDERR) at packages/meteor/helpers.js:119:1
(STDERR) at new FileCollection (packages/vsivsi_file-collection/src/gridFS_server.coffee:35:16)
After a little web crawling, it seems that the NODE_TLS_REJECT_UNAUTHORIZED env variable is able to "solve" (in a unsatisfying insecure way) the issue, but it didn't work for me.
Should it be working today? And if not, is the development planned? Please take into account that the issue was observed with the MongoDB 3.2, so it may be related. I'll try on a lower version as soon as i can.
At first glance, this looks like another Meteor + Mongo3.2 issue. I think it is the Meteor Collection connection to the DB that is failing, not the one that file-collection maintains for itself. Unfortunately they both need to work correctly! This is precisely the kind of issue I suspected might arise with trying to use Mongo 3.2 with Meteor until MDG updates the Meteor mongodb driver to 2.1.x.
I've tested this with the mongo32_test branch, i'm still getting this error.
Okay, thanks for the update. I'll keep this open until MDG resolves the outdated driver issue on their end.
Should this be solved now with the release of Meteor 1.4?
I'm getting this error using Meteor 1.4.1.1 with mongodb 3.2
throw(ex);
Error: unable to verify the first certificate
at Object.Future.wait (/home/vcap/app/bundle/programs/server/node_modules/fibers/future.js:449:15)
at packages/meteor/helpers.js:119:1
at new FileCollection (packages/vsivsi_file-collection/src/gridFS_server.coffee:35:16)
at meteorInstall.model.attachments.js (model/attachments.js:2:15)
at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
at /home/vcap/app/bundle/programs/server/app/app.js:6391:1
at /home/vcap/app/bundle/programs/server/boot.js:292:10
at Array.forEach (native)
at Function._.each._.forEach (/home/vcap/app/bundle/programs/server/node_modules/underscore/underscore.js:79:11)
- - - - -
at Error (native)
at emitNone (events.js:67:13)
at TLSSocket.emit (events.js:166:7)
at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:428:38)
Instance (index 0) failed to start accepting connections
Hi, I don't know if Meteor updated the Mongo driver in this release. Do you have information that they did?
Yes, according to their changelog they updated it to version 2.2.8 in Meteor 1.4.1.1
Okay, I'll look into it. Might be early next week before I get the chance though.
Any chance of solving this or working around it? I'm stuck with the same error.
@CarlosCuetoM I'll look into this before next week.