In the Rancher UI, when adding a host and running in the shell via SSH, clicking the "Shutdown" button showed no information about the host.
First, check whether the application is functioning normally by going to Applications - All Applications.
If it shows unhealthy, it indicates an issue.
Solution 1:
Go to the cloud host's console and open the security group. Open ports 500 and 4500, as the server typically has a firewall and security group that will block these ports.
Solution 2:
1. Delete some files
rm -rf /var/lib/rancher/state
2. Delete the agent container
# List running containers
docker ps
Note the ID of the container named agent
~# docker kill 248bf1f48d99 # Fill in your actual ID 248bf1f48d99 ~# docker rm -fv rancher-agent rancher-agent
3. Modify files
vim /etc/docker/daemon.json
Press i to enter insert mode and copy the following content (set DNS, DNS addresses can be changed to others)
{ "dns": [ "114.114.114.114", "8.8.8.8" ] }
Press the Esc key and enter the following command to save and exit
:wq!
4. Restart Docker
~# sudo service docker restart
Wait for the restart, open your Rancher UI, and wait for a response.
Then go to Applications - All Applications and wait for the service to start. If your services are shown as all green as in the image below, it indicates normal operation, and you can proceed to add hosts.
文章评论