In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Preface
This article mainly introduces how to solve the problem that Rancher cannot add hosts. Let's take a look at the detailed introduction.
The methods are as follows:
Docker version:
two。 Start Docker:
Systemctl daemon-reloadsystemctl enable dockersystemctl start docker
3. Install rancher:
Docker run-d-p 8080 mnt/data/rancher/db:/var/lib/mysql 8080-- restart=always-v / mnt/data/rancher/db:/var/lib/mysql-- name rancher-server-146 rancher/server:v1.6.17
4. Add a host:
Find the id of agent by executing docker ps on the command line, and then execute docker logs id
The agent container was found to be unsuccessful.
First, you need to delete the file under / var/lib/rancher/state, which is used to mark the uniqueness of the host, and then delete the agent container
Next, you need to add dns to / etc/docker/daemon.json
{"registry-mirrors": ["https://2lqq34jg.mirror.aliyuncs.com","https://pee6w651.mirror.aliyuncs.com","https://registry.docker-cn.com","http://hub-mirror.c.163.com"],"dns": [" 8.8.8.8 "," 8.8.4.4 "]}
Finally restart docker
Systemctl daemon-reloadsystemctl restart docker.serviceservice docker restart
After re-adding hosts, check the operation of agent through docker logs id.
As shown in the picture, it works normally. The host is added successfully, and then the services are added.
Summary
The above is the whole content of this article, I hope that the content of this article has a certain reference and learning value for your study or work, if you have any questions, you can leave a message and exchange, thank you for your support.
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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.