0

I am attempting to redo my server (CentOS release 6.6 [Final] x86_64) and I am now getting the following output on yum

[root@server ~]# yum update
Loaded plugins: fastestmirror, priorities, security
Setting up Update Process
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 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Error: Cannot find a valid baseurl for repo: base

Because it's relevant here is my /etc/resolv.conf

nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver IP ADDRESS
nameserver IP ADDRESS
search au.sever.com vmware.au.server.com

This is an output for a dig

[root@server ~]# dig @8.8.8.8 www.google.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6 <<>> @8.8.8.8 www.google.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

I have also run ifdown eth0 && ifup eth0 and it appears to have run sucessfully

Additionally my /etc/named.conf file is empty. I don't know why and/or what to put in it...

I can't ping google.com either...

closed as off-topic by mdpc, MadHatter, Andrew Schulman, HBruijn, Ward Nov 11 '14 at 10:02

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – MadHatter, Andrew Schulman, HBruijn, Ward
If this question can be reworded to fit the rules in the help center, please edit the question.

  • First thing to do would be to connect it to the Internet. – Michael Hampton Nov 10 '14 at 6:30
  • It's a vps and I am connecting to it via SSH, I am assuming this means it's internet connected. (I don't mean for that to sound facetious) – Joshua Nov 10 '14 at 6:36
  • 1
    What do you get when you try resolving mirrorlist.centos.org specifically? Also, does your /etc/resolv.conf literally have two lines that read nameserver IP ADDRESS? – Mike B Nov 10 '14 at 7:08
  • Hi @MikeB When I ping google.com the output is ping: unknown host google.com I assume the same would be for mirrorlist.centos.org and I removed the IP Address. Upon further investigation, it appears to be my internal IP Address. – Joshua Nov 10 '14 at 7:18
  • @Joshua So you can't reach any sites? It sounds like it's not a DNS issue - it just can't connect at all. What do you have set under /etc/sysconfig/network? Is GATEWAY= set to the right IP for your default router/gateway? If you're not sure, I'd check with your VPS host. They should be able to confirm. – Mike B Nov 10 '14 at 7:25
2

I found out my problem my /etc/sysconfig/network-scripts/ifcfg-eth0 was incorrect bootproto was set to none or something similar, I changed it to static then rebooted and everything came online.

  • Type ifdown eth0 ifup eth0 – Arshid KV Nov 25 '15 at 8:17
  • 1
    Just a heads up to other users reading this comment, Do NOT use command ifdown eth0 if you are working on a remote web server through ssh – th3pirat3 Jul 17 '18 at 17:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.