@hassaniraj
1. Please try restarting the VM once.
2. Inside the sandbox do SSH login and then try to see if you are able to make the following curl call .. this is just to verify the repo accessibility. If the following URL does not work then please share the HTTP Header section output of the following curl commands here so that we can verify if there are some special headers like Network proxy ..etc.
# curl -iLvk <a href="http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6/repodata/repomd.xml" target="_blank">http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6/repodata/repomd.xml</a>
AND
# curl -iLvk <a href="http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6/repodata/7fcacadb44b1a860fb704795c187f549103e855a0a93ed31293a0b270a9022b4-primary.sqlite.bz2" target="_blank">http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6/repodata/7fcacadb44b1a860fb704795c187f549103e855a0a93ed31293a0b270a9022b4-primary.sqlite.bz2</a>
3. If above works fine then we will have to look from the YUM side. Please try to perform the yum cache cleanup and then retry:
# yum clean all
# yum update
4. It will be also good to verify if the "/etc/yum.repos.d/" directory has any problematic repo. Can you please list them?
# ls -lart /etc/yum.repos.d/
For temporarily you can move some of the repo files from "/etc/yum.repos.d/" file to outside and then retry... this will help in isolating if there are any corrupted repo issue.
5. Recently have you made any changes to the "/etc/yum.conf" file like enabling/disabling any proxy setting ..?
# cat /etc/yum.conf
Also if you see some "dev2.hortonworks.com.s3.amazonaws.com" repos URLs inside your "/etc/yum.repos.d" repos then please refer to the other thread and try to disable them and try again:
https://community.cloudera.com/t5/Support-Questions/yum-install-error-please-help-me-out/m-p/203121
Example:
# cat /etc/yum.repos.d/sandbox.repo
[sandbox]
baseurl=<a href="http://dev2.hortonworks.com.s3.amazonaws.com/repo/dev/master/utils/" target="_blank">http://dev2.hortonworks.com.s3.amazonaws.com/repo/dev/master/utils/</a>
name=Sandbox repository (tutorials)
gpgcheck=0
enabled=0
.
.
If your question is answered then, Please make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.