<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello,<br>
<br>
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.<br>
<br>
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)<br>
<br>
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.<br>
<br>
Here are my conf files:<br>
<br>
<b>SERVER A</b><br>
cert=/etc/stunnel/stunnel.pem<br>
key = /etc/stunnel/stunnel.pem<br>
verify = 2<br>
CAfile = /etc/stunnel/stunnel.pem<br>
pid = /client.pid<br>
output = /var/log/stunnel4/stunnel.log<br>
debug = 7<br>
sslVersion = all<br>
<br>
[mongo-replication]<br>
accept = 27037<br>
connect = 127.0.0.1:27017<br>
retry = yes<b><br>
</b>
<div class="moz-signature"><br>
<b>Server B<br>
</b>cert=/etc/stunnel/stunnel.pem<br>
key = /etc/stunnel/stunnel.pem<br>
verify = 2<br>
CAfile = /etc/stunnel/stunnel.pem<br>
pid = /client.pid<br>
output = /var/log/stunnel4/stunnel.log<br>
debug = 7<br>
sslVersion = all<br>
<br>
[mongo-replication]<br>
accept = 27027<br>
connect = 127.0.0.1:27027<br>
retry = yes<br>
<br>
<b>Client A<br>
</b>cert=/etc/stunnel/client.pem<br>
pid = /client.pid<br>
output = /var/log/stunnel4/client.log<br>
debug = 7<br>
client = yes<br>
<br>
[mongo-replication]<br>
accept = 27037<br>
connect = dbtest2:27027<br>
retry = yes<br>
<br>
<b>Client B<br>
</b>cert=/etc/stunnel/client.pem<br>
pid = /client.pid<br>
output = /var/log/stunnel4/client.log<br>
debug = 7<br>
client = yes<br>
<br>
[mongo-replication]<br>
accept = 27037<br>
connect = dbtest1:27037<br>
retry = yes<br>
<br>
<br>
Could someone please assist with troubleshooting the error?<br>
<br>
Thank you!<br>
-- <br>
<p>Thank you,</p>
<p>Danny Hernandez</p>
</div>
</body>
</html>