Page 1 of 1

This Famous issue; CAnnot find Repo!

Posted: 2018/01/17 13:57:38
by timaz
Hi;

I'm a completely newbie. I installed a fresh new CentOs 7 on my ESXi host and ran "yum install gnome desktop" but I got this famous error.

Code: Select all

[cuser@localhost ~]$ sudo yum groupinstall "GNOME Desktop"
Loaded plugins: fastestmirror
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: HTTP Error 302 - Found
-
-
Cannot find a valid baseurl for repo: base/7/x86_64
I searched the Internet and found nearly 1000 results for this! but none of them resolved mine. my DNS works fine and I don't use any proxy in the net, although I have a firewall which permits all traffic to/from the CentOs to the Internet.

I ran ping command to Internet URLs and I got reply, so DNS does works. Also these are some other commands that I used:

Code: Select all

[cuser@localhost ~]$ curl http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os*​&infra=stock 
[1] 3460
[2] 3461
[3] 3462
!
[cuser@localhost ~]$ sudo startx
sudo: startx: command not found
[1]   Done                    curl http://mirrorlist.centos.org/?release=7
[2]-  Done                    arch=x86_64
[3]+  Done                    repo=os*​ 
Also I tried these based on findings on the Internet:

Code: Select all

[cuser@localhost ~]$ ONBOOT=no     
[cuser@localhost ~]$ sudo dhclient
issuing "curl http://mirror.centos.org/centos/7/os/x8 ... repomd.xml" command returnes nothing.

any idea?
Why does 1000+ people face with the same issue? Why there is no any workaround for this stupid error?

Re: This Famous issue; CAnnot find Repo!

Posted: 2018/01/17 14:03:42
by TrevorH
Probably because it's a problem with your network setup not with CentOS.

First, you need to enclose the url you pass to curl in quotes as it has embedded & characters in it and those tell the shell to put your command into the background so you're not running anything useful. Run curl "http://mirrorlist.centos.org/?release=7 ... nfra=stock" and see what you get from that. Test ping -c 1 mirrorlist.centos.org and see if you get a response to that.

Re: This Famous issue; CAnnot find Repo!

Posted: 2018/01/17 14:15:48
by avij
HTTP 302 is a redirect, and mirrorlist.centos.org does not send redirects. It's something closer to you that is issuing the redirects.

I would amend TrevorH's suggestion by using the -v flag to curl, ie. curl -v "http://mirrorlist.centos.org/?release=7 ... nfra=stock"

This will show the IP address and HTTP server (or proxy) versions, among other bits of info.

Re: This Famous issue; CAnnot find Repo!

Posted: 2018/01/17 14:53:41
by timaz
Hi;

Thank u for your help guys! Our firewall needs login through web page and despite that I'd created a rule to pass traffic to the Internet from Centos device, I'd forgotten to exclude it from that list. After excluding it, I was able to use yum on CentOs. Thank @avij and @TrevorH. your replies helped me to find issue.

Re: This Famous issue; CAnnot find Repo!

Posted: 2018/01/18 09:25:11
by pherynk
I ve got the same error. I ve never got such a message. I ve installed centos, switch on and this message appeared. I don't know why.

Re: This Famous issue; CAnnot find Repo!

Posted: 2018/01/18 09:32:40
by avij
pherynk wrote:I ve got the same error. I ve never got such a message. I ve installed centos, switch on and this message appeared. I don't know why.
How about you try the same curl -v "http://mirrorlist.centos.org/?release=7 ... nfra=stock" command that timaz used? It helped him to find the problem, perhaps it will help you as well.

Re: This Famous issue; CAnnot find Repo!

Posted: 2018/01/18 13:51:18
by pherynk
I used it without success.

Re: This Famous issue; CAnnot find Repo!

Posted: 2018/01/18 13:55:03
by pherynk
I cannot enter to grafical environment at all.

Re: This Famous issue; CAnnot find Repo!

Posted: 2018/01/18 14:08:41
by pherynk
It seems to me, that centos is not for me. With Fedora I haven't problem. I vanted to try it only.

Re: This Famous issue; CAnnot find Repo!

Posted: 2018/01/18 18:58:39
by TrevorH
You would need to help us to help you by posting the output of the commands we ask you to run not just reporting "I used it without success." which is utterly and totally useless for debugging purposes.