Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: [SOLVED] apt-get update Could not resolve errors

  1. #1
    Join Date
    Dec 2007
    Beans
    11

    [SOLVED] apt-get update Could not resolve errors

    I have this server running on my network at work. I attempt to run
    Code:
    sudo apt-get update
    sudo aptitude update
    and for every index file I get the error "Could not resolve xxxxx.xxxxx.xxxxx".

    I have used the commands
    Code:
    dig us.archive.ubuntu.com
    dig security.ubuntu.com
    and they appear to resolve fine.

    Since I have seen it requested numerous times, here is the output of 'cat /etc/apt/sources.list':
    Code:
    #
    # deb cdrom:[Ubuntu-Server 8.04.1 _Hardy Heron_ - Release i386 (20080701)]/ hardy main restricted
    
    #deb cdrom:[Ubuntu-Server 8.04.1 _Hardy Heron_ - Release i386 (20080701)]/ hardy main restricted
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    
    deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
    deb-src http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
    deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## universe WILL NOT receive any review or updates from the Ubuntu security
    ## team.
    deb http://us.archive.ubuntu.com/ubuntu/ hardy universe
    deb-src http://us.archive.ubuntu.com/ubuntu/ hardy universe
    deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe
    deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse
    deb-src http://us.archive.ubuntu.com/ubuntu/ hardy multiverse
    deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
    deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
    
    ## Uncomment the following two lines to add software from the 'backports'
    ## repository.
    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    # deb http://us.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
    # deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
    
    ## Uncomment the following two lines to add software from Canonical's
    ## 'partner' repository. This software is not part of Ubuntu, but is
    ## offered by Canonical and the respective vendors as a service to Ubuntu
    ## users.
    # deb http://archive.canonical.com/ubuntu hardy partner
    # deb-src http://archive.canonical.com/ubuntu hardy partner
    
    deb http://security.ubuntu.com/ubuntu hardy-security main restricted
    deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted
    deb http://security.ubuntu.com/ubuntu hardy-security universe
    deb-src http://security.ubuntu.com/ubuntu hardy-security universe
    deb http://security.ubuntu.com/ubuntu hardy-security multiverse
    deb-src http://security.ubuntu.com/ubuntu hardy-security multiverse
    Any help or suggestions would be appreciated.

  2. #2
    Join Date
    May 2007
    Location
    Phoenix, Arizona USA
    Beans
    2,909
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: apt-get update Could not resolve errors

    What is in your /etc/resolv.conf?

    -Tim
    www.pcchopshop.net

    Hard to find and obsolete PC and server parts. "If we can't find it, it probably doesn't exist"

  3. #3
    Join Date
    Dec 2007
    Beans
    11

    Re: apt-get update Could not resolve errors

    result of 'cat /etc/resolv.conf':
    Code:
    nameserver 10.0.0.11
    nameserver 66.155.216.122
    Just wanted to add that I am unsure what protocol the apt-get command uses to download the index files so I tried connecting to my web host's FTP server and when through a few commands, including get and put, without issue so I know nothing is configured to block FTP, if that is even relevant.
    Last edited by temp1029; August 1st, 2008 at 08:00 PM.

  4. #4
    Join Date
    Nov 2006
    Location
    Pennsylvania
    Beans
    423

    Re: apt-get update Could not resolve errors

    is port 80 open on the server?
    Your Ubuntu User number is # 15355

    A must Read for anyone interested in Computer Programming.

  5. #5
    Join Date
    Dec 2007
    Beans
    11

    Re: apt-get update Could not resolve errors

    The result of running 'netstat -nap', which is the best way i know to check open ports, is:
    Code:
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      4472/mysqld
    tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      4548/smbd
    tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      4617/apache2
    tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      4548/smbd
    tcp6       0      0 :::22                   :::*                    LISTEN      4374/sshd
    tcp6       0    340 10.0.10.57:22           10.0.10.51:3313         ESTABLISHED 5016/sshd: temp1029
    udp        0      0 10.0.10.57:137          0.0.0.0:*                           4546/nmbd
    udp        0      0 0.0.0.0:137             0.0.0.0:*                           4546/nmbd
    udp        0      0 10.0.10.57:138          0.0.0.0:*                           4546/nmbd
    udp        0      0 0.0.0.0:138             0.0.0.0:*                           4546/nmbd
    udp        0      0 0.0.0.0:68              0.0.0.0:*                           3968/dhclient3
    I'm guessing apt-get uses HTTP to get the index files then?

  6. #6
    Join Date
    May 2007
    Location
    Phoenix, Arizona USA
    Beans
    2,909
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: apt-get update Could not resolve errors

    I'm sure having port 80 open is not your problem.

    What is 10.0.0.11 on your network?

    Also, try adding a third nameserver to your resolv.conf, but put it at the top. I use 2.2.2.4. You don't have to use your ISPs DNS servers and sometimes others are faster.

    -Tim
    www.pcchopshop.net

    Hard to find and obsolete PC and server parts. "If we can't find it, it probably doesn't exist"

  7. #7
    Join Date
    May 2007
    Location
    Phoenix, Arizona USA
    Beans
    2,909
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: apt-get update Could not resolve errors

    Quote Originally Posted by TreeFinger View Post
    is port 80 open on the server?
    If he can surf the web, 80 is open. most likely not his problem.

    -Tim
    www.pcchopshop.net

    Hard to find and obsolete PC and server parts. "If we can't find it, it probably doesn't exist"

  8. #8
    Join Date
    Nov 2004
    Location
    Milwaukee, WI.
    Beans
    12

    Re: apt-get update Could not resolve errors

    Try to restart networking and see if that doesn't clear things up.
    Code:
    sudo /etc/init.d/networking restart

  9. #9
    Join Date
    Dec 2007
    Beans
    11

    Re: apt-get update Could not resolve errors

    Quote Originally Posted by windependence View Post
    I'm sure having port 80 open is not your problem.

    What is 10.0.0.11 on your network?

    Also, try adding a third nameserver to your resolv.conf, but put it at the top. I use 2.2.2.4. You don't have to use your ISPs DNS servers and sometimes others are faster.

    -Tim
    10.0.0.11 is the local network's DNS server. I tried putting 2.2.2.4 as the first, second and last line of the resolv.conf file and then doing '/etc/init.d/networking restart' and it appears to re-assert the previous state, with just the two nameserver lines. Any other ideas?

    I might bring this box home and plug it into my home network to see if it is a network or machine issue, although I'm not quite sure how the network it is currently on would block the apt-get request but allow other requests, any ideas here?

  10. #10
    Join Date
    May 2007
    Location
    Phoenix, Arizona USA
    Beans
    2,909
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: apt-get update Could not resolve errors

    Are you running a lot of computers on your LAN (more than 10 or so)? If not, you probably don't need to be running a local DNS server. For some reason, here on the Ubuntu forums, everyone thinks they need to be running one of those. If you have a very large network, then yes, you need one but otherwise, it just adds more complexity to your network.

    Obviously, it can't connect to the repositories. You could try substituting the actual IP of the repo servers in your sources list to eliminate the need for DNS lookup, OR you could add an entry for them in your /etc/hosts file which isn't a bad idea anyway because it eliminates the DNS lookup on the external DNS. The server checks that file first when resolving names so it's faster for any site you use frequently.

    -Tim
    www.pcchopshop.net

    Hard to find and obsolete PC and server parts. "If we can't find it, it probably doesn't exist"

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •