Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connecting pump to mongodb running ssl #1003

Closed
sharochka opened this issue Mar 21, 2014 · 8 comments
Closed

connecting pump to mongodb running ssl #1003

sharochka opened this issue Mar 21, 2014 · 8 comments

Comments

@sharochka
Copy link

I want to run mongodb using ssl - I've compiled and installed - mongod is running but pump.io cannot connect:

2014-03-20T23:42:52.189-0400 [initandlisten] connection accepted from 127.0.0.1:39264 #13 (2 connections now open)
2014-03-20T23:42:52.193-0400 [conn13] User Assertion: 17189:The server is configured to only allow SSL connections
2014-03-20T23:42:52.193-0400 [conn13] AssertionException handling request, closing client connection: 17189 The server is configured to only allow SSL connections

How do I tell pump.io I want it to connect to mongodb using ssl?

@matzegebbe
Copy link
Contributor

do you mean ssl for the mongoDB server?

by default the mongoDB Server only listen to localhost (127.0.0.1). Do you have a Database on another Server?

Is

sslWeakCertificateValidation

activated?
http://docs.mongodb.org/manual/reference/configuration-options/#sslWeakCertificateValidation

@sharochka
Copy link
Author

no mongodb and pump.io are on the same server. mongodb is running on 127.0.0.1:27017 - but I've set it to only accept ssl connections. I can connect to it via terminal just fine. I can't get pump to connect - It seems to be an issue with the driver. If I'm reading this correctly the driver needs to be told to connect via ssl: http://docs.mongodb.org/master/tutorial/configure-ssl/#node-js-node-mongodb-native.

@sharochka
Copy link
Author

This is what I've got in my conf file currently:

dbpath=/var/lib/mongodb
bind_ip = 127.0.0.1
port = 27017
noauth = true
logappend=true
logpath=/var/log/mongodb/mongodb.log
verbose = true
sslOnNormalPorts = true
sslCAFile = /etc/pump.io/ca.pem
sslPEMKeyFile = /etc/pump.io/ssl.pem
sslPEMKeyPassword = password
sslWeakCertificateValidation = true

@sharochka
Copy link
Author

and here is my pump.io.json:

{
"driver": "mongodb",
"params": {"host":"127.0.0.1","port":27017},
"secret": "secret goes here",
"noweb": false,
"site": "cryptobitch",
"owner": "sheer inertia",
"ownerURL": "",
"port": 443,
"urlPort": 443,
"hostname": "cryptobitch.info",
"address": "192.168.0.5",
"nologger": false,
"serverUser": "pump.io",
"key": "/etc/pump.io/ssl.key",
"cert": "/etc/pump.io/ssl.crt",
"uploaddir": "/var/www/uploads",
"debugClient": false,
"firehose": "ofirehose.com",
"canUpload": true,
"noCDN":true,
"requireEmail": true,
"smtpusessl": true,
"smtpserver": "localhost",
"smtpport": "465",
"smtpuser": "pump.io",
"smtppass": "password",
"disableRegistration": false,
"logfile": "/var/log/pump.io",
"sockjs": true

}

@sharochka
Copy link
Author

I'm not sure if there's a way to tell pump.io to connect to mongodb via ssl using the param line - or if it has to be specified in the driver itself (and if that's the case how is the next question).

@matzegebbe
Copy link
Contributor

Are the SSL-Certificates self-signed? With sslWeakCertificateValidation = false is the same?
yeah, i am not sure if databank-mongodb need ssl-options

@sharochka
Copy link
Author

No they are valid StartSSL certs.

@evanp
Copy link
Contributor

evanp commented Jun 22, 2014

I've moved this to e14n/databank-mongodb#5.

@evanp evanp closed this as completed Jun 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants