In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to solve the problem of redis remote connection". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to solve the problem of redis remote connection.
Problem description:
The redis remote server runs on the 192.168.3.90 computer. When the client computer (ip:192.168.3.110) connects through the redsi-cli.exe client tool, it does not respond and cannot connect.
As shown in the figure:
Solution step: step 1: comment out the bind property setting in the redis.window.conf file.
As shown in the figure:
Step 2: set the protected-mode property to no
Restart redis to connect remotely.
As shown in the figure:
Confirm that the startup is successful and view all keys
Clear all keys
Note:
You cannot directly double-click redis-server.exe under the bin directory under the redis installation directory to start the redis server, otherwise it will not be able to operate through the remote client.
If shown, report an error when you start redis by double-clicking the redis-server.exe command, and then execute keys to view all keys
The error is reported as follows:
(error) DENIED Redis is running in protected mode because protected mode is enabled
No bind address was specified, no authentication password is requested to clients.
In this mode connections are only accepted from the loopback interface.
If you want to connect from external computers to Redis you may adopt one of the following solutions:
1) Just disable protected mode sending the command 'CONFIG SET protected-mode no' from the loopback interface by connecting to Redis
From the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so.
Use CONFIG REWRITE to make this change permanent. 2) Alternatively you can just disable the protected mode by editing the Redis configuration file
And setting the protected mode option to 'no', and then restarting the server.
3) If you started the server manually just for testing, restart it with the'--protected-mode no' option.
4) Setup a bind address or an authentication password.
NOTE: You only need to do one of the above things in order for the server to start accepting connections from the outside.
Reason analysis: from the successful startup interface analysis, the configuration file read by this way of startup may not be a redis.windows.conf file, so the previously set content does not take effect.
So when you start redis, go to the bin directory under the redis installation directory and execute
Redis-server redis.windows.conf
Command startup name.
In addition, the redis-cli client connects to the redis server command as follows
Redis-cli-h 192.168.3.90-p 6379
-h Select the specified server ip
-p Select the designated port.
At this point, I believe you have a deeper understanding of "redis remote connection is not how to solve", might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.