how to register a redhat server that has a previous different hostname and ip address

Posted on

Hello,

So I have a situation whereby I was running a WordPress Dev server on CentOS 7.3. So we then decided to move it over to RedHat 7.3. So this is what I did:

I created a new server and I registered it so I could get updates. I copied over the relevant files I needed from the CentOS to the RedHat.

I changed the hostname and the ipaddress of the CentOS Dev Server to the RedHat Server I built above. I unregistered the server because the wrong name is showing up in Satellite.

So now the RedHat server is running with the ip and hostname that was associated to the old CentOS server.

Now here is my scenario - I now have to register the server to the redhat Satellite server because it is called a different name and now has a different IP since I moved the name and IP over for ease of DNS.

When I try to do this the registration hangs as follows:
[root@wpdev2v ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)

[root@wpdev2v ~]# ./bootstrap.py -l rhsat -s xxxxxx-o "xxxxxx" -L "New York" -g Dev -a activation_key_7 --force
Foreman Bootstrap Script
This script is designed to register new systems or to migrate an existing system to a Foreman server with Katello
rhsat's password:
[NOTIFICATION], [2017-08-10 12:05:47], [This system is not registered to RHN. Attempting to register via subscription-manager]
[NOTIFICATION], [2017-08-10 12:05:47], [Removing old Katello agent and certs]
[NOTIFICATION], [2017-08-10 12:05:47], [/etc/rhsm/ca/katello-server-ca.pem does not exist - not removing]
[RUNNING], [2017-08-10 12:05:47], [/usr/bin/yum -y erase 'katello-ca-consumer-*' katello-agent gofer]

I did delete the /etc/rhsm/facts/katello.facts files as it was showing the name of the previous server which was wpdev3v.

Also removed the /etc/pki/consumer/*

When I try to register it just hangs.

So has anyone any insight or input to this problem as I would truly appreciate it.

Regards,

Patrick

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.