not able to update nameserver
hello everyone,
when i tried to update my nameserver today,i got an error sayin: cannot retrieve the mirrorlist http://mirrorlist.centos.org,urlopen...#39;connection timed out') So what does this mean and what should i be doing now? |
Hi,
Couple of things to try, top of my head: 1. Is your /etc/resolv.conf pointed to your own nameserver? Perhaps point it out to Google's dns or opendns and try yum again. 2. Try using links or copy paste the url to your browser (IE,Chrome etc). To use links, access the url like so links http://mirrolist.centos.org if it returns a 404, CentOS mirrors could be unreachable at this time (maintenance, network latency etc) 3. If the URL is reachable, try the following on the machine your ran yum yum clean all yum check-update |
well i opened that url http://mirrorlist.centos.org as you said but it didnt return any error and opened easily and ya i did yum clean all and then yum check-update after that but i still got the same thing...
|
I've come across this before but am not sure if how i solved it will work out for you but if you dont mind trying, I'll help out.
For starters, can you copy paste the actual error message you get when running yum? also if you dont mind lsb_release -a uname -rmi |
well this is the exact error that i get when i run yum check-update command:
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org/?releas...86&repo=addons error was [Errno 4] IOError: <urlopen error (110, 'Connection timed out')> Error: Cannot find a valid baseurl for repo: addons and when i did uname -rmi,it gave: 2.6.18-238.19.1.el5.centos.plusPAE i686 i386 and with lsb_release -a.it gave: LSB Version: :core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 5.6 (Final) Release: 5.6 Codename: Final thanks... |
Can you try
yum --disableplugin=fastestmirror check-update -d6 Also, if you don't mind can you copy paste your /etc/resolv.conf? |
Oh yes, just crossed my mind, is there a http proxy up front of that CentOS box? If there is you'd probably want to set yum to use it or export the http_proxy variable.
|
well can you please tell me what is the use of "yum --disableplugin=fastestmirror check-update -d6" command?because i have totry it on a live server and cant use it unless i'm very sure about what the command really does....please don't mind...
and i didnt understand what you meant by http proxy and all that...can you please elaborate on that? Thank you.. |
--disableplugin=fastestmirror
tells yum not to use the fastestmirror plugin check-update tells yum check update -d6 tells yum to run with debug or more verbose Sarah, if you're not comfortable then don't run any of the commands i've input. No harm to be paranoid. In my LANs, no servers can access ftp, http and other ports directly (to prevent shell users or if the server is compromised) to download anything. The traffic going out is purposely not NATed or Masqueraded out. So to allow something like yum which needs to access http, i need to export a http_proxy variable to yum so it knows to use a squid http proxy somewhere in my LANs. If you're not using a http proxy then it's safe to ignore the suggestion as well. I'm betting it has to do with a http proxy or perhaps on the isp side. |
ell my boss isn't here and cant contact him either....i think he has used http proxy as he is really concerned with the securities,if so how should i be exporting the http variable or is there a way to know if http proxy is being used??
and you also told about the isp side?what could be wrong in the isp side? |
Is your yum configured properly on the system?
are you able to install any other package using yum please check with any package and also lookout for Quote:
|
yes,i am able to install other things using yum...
|
if there is a http proxy that needs to be use, before running yum do this
export http_proxy=http://x.x.x.x:1234/; export ftp_proxy=http://x.x.x.x:1234/ when you're done do unset http_proxy; unset ftp_proxy i'm assuming you're using bash About the isp, in one of our co-los, the isp puts a transparent http proxy, was a cisco webcache or something. The cache was dirty or stale. Once we get them to remove us (routing) from the being http cached transparently, yum worked nicely since. |
if you are using any proxy server then
do the following Code:
#vi /etc/yum.conf then go to Code:
#vi /root/.bash_profile now try using yum |
well previously we were using proxy server which was untangle but now we have removed that one...
so what could be the other possible reasons for not being able to use "yum check-update" command in our primary name server(ns0)?? |
can anyone tell me please...
|
Sarah,
Could you tell me if nslookup works on server with the broken yum? Try with nslookup mirror.centos.org ipofyournameserver if it replies. I saw another post by you about the webserver reolving to 127.0.0.1 and am guessing if fault dns could have been the cause. On the same token, what's the content of /etc/resolv.conf on that server with the faulty yum? You also mentioned your boss uses a http proxy. Any chance you try setting yum to use the http proxy? Almost running out of ideas, i would suggest you reinstall yum i.e: download the yum rpm to the server or extract it from a centOS dvd, rpm remove yum and then rpm install it back again. |
In that case can you post your
Code:
#vi yum.conf |
well the output of /ect/resolv.conf for the server with faulty yum is:
search tashicell.com nameserver 118.103.137.1 nameserver 118.103.136.65 nameserver 118.103.136.67 and the output of yum.conf is: [main] cachedir=/var/cache/yum keepcache=0 debuglevel=2 logfile=/var/log/yum.log distroverpkg=redhat-release tolerant=1 exactarch=1 obsoletes=1 gpgcheck=1 plugins=1 bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://b ugs.centos.org/bug_report_page.php?category=yum # Note: yum-RHN-plugin doesn't honor this. metadata_expire=1h installonly_limit = 5 # PUT YOUR REPOS HERE OR IN separate files named file.repo # in /etc/yum.repos.d and the output for /etc/yum/repos.d/Centos-Base.repo is: # CentOS-Base.repo # # This file uses a new mirrorlist system developed by Lance Davis for CentOS. # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo =os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 priority=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #released updates [updates] name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo =updates #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1 priority=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo =addons #baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/ gpgcheck=1 priority=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo =extras #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ gpgcheck=1 priority=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo =centosplus #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=1 priority=2 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo =contrib #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=1 priority=2 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 |
Aazkan this is th error that i get when i do "yum check-update":
Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org/?releas...86&repo=addons error was [Errno 4] IOError: <urlopen error (110, 'Connection timed out')> Error: Cannot find a valid baseurl for repo: addons |
Your yum.conf and repos looks ok, nothing obviously wrong.
How comfortable are you with command lines to remove, download and install yum? If you think your willing to have a go, i'll see to guiding you through. I cant gurantee this will fix the problem but we'll at least be certain yum after reinstall will theoratically working out of the box. I'll be out to fetch my son from his play school and out to be back online in an hour or so. Let me know if you want to give this a shot. |
wow thanks aazkan,that is really nice of you..
ya i would like to try this out but want you guiding me throughout as well... Or is something wrong with my base url of the addons,because the error says that the "Could not retrieve mirrorlist http://mirrorlist.centos.org/?releas...86&repo=addons " ,and i went to this url it returns 404 error.. |
I think all you need to do is turn
Code:
enabled=0 |
well in the other servers i.e the slave servers,enabled has been set to 1,yum check-update is still working...
it's only the primary nameserver which is having this problem.. |
there's no harm in trying:)
and if it doesn't works then it goes again to resolv.conf |
thanks deepak but i don't know what is wrong with my vi editor, m not able to save the changes...
i went to insert mode and made the changes and typed :wq to save the changes and exit but it isnt happening..am i wrong? |
what is the error you are getting?
check the permissions on file take a backup of the .repo file at some place and then change the permission as root user, then give it a try |
well deepak i did as u said...vi worked,it was my mistake that it didnt work that time....
even after putting 0 to enabled that command didnt work.. |
did you tried this command
Code:
#yum clean all are you able to list all yum? Code:
#yum list |
ya i tried the first two commands,it gives the same problem still..
and yum list command is also not working,it gives the same error.. |
aazkan are u back?and Mr.deepak can u help further from this?
|
@reply
Code:
# If the mirrorlist= does not work for you, as a fall back you can try the why don't you try the base url for yum? |
i didnt't get you properly...
if what you meant was to tryin accesing the base url then,that isnt opening either.. |
Quote:
I mean comment the mirror list in the repo file and uncomment all the baseurls |
by commenting u meant to put # in the front right?or is it different?
|
I have a problematic ISP, and with the same error what i have did is to comment the mirrorlist line and uncomment the baseurl line.
For me it has work. |
yes just put # infront of mirror list and remove # from baseurl
this will work if the baseurl exist..!!! |
but when i copied that base url and typed it in the browser it's giving 404 error so i dont think commenting and uncommenting would help..
|
hi Sarah,
Am back, sorry, was fixing dinner and putting my daughter to bed. If you're getting a 404 on the baseurl itself, perhaps you do need to use the http proxy setting. Just to test this theory, can you try this on that machine curl -s http://www.google.com/index.html and let us know what's the output? |
well i tried,it isn't returning any output at all...
you know the same baseurl and mirrolist is their in the slave servers also but there the yum command is working,it is only in the primary nameserver where it is returning that kind of error when using yum.. |
Quote:
So give a check whether that server is stopped? it might be the issue of proxy server |
oh ya it has been stooped....we don't use that anymore.....
even if it is because of that proxy,can u please tell me why the command isnt working only in the primary nameserver then? i even tried the "yum --disableplugin=fastestmirror check-update -d6" as u said but it gave the following error: Config time: 0.100 Yum Version: 3.2.22 Setting up Package Sacks Could not retrieve mirrorlist http://mirrorlist.centos.org/?releas...86&repo=addons error was [Errno 4] IOError: <urlopen error (110, 'Connection timed out')> Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again |
That curl command ought to have output either one
a. curl command not found (curl isn't installed) b. an output similar to this curl -s http://www.google.com/index.html <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8"> <TITLE>302 Moved</TITLE></HEAD><BODY> <H1>302 Moved</H1> The document has moved <A HREF="http://www.google.com.my/index.html">here</A>. </BODY></HTML> on the slave servers, can you try set|grep -i http*proxy grep -i http*proxy /etc/yum.conf to check if there is any http proxy set or used. This is kind a wild guess but can you also try iptables -L -nv | grep -A 3 OUTPUT on the master |
well when i tried those commands in slave servers,it didnt return any output..
and for iptables -L -nv | grep -A 3 OUTPUT inthe master it gave the following output: Chain OUTPUT (policy ACCEPT 1717K packets, 165M bytes) pkts bytes target prot opt in out source destination Chain RH-Firewall-1-INPUT (2 references) |
From what you explained, something is blocking yum from fetching data from centOS mirror.
Without knowing how the server is connected in your LAN to WAN, i'm just making guesses what could have gone wrong (or right) What kind bugs me is the curl did not give any output... almost tempted to suggest wget next :p |
well i even did the commenting and uncommenting thing as suggested but still i got the same error...
in fact none of the commands using yum are working.. eveb tried "yum --disableplugin=fastestmirror check-update -d6"but ... |
can anyone help me please..
|
Sarah, would you want to try with re- installing yum?
|
ok now I want to give a random hit
are you using IPV6? just do as following Code:
#service ip6tables stop Code:
#cd /etc/modeprobe.d Code:
add the following line to /etc/sysconfig/network This is something which I found on Google.... |
well we havent used ipv6 so far....we use ipv4 only..
|
All times are GMT -5. The time now is 04:50 AM. |