W
W
Wolf KTL2015-01-27 14:59:45
MongoDB
Wolf KTL, 2015-01-27 14:59:45

MongoDB and constant "stateSrt": "DOWN"?

Configured on the network according to the article quard.ru/2012/07/mongodb-replica-sets Everything works correctly on the local network. As soon as I brought it to the global network, everything stopped working.
The picture is such there is a server in the cloud on it stands Base, it took the value PRIMARY . The second server is located in another city, it had the STARTUP2 status, and immediately switched to SECONDARY . And the arbitrator fell into a stupor "stateSrt" : "DOWN" lastHeartBeatMessage "still initializing
I don’t know what to do. The third server, like the second one, is behind mikrotikom, All ports are registered. I remotely connect to the database from everywhere. I don’t understand what the problem is.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wolf KTL, 2015-01-28
@Wolf_ktl

Found a solution. It turns out mongodb was trying to connect to an external ip (to itself and not 127.0.0.1) i.e. mikrotik was not configured correctly.. it was necessary to configure NAT Lookup and port forwarding ..(which was done)
/ip firewall nat add action=dst-nat chain=dstnat comment="Nat for Mongo" dst-address=*.*. *.* dst-port=27036 protocol=tcp to-addresses=192.168.0.20 to-ports=27036
/ip firewall nat add action=src-nat chain=srcnat comment="Nat Loopback" protocol=tcp src-address=192.168 .0.0/24 to-addresses=*.*.*.*

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question