[root@db yum.repos.d]# yum makecache
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Error: Cannot find a valid baseurl for repo: elasticsearch-6.x
[root@db yum.repos.d]# vim /etc/yum/pluginconf.d/fastestmirror.conf
Change 1 to 0
Then go to the yum source and configure
If there are plugins=1 then change it to 0, not adding them.