LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   apt-get update fails (https://www.linuxquestions.org/questions/linux-newbie-8/apt-get-update-fails-4175528963/)

jobart08 12-21-2014 07:15 PM

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!

frankbell 12-21-2014 07:27 PM

It sounds as if the computer in question is not seeing the internet.

Is the internet connection working? Can you ping a remote site?

jobart08 12-21-2014 08:40 PM

Quote:

Originally Posted by frankbell (Post 5288756)
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?

frankbell 12-21-2014 08:47 PM

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).

evo2 12-21-2014 09:01 PM

Hi,
Quote:

Originally Posted by jobart08 (Post 5288775)
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 (Post 5288775)
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.

jobart08 12-21-2014 09:14 PM

Quote:

Originally Posted by evo2 (Post 5288780)
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

jobart08 12-21-2014 09:17 PM

Quote:

Originally Posted by frankbell (Post 5288777)
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

jobart08 12-22-2014 12:18 AM

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!


All times are GMT -5. The time now is 01:30 AM.