当前位置:网站首页>Redis cannot connect remotely.
Redis cannot connect remotely.
2022-07-03 05:34:00 【youandme520】
CentOS9 Installed on redis, And successfully started , Unable to connect on the host .
Mainly parameter setting Incorrect .
First, install by default redis after Direct command start redis-server It's not true . It will call the default parameters to start redis.
We need to use it. redis.conf File to start
redis-server /etc/redis/redis.conf
There are several reasons why you can't connect .
1. bind Parameters are not set correctly
redis bind The default parameter is 127.0.0.1 This way redis Bound to local and its The external device cannot be connected
We need to comment it out directly .
# bind 127.0.0.1
then modify redis The protection mode of is no, Is not enabled
protected-mode no
For the sake of safety You need to set the password
requirepass root
then Can Remote access to
We try to connect on the client
Still unable to connect , Think about it Should be CentOS9 Firewall does not 6379 Ports open .
[[email protected] redis]# firewall-cmd --query-port=6379/tcp
no
It really didn't open after inspection
Then we open the port .
[[email protected] redis]# firewall-cmd --add-port=6379/tcp
success
[[email protected] redis]# firewall-cmd --query-port=6379/tcp
yes
After opening the port, we are connecting with the client
Successful connection , solve the problem .
边栏推荐
- 请求数据库报错:“could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGram
- Altaro VM backup getting started
- Altaro set grandfather parent child (GFS) archiving
- Webrtc native M96 version opening trip -- a reading code download and compilation (Ninja GN depot_tools)
- 求质数的方法
- EMD distance - example of use
- AtCoder Beginner Contest 258(A-D)
- Brief introduction of realsense d435i imaging principle
- XML Configuration File
- [basic grammar] C language uses for loop to print Pentagram
猜你喜欢
Brief introduction of realsense d435i imaging principle
Primary school campus IP network broadcasting - Design of primary school IP digital broadcasting system based on campus LAN
Overview of basic knowledge of C language
6.23 warehouse operation on Thursday
【一起上水硕系列】Day 7 内容+Day8
XML Configuration File
一起上水硕系列】Day 9
Disassembly and installation of Lenovo r7000 graphics card
配置xml文件的dtd
3dslam with 16 line lidar and octomap
随机推荐
[basic grammar] C language uses for loop to print Pentagram
Common interview questions of microservice
Principles of BTC cryptography
study hard and make progress every day
XML配置文件
Redis 过期淘汰机制
今天很多 CTO 都是被幹掉的,因為他沒有成就業務
Yolov5 input (II) | CSDN creative punch in
Progressive multi grasp detection using grasp path for rgbd images
About debugging the assignment of pagenum and PageSize of the formal parameter pageweb < T > (i.e. page encapsulation generic) in the controller
Robot capture experiment demonstration video
Shanghai daoning, together with American /n software, will provide you with more powerful Internet enterprise communication and security component services
How to install and configure altaro VM backup for VMware vSphere
"250000 a year is just the price of cabbage" has become a thing of the past. The annual salary of AI posts has decreased by 8.9%, and the latest salary report has been released
Pan details of deep learning
Disassembly and installation of Lenovo r7000 graphics card
Installing altaro VM backup
2022.7.2 模拟赛
在PyCharm中配置使用Anaconda环境
2022.6.30DAY591