当前位置:网站首页>How does docker access redis service 6379 port in the host
How does docker access redis service 6379 port in the host
2022-04-22 04:50:00 【Day____ Day____ Up】
1. Execute in the host ifconfig, Get current ip,
2. To configure redis
2.1 close redis Protection mode of ( It will block access to external websites ), Start by opening redis Configuration file for redis.conf, And then find protected-mode yes One line yes Change it to no, Of course, if you are no There is no need to modify
2.2 Make sure redis Listen to all local addresses , Not just 127.0.0.1 Address ( Only listen to this address by default ) . Or find redis.conf The binding address instruction found in the file is generally bind 127.0.0.1 :1 , Before this line #, Comment it out , Then he will listen to all local addresses .
2.3 Log in locally redis service , That is redis-cli Then execute this command : CONFIG SET protected-mode no , That is to close protected Pattern . Don't do this , If the Internet address is still inaccessible, an error will occur
3. Log in to your docker, Try connecting to your host redis, have access to telnet Command test connectivity , If the prompt does not telnet, Then perform yum install telnet It'll be ready soon . Then execute the order : telnet The host machine ip 6379 , If you can connect it, congratulations have passed , If prompted, such as refuse Things like that don't make sense , Check for yourself ip Unequal problem
版权声明
本文为[Day____ Day____ Up]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210758106082.html
边栏推荐
- JVM throughput
- 2022g2 boiler operator certificate examination question bank and online simulation examination
- Kaggle Real Game 4.1 - Time Series Prediction Problem
- JVM——》CMS
- WAP picture
- Linear regression API
- I'll test the timing again
- Climb the actor's name and add a link
- JVM - common parameters
- 2022T电梯修理考试试题及在线模拟考试
猜你喜欢

Data segmentation in training set tuning

Deployment of web server, personal experience

2022A特种设备相关管理(电梯)考试题模拟考试题库模拟考试平台操作

How to realize different values and display different colors in MATLAB
![[chestnut sugar GIS] ArcMap - how to combine multiple images into one](/img/b4/fb1ceaf4cbb040ae0fc1d0ffbc46f9.png)
[chestnut sugar GIS] ArcMap - how to combine multiple images into one

Several key points of logistic regression
![[chestnut sugar GIS] SuperMap - how to create hyperlinks for data](/img/6d/8b46c96d3ec1005481919e5e81ce80.png)
[chestnut sugar GIS] SuperMap - how to create hyperlinks for data

Error encountered when installing opencv

JVM——》CMS
Apple plans to expand children's information and communication security features to the UK and Canada
随机推荐
2022.04.20华为笔试
Article 1 of linked list
Leetcode sword finger offer 51 Reverse order pair in array***
LeetCode 剑指 Offer 17. 打印从1到最大的n位数
不同品牌设备如何兼容实现互联?一文教你看懂
Win10 Caton repair
[selenium] yaml data driven
2022 Shandong Province safety officer C certificate examination questions and online simulation examination
First knowledge of UI automation (inspect.exe + uiautomation)
Es next related
[stack and queue] simple application of C language ⌊ stack and queue realize each other, circular queue ⌉
labelme的常用命令
rpc error: code = Unavailable desc = error reading from server: EOF
POJ - 2456 aggressive cows
12. Libevent loop function and exit test
2022a special equipment related management (elevator) test question simulation test question bank simulation test platform operation
The role and risk of setsql using lamdbaupdatewrapper
How the CPU calls the process
Solution to Chinese translation of GoLand (in case of failure to download plug-ins)
2022 P cylinder filling training questions and answers