Hortonworks cluster setup on VM: Error while registering the host to the server

I am getting “Damaged repomd.xml file” error while trying to install the ambari agent and registering the node to the ambari server. When i tried to to yum repolist also it give me the below error. I was successfully able to setup the local yum repository and i started getting this error yesterday. Has anyone else faced smilier issue earlier?

[root@hdpserver repodata]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

Even i have tried to download and point to the latest repo version of HDP and ambari.

Seems the URI’s are redirecting to http://www.dns2go.com/.

Try by replacing damaged xml files with new files and try

Hi Krishnachaitanya,

Thanks for your response.

I did try to replace the damaged xml with latest from the below link but it still points to the same dns2go link.

http://s3.amazonaws.com/public-repo-1.hortonworks.com/index.html#/ambari/centos6/2.x/updates/2.5.0.3/repodata

Try with below repos

Ambari
http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.0.0/bk_Installing_HDP_AMB/content/_ambari_repositories.html

HDP
http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.0.0/bk_Installing_HDP_AMB/content/_hdp_stack_repositories.html

tried with these as well.

still getting the same error -

[root@hdpserver yum.repos.d]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

[root@hdpserver yum]# pwd
/var/www/docs/hdpserver.rajlab.com/yum
[root@hdpserver yum]# cat ambari/centos6/repodata/repomd.xml

<?xml version="1.0" encoding="UTF-8"?> 1437365992

i tried to use the repo files as is and instead of creating a local repository, use the weblink. This time the repolist worked fine but when installed the ambari server and trying to register the datanodes via the ambari web, it says the below error.

==========================
Running setup agent script…

Command start time 2017-04-04 18:34:06
Host registration aborted. Ambari Agent host cannot reach Ambari Server ‘ns2.dns2go.com:8080’. Please check the network connectivity between the Ambari Agent host and the Ambari Server

Connection to www.hdpdn2.rajlab.com closed.
SSH command execution finished
host=www.hdpdn2.rajlab.com, exitcode=1
Command end time 2017-04-04 18:35:09

ERROR: Bootstrap of host w ww.hdpdn2.rajlab.com fails because previous action finished with non-zero exit code (1)
ERROR MESSAGE: tcgetattr: Invalid argument
Connection to www.hdpdn2.rajlab.com closed.

STDOUT: Host registration aborted. Ambari Agent host cannot reach Ambari Server ‘ns2.dns2go.com:8080’. Please check the network connectivity between the Ambari Agent host and the Ambari Server

I believe this is again pointing to the same ns2.dns2go.com. Kindly help