Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question