New Host not appearing in UI

I need to completely uninstall Rancher. Below is my script that I use to do so. Tell me if it is missing anything.

Script rancher-reset.sh:

#!/bin/bash

# Reset Rancher

service docker stop
umount -rlf /var/lib/docker/*
umount -rlf  /var/lib/rancher/*
rm -rf /var/lib/docker/*
rm -rf /var/lib/rancher/*

apt install --reinstall docker-ce

After removing Rancher and Docker, rancher/server installs successfully, and then adding the Host installs successfully.

However, the new host never shows up in the UI.

When watching the stdio with docker attach container, it seemed to be in a loop over and over again

Did you run that script on the host also?

I ran the server, and then ran the host shell command, as well

According to the FAQ, you should also force remve the rancher-agent before trying to add a host back into Rancher.

http://rancher.com/docs/rancher/v1.6/en/faqs/agents/

Everything was started from scratch when re-installing

Can you share logs from the rancher/agent container, it should tell you why it’s failing to register.