How to fix "Looking up update.FreeBSD.org mirrors... none found." issue when using "freebsd-update"?

7,482

You need to provide much more information about your networking.

What are your DNS settings (/etc/resolv.conf)? Are you able to reach the rest of the world (eg. ping 8.8.8.8 works?)? Is your FreeBSD box NAT-ed behind Virtualbox? What exactly is your network configuration - on both host and VM.

Sorry for not commenting, but I'm not able cause this is my first post in superuser.

EDIT: Try editing ServerName in /etc/freebsd-update.conf to contain update.freebsd.org (all lower case) instead of update.FREEBSD.org. This should fix it. I came across this bug today (in FreeBSD 10.1-RELEASE and 10.2-RELEASE, but I assume the same holds for 11 as well) and by searching I found your question. I filed this bug to FreeBSD bugzilla (https://forums.freebsd.org/threads/28992/) where I also provide a patch to freebsd-update script, but if you don't want to patch your system yourself you can resolve it by editing the config file.

Share:
7,482

Related videos on Youtube

Nan Xiao
Author by

Nan Xiao

Updated on September 18, 2022

Comments

  • Nan Xiao
    Nan Xiao over 1 year

    I install FreeBSD 11.0-RC3 on VirtualBox, and when do "freebsd-update fetch" operation, it reports following errors:

    # freebsd-update fetch
    Looking up update.FreeBSD.org mirrors... none found.
    Fetching public key from update.FreeBSD.org... failed.
    No mirrors remaining, giving up.
    

    I follow this post to try to specifiy IP, but the problem still exists:

    # freebsd-update -s 204.9.55.80 fetch
    Looking up 204.9.55.80 mirrors... none found.
    Fetching public key from 204.9.55.80... failed.
    No mirrors remaining, giving up.
    

    Is there any clue to resolve this issue?

    P.S. : /etc/resolv.conf looks like this:

    # cat /etc/resolv.conf
    # Generated by resolvconf
    nameserver 192.168.1.1
    

    Update: After modifying update.FREEBSD.org to update.freebsd.org in /etc/freebsd-update.conf, the mirror can be found, while fetching metadata always fail:

    # freebsd-update fetch
    Looking up update.freebsd.org mirrors... 4 mirrors found.
    Fetching metadata signature for 11.0-RC3 from update6.freebsd.org... done.
    Fetching metadata index... done.
    Fetching 1 metadata files... failed.
    

    Is it related to 11.0-RC3 version of FreeBSD?

    Update2: I have reinstalled FreeBSD 11.0 release version and modified /etc/freebsd-update.conf, but this issue still exists:

    # freebsd-update fetch
    Looking up update.freebsd.org mirrors... 4 mirrors found.
    Fetching metadata signature for 11.0-RELEASE from update5.freebsd.org... done.
    Fetching metadata index... done.
    Fetching 2 metadata files... failed.
    root@:~ # freebsd-version
    11.0-RELEASE-p1
    

    Update3: The output of "freebsd-update -v debug fetch":

    # freebsd-update -v debug fetch
    Looking up update.freebsd.org mirrors... 4 mirrors found.
    Fetching metadata signature for 11.0-RELEASE from update4.freebsd.org...
    latest.ssl                                    100% of  512  B   86 kBps 00m00s
    done.
    Fetching metadata index...
    de2f66ce6dc2aa66344531561be5d3d32bdfa79d6f25a5100% of  225  B   25 kBps 00m00s
    done.
    Fetching 2 metadata files...
    /usr/libexec/phttpget update4.freebsd.org 11.0-RELEASE/i386/m/164167fe5683a08d1bb923aaa3b79c7d259d48d8dbc9841c16477871af5cdca4.gz 11.0-RELEASE/i386/m/371539286dd49cae549fc6de9c16d07c59a5b643881f3ec72d0d4706f19ad296.gz
    http://update4.freebsd.org/11.0-RELEASE/i386/m/164167fe5683a08d1bb923aaa3b79c7d259d48d8dbc9841c16477871af5cdca4.gz: 302 Redirection (ignored)
    http://update4.freebsd.org/11.0-RELEASE/i386/m/371539286dd49cae549fc6de9c16d07c59a5b643881f3ec72d0d4706f19ad296.gz: 302 Redirection (ignored)
    failed.
    

    Update4:
    (1) Can you fetch the files from within the FreeBSD VM? Can you wget them on the host machine when no proxy is enabled?
    My host is Windows, and I can use wget on FreeBSD VM and Free Download Manager on host download the update files successfully with no proxy.

    (2) The network configurations of VM:

    # ifconfig -a
    em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
            options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
            ether 08:00:27:43:a8:70
            inet 192.168.1.10 netmask 0xffffff00 broadcast 192.168.1.255
            nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
            media: Ethernet autoselect (1000baseT <full-duplex>)
            status: active
    lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
            options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
            inet6 ::1 prefixlen 128
            inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
            inet 127.0.0.1 netmask 0xff000000
            nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
            groups: lo
    # netstat -rn
    Routing tables
    
    Internet:
    Destination        Gateway            Flags     Netif Expire
    default            192.168.1.1        UGS         em0
    127.0.0.1          link#2             UH          lo0
    192.168.1.0/24     link#1             U           em0
    192.168.1.10       link#1             UHS         lo0
    
    Internet6:
    Destination                       Gateway                       Flags     Netif Expire
    ::/96                             ::1                           UGRS        lo0
    ::1                               link#2                        UH          lo0
    ::ffff:0.0.0.0/96                 ::1                           UGRS        lo0
    fe80::/10                         ::1                           UGRS        lo0
    fe80::%lo0/64                     link#2                        U           lo0
    fe80::1%lo0                       link#2                        UHS         lo0
    ff02::/16                         ::1                           UGRS        lo0
    # cat /etc/resolv.conf
    # Generated by resolvconf
    nameserver 192.168.1.1
    
  • Nan Xiao
    Nan Xiao over 7 years
    I add /etc/resolv.conf in OP, and FreeBSD box is bridged behind Virtualbox. I can use pkg install command to install software successfully, so does it mean the network connectivity is OK? Thx!
  • mamalos
    mamalos over 7 years
    I've edited my post to contain the possible answer to your question.
  • Nan Xiao
    Nan Xiao over 7 years
    After modifying /etc/freebsd-update.conf, the mirror can be found, which fetching metadata always fail. Is it related to RC version of FreeBSD? Thx!
  • mamalos
    mamalos over 7 years
    Ah, of course! I didn't realise you were referring to a release-candidate. freebsd-update is only available for RELEASE branches, so it wouldn't work either way. You can download FreeBSD 11-RELEASE now that it's production ready.
  • Nan Xiao
    Nan Xiao over 7 years
    I install FreeBSD 11.0 release, but the issue still exists.
  • mamalos
    mamalos over 7 years
    Did you edit /etc/freebsd-update.conf to contain update.freebsd.org in lower-case? Because from your edit I see that you fail to obtain any mirrors.
  • Nan Xiao
    Nan Xiao over 7 years
    I modified /etc/freebsd-update.conf, and the issus is same with FreeBSD RC3 edition. Please refer Update2 in OP, thanks!
  • mamalos
    mamalos over 7 years
    Try running freebsd-update -v debug fetch and paste your output on a new edit to see what's happening.
  • Nan Xiao
    Nan Xiao over 7 years
    Add "Update3", thx!
  • mamalos
    mamalos over 7 years
    I am not sure about your output, because I don't see the final message. I suppose it failed (I see some temporary redirections - 302)? Nevertheless, are you sure you're not behind some proxy (hidden or not)? Have you tried using NAT in your VM? I installed a FreeBSD 11.0-RELEASE amd64 (yours is i386) on a VM just to test your setup and it works fine. Of course, no updates are available, but I'm not getting any failure messages. Can you access these two files from within the VM and/or from your host? I tried to access the files for which you got the 302 message on my machine with success.
  • Nan Xiao
    Nan Xiao over 7 years
    Firstly, thanks very much for your time and help! I forgot adding "failed" in last update, and have updated the OP. I use proxy for accessing Internet indedd, and I can use Chrome from host to download the update files no matter using proxy or not. I can use "wget" command to download the update files successfully within the VM, while using "freebsd-update" failed on both "NAT" and "Bridge" mode. So it seems really weird.
  • mamalos
    mamalos over 7 years
    Nan, if you haven't made FreeBSD aware about your proxy, then it won't be able to use it. Moreover, using a proxy is the first thing that you should have mentioned when I asked about your network topology in order to root the problem. You should declare: HTTP_PROXY_AUTH and HTTP_PROXY accordingly for it to work. Look at [this link](view-source:forums.freebsd.org/threads/43360) for more info. If it's fixed after declaring them correctly, please tell me and I will update my answer. In that case, you should also update your question in order for the reader to know it's a proxy thing.
  • Nan Xiao
    Nan Xiao over 7 years
    Thanks very much for your time. I am very sorry for not telling proxy case. Since I only use GoAgent to scan Internet content, and not realize it may impact the FreeBSD on VM. I have reboot the host and not use proxy this time, but "freebsd-update" command still fail, and the error code is the same as I have posted (302 Redirection). So Is there any other clues? Thx in advance!
  • mamalos
    mamalos over 7 years
    Can you fetch the files from within the FreeBSD VM? Can you wget them on the host machine when no proxy is enabled? Please provide the output of # ifconfig -a and # netstat -rn (and maybe /etc/resolv.conf) on both of your machines (host, VM). Moreover, the proxy issue I mentioned in my previous comment is not FreeBSD specific. If you host is allowed access only via a proxy server, then all your VM's need to be configured accordingly.
  • Nan Xiao
    Nan Xiao over 7 years
    I add "Update4" on OP. BTW, since my host is WIndows, and the system language is Chinese, do I need to provide network configuration on host? Thx!
  • mamalos
    mamalos over 7 years
    OK, since you were able to wget the files, I cannot understand the root of your problem. I'd suggest you started a thread on forums.freebsd.org providing all this information, where there are lots of people that are willing to help you, because this comment process of superuser is not ideal for troubleshooting :). Before doing so, did you try fetch? Because that's what freebsd-update is using.
  • Nan Xiao
    Nan Xiao over 7 years
    fetch still works successfully. Any way, thanks very much for your kind help and time!!