LinuxQuestions.org
Review your favorite Linux distribution.
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 12-21-2014, 07:15 PM   #1
jobart08
Member
 
Registered: Sep 2014
Posts: 72

Rep: Reputation: Disabled
apt-get update fails


2 servers, both have debian running. they are similar in every way, except that one is successfully updating. The other keeps failing.

here is the output:
root@SERVERNAME:/etc/apt# apt-get update
Err http://security.debian.org wheezy/updates Release.gpg
Could not resolve 'security.debian.org'
Err http://ftp.debian.org wheezy-updates Release.gpg
Could not resolve 'ftp.debian.org'
Err http://ftp.us.debian.org wheezy-updates Release.gpg
Could not resolve 'ftp.us.debian.org'
Err http://ftp.us.debian.org wheezy Release.gpg
Could not resolve 'ftp.us.debian.org'
Reading package lists... Done
W: Failed to fetch http://security.debian.org/dists/whe...es/Release.gpg Could not resolve 'security.debian.org'

W: Failed to fetch http://ftp.debian.org/debian/dists/w...es/Release.gpg Could not resolve 'ftp.debian.org'

W: Failed to fetch http://ftp.us.debian.org/debian/dist...es/Release.gpg Could not resolve 'ftp.us.debian.org'

W: Failed to fetch http://ftp.us.debian.org/debian/dist...zy/Release.gpg Could not resolve 'ftp.us.debian.org'

W: Some index files failed to download. They have been ignored, or old ones used instead.


I've already copied the sources.list file from the working server to the non-working and still the same error.

What else am I missing?

apt.conf is identical on both servers.

Any help would be appreciated. Thanks!
 
Old 12-21-2014, 07:27 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,286
Blog Entries: 16

Rep: Reputation: 3132Reputation: 3132Reputation: 3132Reputation: 3132Reputation: 3132Reputation: 3132Reputation: 3132Reputation: 3132Reputation: 3132Reputation: 3132Reputation: 3132
It sounds as if the computer in question is not seeing the internet.

Is the internet connection working? Can you ping a remote site?
 
Old 12-21-2014, 08:40 PM   #3
jobart08
Member
 
Registered: Sep 2014
Posts: 72

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
It sounds as if the computer in question is not seeing the internet.

Is the internet connection working? Can you ping a remote site?
This was my first guess when I encountered the error message, but the other server couldn't ping www.google.com.ph as well, but can still update online.

When I do an apt-cache search, it returns results. Does that mean that it can connect to the internet?
 
Old 12-21-2014, 08:47 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,286
Blog Entries: 16

Rep: Reputation: 3132Reputation: 3132Reputation: 3132Reputation: 3132Reputation: 3132Reputation: 3132Reputation: 3132Reputation: 3132Reputation: 3132Reputation: 3132Reputation: 3132
This is a shot in the dark, but you could try running apt-get clean.

If that fails, post the contents of your /etc/apt/sources.list file from the problem computer (you might want to compare it with the other computer's list first).
 
Old 12-21-2014, 09:01 PM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,
Quote:
Originally Posted by jobart08 View Post
This was my first guess when I encountered the error message, but the other server couldn't ping www.google.com.ph as well, but can still update online. \
Looks like a nameserver/nameresolution issue to me. I guess you can resolve the debian hosts on the other machine but not on the one you're having trouble with. Check the output on both machines for
Code:
dig security.debian.org
Quote:
Originally Posted by jobart08 View Post
When I do an apt-cache search, it returns results. Does that mean that it can connect to the internet?
No it is just reading what it cached the last time you did a successful "apt-get update".

Evo2.
 
Old 12-21-2014, 09:14 PM   #6
jobart08
Member
 
Registered: Sep 2014
Posts: 72

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
Hi,

Looks like a nameserver/nameresolution issue to me. I guess you can resolve the debian hosts on the other machine but not on the one you're having trouble with. Check the output on both machines for
Code:
dig security.debian.org
No it is just reading what it cached the last time you did a successful "apt-get update".

Evo2.
Thanks for the reply. Both servers have the same output.

root@SERVERNAME:/etc/apt# dig security.debian.org

; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> security.debian.org
;; global options: +cmd
;; connection timed out; no servers could be reached
 
Old 12-21-2014, 09:17 PM   #7
jobart08
Member
 
Registered: Sep 2014
Posts: 72

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
This is a shot in the dark, but you could try running apt-get clean.

If that fails, post the contents of your /etc/apt/sources.list file from the problem computer (you might want to compare it with the other computer's list first).
Ive ran apt-get clean several times already. Same result.

Here is the sources.list

root@SERVERNAME:/etc# cat /etc/apt/sources.list
#

# deb cdrom:[Debian GNU/Linux 7.5.0 _Wheezy_ - Official amd64 CD Binary-1 20140426-13:37]/ wheezy main

#deb cdrom:[Debian GNU/Linux 7.5.0 _Wheezy_ - Official amd64 CD Binary-1 20140426-13:37]/ wheezy main

# Line commented out by installer because it failed to verify:
deb http://security.debian.org/ wheezy/updates main
# Line commented out by installer because it failed to verify:
deb-src http://security.debian.org/ wheezy/updates main

# wheezy-updates, previously known as 'volatile'
# A network mirror was not selected during install. The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
deb http://ftp.debian.org/debian/ wheezy-updates main
deb-src http://ftp.debian.org/debian/ wheezy-updates main
deb http://ftp.us.debian.org/debian/ wheezy-updates main
deb-src http://ftp.us.debian.org/debian/ wheezy-updates main
deb http://ftp.us.debian.org/debian wheezy main contrib non-free
 
Old 12-22-2014, 12:18 AM   #8
jobart08
Member
 
Registered: Sep 2014
Posts: 72

Original Poster
Rep: Reputation: Disabled
I consulted with our resident Linux guru, and he said that for some strange reason, the entries in my apt.conf wasn't being read by the system. It contained the proxy server settings that was supposed to be used by the server. He fixed my issue by putting the proxy server settings in the root profile.

Thanks to everyone who replied. Happy Holidays!
 
  


Reply

Tags
apt-get, apt-get update, apt-get upgrades


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
apt-get update fails caryl Linux - Networking 4 05-09-2014 03:42 AM
Installing from apt-get fails often, apt-get update gives error, etc What should ido? mitchell7man Ubuntu 3 02-27-2012 02:55 AM
Apt-get update fails dasy2k1 Ubuntu 2 09-17-2009 06:20 PM
apt-get update fails after login wolfe2554 Debian 1 02-07-2005 01:40 PM
apt update fails s_diptiman Linux - Newbie 0 10-22-2003 04:37 AM


All times are GMT -5. The time now is 08:21 PM.

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