[stunnel-users] Mongo Replication using Stunnel

Danny Hernandez danny.hernandez at onelogos.com
Sun Oct 12 21:44:33 CEST 2014


Hello,

I am trying to create an ssl connection between two mongodb instances 
both using the mongodb community version.  Both instances need to 
communicate with one another as they need to be able to ping each other.

I am getting this error when attempting to connect to Instance A from 
Instance B and vice versa:  connect_blocking: connect <ip 
address>:27027: Connection refused (111)

I have two conf files on each server (one for client and one for 
server).  I am using the latest version of stunnel and the latest 
version of mongodb.

Here are my conf files:

*SERVER A*
cert=/etc/stunnel/stunnel.pem
key = /etc/stunnel/stunnel.pem
verify = 2
CAfile = /etc/stunnel/stunnel.pem
pid = /client.pid
output = /var/log/stunnel4/stunnel.log
debug = 7
sslVersion = all

[mongo-replication]
accept = 27037
connect = 127.0.0.1:27017
retry = yes*
*

*Server B
*cert=/etc/stunnel/stunnel.pem
key = /etc/stunnel/stunnel.pem
verify = 2
CAfile = /etc/stunnel/stunnel.pem
pid = /client.pid
output = /var/log/stunnel4/stunnel.log
debug = 7
sslVersion = all

[mongo-replication]
accept = 27027
connect = 127.0.0.1:27027
retry = yes

*Client A
*cert=/etc/stunnel/client.pem
pid = /client.pid
output = /var/log/stunnel4/client.log
debug = 7
client = yes

[mongo-replication]
accept = 27037
connect = dbtest2:27027
retry = yes

*Client B
*cert=/etc/stunnel/client.pem
pid = /client.pid
output = /var/log/stunnel4/client.log
debug = 7
client = yes

[mongo-replication]
accept = 27037
connect = dbtest1:27037
retry = yes


Could someone please assist with troubleshooting the error?

Thank you!
-- 

Thank you,

Danny Hernandez

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20141012/714614b7/attachment.html>


More information about the stunnel-users mailing list