LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-18-2011, 11:19 PM   #16
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled

can anyone tell me please...
 
Old 10-18-2011, 11:52 PM   #17
aazkan
Member
 
Registered: Jan 2008
Posts: 72

Rep: Reputation: 5
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.
 
Old 10-18-2011, 11:55 PM   #18
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
In that case can you post your

Code:
#vi yum.conf

#vi /etc/yum.repos.d/xxx.repo
 
Old 10-19-2011, 12:03 AM   #19
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
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

Last edited by SarahGurung; 10-19-2011 at 12:14 AM.
 
Old 10-19-2011, 12:28 AM   #20
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
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
 
Old 10-19-2011, 12:48 AM   #21
aazkan
Member
 
Registered: Jan 2008
Posts: 72

Rep: Reputation: 5
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.
 
Old 10-19-2011, 12:53 AM   #22
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
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..

Last edited by SarahGurung; 10-19-2011 at 01:07 AM.
 
Old 10-19-2011, 01:08 AM   #23
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
I think all you need to do is turn

Code:
enabled=0
in all the sections and try

Last edited by deep27ak; 10-19-2011 at 01:09 AM.
 
Old 10-19-2011, 01:17 AM   #24
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
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..
 
Old 10-19-2011, 01:24 AM   #25
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
there's no harm in trying

and if it doesn't works then it goes again to resolv.conf
 
Old 10-19-2011, 01:45 AM   #26
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
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?
 
Old 10-19-2011, 01:53 AM   #27
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
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
 
Old 10-19-2011, 02:37 AM   #28
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
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..
 
Old 10-19-2011, 03:08 AM   #29
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
did you tried this command

Code:
#yum clean all
#yum update

are you able to list all yum?

Code:
#yum list
 
Old 10-19-2011, 04:06 AM   #30
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
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..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nameserver help kshazad86 Linux - Server 4 04-15-2011 03:52 PM
How would one specify one's own nameserver? RandomTroll Linux - Networking 2 08-19-2010 10:08 PM
nameserver linux_2007_ Linux - Networking 4 03-18-2007 11:56 PM
which is my nameserver. bruse Linux - Networking 3 07-16-2005 02:45 AM
secondary nameserver dilberim82 Linux - Networking 2 10-24-2001 07:47 AM


All times are GMT -5. The time now is 07:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration