当前位置:网站首页>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.confThere 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 noFor the sake of safety You need to set the password
requirepass rootthen 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
noIt 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
yesAfter opening the port, we are connecting with the client

Successful connection , solve the problem .
边栏推荐
- Bluebridge cup real topic 2020 palindrome date simulation construction provincial competition
- mysql启动报错:The server quit without updating PID file几种解决办法
- NG Textarea-auto-resize
- Altaro set grandfather parent child (GFS) archiving
- Pytorch through load_ state_ Dict load weight
- Transferring images using flask
- Final review (Day6)
- 请求数据库报错:“could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGram
- Making coco datasets
- Go practice - gorilla / handlers used by gorilla web Toolkit
猜你喜欢

XML配置文件

How to set up altaro offsite server for replication

SimpleITK学习笔记

微服务常见面试题

@Solutions to null pointer error caused by Autowired

谷歌 | 蛋白序列的深度嵌入和比对

Principles of BTC cryptography

一起上水硕系列】Day 9

Hotel public broadcasting background music - Design of hotel IP network broadcasting system based on Internet +

Go practice -- factory mode of design patterns in golang (simple factory, factory method, abstract factory)
随机推荐
SimpleITK学习笔记
大学校园IP网络广播-厂家基于校园局域网的大学校园IP广播方案设计指南
[practical project] autonomous web server
study hard and make progress every day
Pessimistic lock and optimistic lock of multithreading
Common interview questions of microservice
Source insight License Activation
Explanation of variables, code blocks, constructors, static variables and initialization execution sequence of static code blocks of Ali interview questions
2022.7.2 模拟赛
Make your own dataset
2022.DAY592
大二困局(复盘)
"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
Beaucoup de CTO ont été tués aujourd'hui parce qu'il n'a pas fait d'affaires
"C and pointer" - Chapter 13 function pointer 1: callback function 2 (combined with template to simplify code)
Source insight operation manual installation trial
今天很多 CTO 都是被幹掉的,因為他沒有成就業務
(subplots usage) Matplotlib how to draw multiple subgraphs (axis field)
Redis 击穿穿透雪崩
Redis 入门和数据类型讲解