Home > database > Through the gate access directing a copy set IP address
Through the gate access directing a copy set IP address
Time:09-19
In 10.235 the three network virtual machine deployment of the directing a copy of the set, the virtual machine deployment of the network segment Springboot engineering can normal visit, The spring configuration file: Data: Mongo: Uri: mongo://iot: [email protected]:27017,10.235. 10.11:27018,10.235. 10.12:27019/db
Then for some reason, the database need behind all nets brake, applications accessed through network gateway, Nets brake configuration information is as follows: Nets brake mongo 172.255.254.23:27017 10.235.10.10:27017 172.255.254.23:27018 10.235.10.10:27018 172.255.254.23:27019 10.235.10.10:27019
Change after the spring configuration file: Data: Mongo: Uri: mongo://iot: [email protected]:27017172255 254.23:27018172255 254.23:27019/db
Now problem is the application link mongo abnormalities, log information is as follows:
Connected mongo final application is using a real (net) after the brake mongo service IP address, rather than the network gateway IP address, so the timeout:
But to the spring configuration file instead of single node can be used: Data: Mongo: Uri: mongo://iot: [email protected]:27017/db
CodePudding user response:
Copy should be set mode connection after connection of IP and implement rs. The results of the status