First, scene description
1. Test environment installation redis6, cluster deployment, three master and three slave. That is to achieve high concurrency, high availability, high security.
2. Redis creates clusters through bind intranet IP.
3. The local and test environment are not in the same LAN, and there is no VPN, so it is impossible to access redis through the test intranet IP.
4. Note: through the redis client, using the public IP + port, you can access redis.
Problem: spring program can’t access redis correctly through IP + port of public network.
Reason: when spring accesses the redis cluster, it first obtains the intranet IP and ports of all nodes in the redis cluster through the configured public IP and ports, and then the program finally accesses redis through the intranet IP and ports.
Second, the solution
1. Install the redis singleton on the test server.
2. Configuration file redis.conf Set daemonize to yes, that is to realize the background startup of redis.
3. In the test environment network security group, add the white list of local environment public IP, open port 6379.
4. Modify the local configuration file in spring program to access redis configuration mode. In this way, all technicians can connect to the test environment redis locally, and each technology does not need to open the redis service locally.
spring: redis: host: 126.96.36.199 port: 6379 timeout: 5000ms pool: max-active: 8 min-idle: 0 max-idle: 8 max-wait: -1
- Error creating bean with name ‘redissonclient’:
- When writing a website, Vue + Flash prompts network error when visiting Vue page
- Redis cluster error: (error) moved solution
- Unable to read Scheme Document ‘ http://www.springframework.org/schema/beans/spring-beans-4.1.xsd ‘ [How to Fix]
- Centos7 offline installation of redis and PHP extension redis
- Nginx reverse proxy MySQL
- Samba getpeername failed. Error was transport endpoint is not connected error
- Solve the problem of testing redis cluster“ java.lang.NumberFormatException : For input string: “ [email protected]@17002 “And so on
- soapUI Error Loading WSDL
- (20200916 Solved)Docker||redis-cli Could not connect to Redis at 127.0.0.1:6379: Connection refused
- FileZilla 425 Can’t open data connection
- Java — one of Apollo configuration centers — Introduction to Apollo
- No such file or directory error when redis is started under Windows
- Kafka connection abnormal org.apache.kafka . common.errors.TimeoutException : Failed to update metadata after 60000 ms.
- Zuul gateway routing URL and service ID configuration
- About connection reset by peer: socket write error
- @Value sets the default value
- Securityerror: error ᦇ 2148: SWF file (SWF file cannot access local resources)
- Firewall CMD command in CentOS 7