Problem with Yum.

Issues related to configuring your network
Jonatanman
Posts: 11
Joined: 2015/05/08 19:25:27

Problem with Yum.

Post by Jonatanman » 2015/05/29 19:37:13

Hi:

I have the following issue when i try to update the server With Centos 6.6. with the command yum check-update: "Error: Cannot find a valid baseurl for repo: base"

There are an example.

Code: Select all

[root@localhost]# yum update
Complementos cargados:fastestmirror, refresh-packagekit, security
Configurando el proceso de actualización
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock error was
14: PYCURL ERROR 7 - "Failed to connect to 2a02:2498:1:3d:5054:ff:fed3:e91a: La red es inaccesible"
Error: Cannot find a valid baseurl for repo: base
[root@localhost]# yum check-update
Complementos cargados:fastestmirror, refresh-packagekit, security
Determining fastest mirrors
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock error was
14: PYCURL ERROR 7 - "Failed to connect to 2a02:2498:1:3d:5054:ff:fed3:e91a: La red es inaccesible"
Error: Cannot find a valid baseurl for repo: base
Can you help me please?

Thanks.

User avatar
avij
Forum Moderator
Posts: 2822
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Problem with Yum.

Post by avij » 2015/05/29 20:48:30

Can you ping mirrorlist.centos.org ? Do you have a default route set? Check with netstat -rn, look for a destination 0.0.0.0. If you run curl www.centos.org , does it return a few pages of HTML? Are you using a proxy? If not, should you be using a proxy?

Jonatanman
Posts: 11
Joined: 2015/05/08 19:25:27

Re: Problem with Yum.

Post by Jonatanman » 2015/06/01 14:11:06

Hi Avij.

I have ping to mirror.centos.org, but in my default route y have the following

Code: Select all

Destination     Gateway         Genmask      Flags   MSS Window  irtt Iface
    0.0.0.0     172.30.5.1      0.0.0.0         UG     0 0          0 eth0
My Gateway is 10.250.201.2... It's a problem or not??? How i can modify that?

Thanks

User avatar
avij
Forum Moderator
Posts: 2822
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Problem with Yum.

Post by avij » 2015/06/01 14:43:02

Right, but can you ping mirrorlist.centos.org as well? That is the server yum is trying to access, not mirror.centos.org. If you can ping mirror.centos.org, mirrorlist.centos.org is also likely reachable. But I'd like to make sure.

As for the default route, if you can access external hosts from your server, I would not start modifying your default gateway yet at this stage.

What about curl www.centos.org ? Are you using a proxy? Are you in charge of the network? If not, you could ask someone who runs your network if there's something that you would need to know.

Jonatanman
Posts: 11
Joined: 2015/05/08 19:25:27

Re: Problem with Yum.

Post by Jonatanman » 2015/06/01 15:20:21

I have ping to mirrorlist.centos.org There is a test:

Code: Select all

[root@server]# ping mirrorlist.centos.org
PING mirrorlist.centos.org (108.61.16.227) 56(84) bytes of data.
64 bytes from 108-61-16-227.constant.com (108.61.16.227): icmp_seq=1 ttl=57 time=157 ms
64 bytes from 108-61-16-227.constant.com (108.61.16.227): icmp_seq=2 ttl=57 time=156 ms
64 bytes from 108-61-16-227.constant.com (108.61.16.227): icmp_seq=3 ttl=57 time=156 ms
64 bytes from 108-61-16-227.constant.com (108.61.16.227): icmp_seq=4 ttl=57 time=156 ms
^C
--- mirrorlist.centos.org ping statistics ---
5 packets transmitted, 4 received, 20% packet loss, time 4150ms
rtt min/avg/max/mdev = 156.907/156.981/157.078/0.401 ms
About Curl, this send this...

curl: (7) Failed to connect to 2a02:2498:1:3d:0:b0ff:fe43:ad29: La red es inaccesible

I don't have a proxy...i'm not sure what's the problem... how can i see if network manager is enable?

User avatar
avij
Forum Moderator
Posts: 2822
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Problem with Yum.

Post by avij » 2015/06/01 15:32:02

You could try curl -4 www.centos.org to check if your IPv4 routing works properly.

This problem does not seem to be related to NetworkManager, so it's kind of irrelevant to know if it's in use or not.

Jonatanman
Posts: 11
Joined: 2015/05/08 19:25:27

Re: Problem with Yum.

Post by Jonatanman » 2015/06/02 14:39:49

Hi,

I did the test with curl -4 www.centos.org, but i have the same error...

curl: (7) couldn't connect to host

I saw others post and they have the same error. they says maybe the IPv6 config...but didn't have response as solved...

Thanks for your help and time.

User avatar
avij
Forum Moderator
Posts: 2822
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Problem with Yum.

Post by avij » 2015/06/02 15:12:02

Disabling IPv6 would not help in your case, because your server apparently can't connect to the mirrorlist via IPv4 either. You are only seeing the IPv6 messages, because yum/curl tries IPv4 first and it fails, and then when it fails also with IPv6, yum/curl will output only the last error message which happens to be for IPv6.

So, you can ping external hosts, but you can't connect to other sites over HTTP. This smells like there's something that blocking direct connections to the internet, and you should be using your network provider's proxy for outgoing connections. Please ask your network provider. If you need to use a proxy, you can add the proxy config to /etc/yum.conf (see man yum.conf and directives proxy, proxy_username, proxy_password).

Another possibility is that there's an overzealous firewall somewhere between your server and CentOS mirrorlist servers. In these cases it might help to add --disableplugin=fastestmirror to your yum command line. If this helps, edit /etc/yum/pluginconf.d/fastestmirror.conf to have enabled=0 to disable the fastestmirror plugin permanently. If you don't want to disable that plugin permanently, I guess reducing the maxthreads configuration directive would also help.

Jonatanman
Posts: 11
Joined: 2015/05/08 19:25:27

Re: Problem with Yum.

Post by Jonatanman » 2015/06/02 17:30:55

I did the test..and i didn't have sucessfully. There is the messajes:

Code: Select all

[root@server ~]yum update
Complementos cargados:refresh-packagekit, security
Configurando el proceso de actualización
http://vault.centos.org/6.0/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://vault.centos.org/6.0/os/x86_64/repodata/repomd.xml: (28, 'connect() timed out!')
Intentando con otro espejo.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: C6.0-base. Please verify its path and try again
[root@server ~]# curl -4 www.centos.org
curl: (7) couldn't connect to host
I think the trouble is in my firewall, but i'm not sure... I will be try again. Do you have any comments?

Thanks.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Problem with Yum.

Post by gerald_clark » 2015/06/02 17:41:44

You should not be trying to access vault.centos.org.
Is this a real CentOS system, or some half-baked VM?

Please show the contents of CentOS-Base.repo and CentOS-Vault.repo.

Post Reply