# freebsd-update fetch fails



## AchillesHeald (Jul 25, 2013)

Hello everyone, thanks for looking at this thread.

Context: I am trying to update my system via freebsd-update and it fails.  I am connected through a proxy, and have set the associated environment variables (HTTP_PROXY, http_proxy, FTP_PROXY, etc.) and I've gotten through to install X11 and GNOME, so I don't think that's the problem.

`uname -a` reads:

```
FreeBSD 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012
[email]root@farrell.cse.buffalo.edu[/email]:/usr/obj/usr/src/sys/GENERC amd64
```

When I type the command `freebsd-update fetch` I get returned:

```
Looking up update.FreeBSD.org mirrors... 4 mirrors found
Fetching metadata signature for 9.1-RELEASE from update4.freebsd.org... done
Fetching metadata index... done
Fetching 2 metadata files... failed
```

The fetch command also returns an error when I do `portsnap fetch` as it says that /usr/sbin/portsnap cannot open/file or directory is corrupt.

I'm not sure if they are related, but seemed pertinent to add to the discussion.

Thanks in advance


----------



## ShelLuser (Jul 25, 2013)

AchillesHeald said:
			
		

> When I type the command `freebsd-update fetch` I get returned:
> 
> ```
> Looking up update.FreeBSD.org mirrors... 4 mirrors found
> ...


This definitely seems to be a local issue on your end, because I can't reproduce any errors occurring with update4.freebsd.org, as can be seen here:


```
root@smtp2:/var/log # freebsd-update -s update4.freebsd.org fetch
Looking up update4.freebsd.org mirrors... none found.
Fetching metadata signature for 9.1-RELEASE from update4.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.
```
Still, you could make sure by using the -s parameter as shown above and use, for example, update3.freebsd.org instead. Though I don't think it'll make a difference.



			
				AchillesHeald said:
			
		

> The fetch command also returns an error when I do `portsnap fetch` as it says that /usr/sbin/portsnap cannot open/file or directory is corrupt.


Could you paste the full output which you get when using this command?

As said, it seems to be something local on your end, but there isn't enough information to draw specific conclusions.

What happens if you try to access one of those update servers using a browser like lynx?


----------



## AchillesHeald (Jul 26, 2013)

Thank you for the reply.  It may be localized due to the proxy, but I have the problem on both this system and on a VM.  I've seen snippets of conversations saying that `freebsd-update` and Portsnap use PHTTP, and that they try to download updates from the proxy server once `http_proxy` is set.  Unfortunately, I haven't been able to dig out much more information than that so far.  

The full output when using `portsnap fetch` is:

```
# portsnap fetch
Fetching snapshot tag form your-org.portsnap.freebsd.org... done
Fetching snapshot metadata... done
Updating from Mon Jul 22 20:07:43 EDT 2013 to Fri Jul 26 07:24:01 EDT 2013
Fetching 3 metadata patches. done.
Applying metadata patches... done
Fetching 3 metadata files... /usr/sbin/portsnap:  cannot open e77e393c05cfe9f65e23d45b3321291a46850d1105f22a625da84cc3eec29a9a.gz: No such file or directory
metadata is corrupt.
```

I just got in, and will try accessing the update servers with a browser.

Thanks


----------

