# portsnap fetch Failed



## Temp (Nov 19, 2009)

Hello,

i recently install Freebsd 7.2-RELEASE-p3 FreeBSD 7.2-RELEASE-p3 amd64 and when i try to get the ports for the first time (with portsnap fetch) i have the following error:

```
Looking up portsnap1.FreeBSD.org mirrors... none found.
Fetching public key from portsnap1.FreeBSD.org... done.
Fetching snapshot tag from portsnap1.FreeBSD.org... done.
Fetching snapshot metadata... done.
Fetching snapshot generated at Thu Nov 19 00:41:40 UTC 2009:
e45102e91972b9831174388e7cbe0bd5893bbc15ebd950100% of   59 MB  128 kBps 00m00s
Extracting snapshot... done.
Verifying snapshot integrity... done.
Fetching snapshot tag from portsnap1.FreeBSD.org... done.
Fetching snapshot metadata... done.
Updating from Thu Nov 19 00:41:40 UTC 2009 to Thu Nov 19 16:09:42 UTC 2009.
Fetching 4 metadata patches. done.
Applying metadata patches... done.
Fetching 4 metadata files... /usr/sbin/portsnap: cannot open 58c478f4203c41581f9167f10589827bbd3d4d0e680cd244b20b1ffd8b23531b.gz: No such file or directory
metadata is corrupt.
```

I look some topics about the problem.
So i try :

```
rm -Rf /var/db/portsnap/
mkdir /var/db/portsnap
portsnap fetch
```
but it fails again.
I tried to change the server portsnap3.FreeBSD.org and it change nothing.

How fix to the error?
Install i386 version will change something or not?

Thanks you.

Bye.


----------



## graudeejs (Nov 19, 2009)

today eu mirror pool seamed much slower compared to other days.
Perhaps servers are having problems.

try in few hours (or in few days) perhaps


----------



## ohauer (Nov 19, 2009)

a quick grep shows the file is for FreeBSD6

```
# grep 58c478f4203c41581f9167f10589827bbd3d4d0e680cd244b *
Binary file files matches
tINDEX:DESCRIBE.6|58c478f4203c41581f9167f10589827bbd3d4d0e680cd244b20b1ffd8b23531b
```

Please try the following.
edit file /etc/portsnap.conf, make portsnap ignore INDEX entries for older systems

```
# List of INDEX files to build and the DESCRIBE file to use for each
#INDEX INDEX-5 DESCRIBE.5
#INDEX INDEX-6 DESCRIBE.6
INDEX INDEX-7 DESCRIBE.7
```

Then try again.


----------



## Temp (Nov 19, 2009)

ohauer said:
			
		

> Please try the following.
> edit file /etc/portsnap.conf, make portsnap ignore INDEX entries for older systems
> 
> ```
> ...



Its doesnt work:


```
portsnap fetch
Looking up portsnap1.FreeBSD.org mirrors... none found.
Fetching public key from portsnap1.FreeBSD.org... done.
Fetching snapshot tag from portsnap1.FreeBSD.org... done.
Fetching snapshot metadata... done.
Fetching snapshot generated at Thu Nov 19 00:41:40 UTC 2009:
e45102e91972b9831174388e7cbe0bd5893bbc15ebd950100% of   59 MB  455 kBps 00m00s
Extracting snapshot... done.
Verifying snapshot integrity... done.
Fetching snapshot tag from portsnap1.FreeBSD.org... done.
Fetching snapshot metadata... done.
Updating from Thu Nov 19 00:41:40 UTC 2009 to Thu Nov 19 16:46:10 UTC 2009.
Fetching 4 metadata patches. done.
Applying metadata patches... done.
Fetching 4 metadata files... /usr/sbin/portsnap: cannot open cd8dc095b0d9da5bb79b456162e3a27f298bd299e6e225834ad2db92300b448c.gz: No such file or directory
metadata is corrupt.
```

My /etc/portsnap.conf


```
# $FreeBSD: src/etc/portsnap.conf,v 1.3.2.1.4.1 2009/04/15 03:14:26 kensmith Exp $

# Default directory where compressed snapshots are stored.
# WORKDIR=/var/db/portsnap

# Default location of the ports tree (target for "update" and "extract").
# PORTSDIR=/usr/ports

# Server or server pool from which to fetch updates.  You can change
# this to point at a specific server if you want, but in most cases
# using a "nearby" server won't provide a measurable improvement in
# performance.
SERVERNAME=portsnap1.FreeBSD.org

# Trusted keyprint.  Changing this is a Bad Idea unless you've received
# a PGP-signed email from <security-officer@FreeBSD.org> telling you to
# change it and explaining why.
KEYPRINT=9b5feee6d69f170e3dd0a2c8e469ddbd64f13f978f2f3aede40c98633216c330

# Example of ignoring parts of the ports tree.  If you know that you
# absolutely will not need certain parts of the tree, this will save
# some bandwidth and disk space.  See the manual page for more details.
#
# WARNING: Working with an incomplete ports tree is not supported and
# can cause problems due to missing dependencies.  If you have REFUSE
# directives and experience problems, remove them and update your tree
# before asking for help on the mailing lists.
#
# REFUSE arabic chinese french german hebrew hungarian japanese
# REFUSE korean polish portuguese russian ukrainian vietnamese

# List of INDEX files to build and the DESCRIBE file to use for each
#INDEX INDEX-5 DESCRIBE.5
#INDEX INDEX-6 DESCRIBE.6
INDEX INDEX-7 DESCRIBE.7
```

Thanks.


----------



## Temp (Nov 27, 2009)

I wait some days but i get the same error.
Im behind a proxy but i have set the env http_proxy.

Someone get an idea to help me?

May be in I386 it can work?

Thanks.


----------



## ohauer (Nov 29, 2009)

> I wait some days but i get the same error.
> Im behind a proxy but i have set the env http_proxy.
> 
> Someone get an idea to help me?
> ...



It smells you have a problem with the proxy, switching to i386 will nothing change, since this are the same files.

If you are behind a squid inspect the logs there and use squid-client to force a new download of the corrupt file(s).

There is *no need* to delete the whole files in /var/db/portsnap/files only those which reported corrupt.

Do you have the change to fetch without a proxy between?


----------



## Temp (Dec 6, 2009)

Hello,

its finnaly succed, but it's really stange.
I made:
portsnap fetch
Previous error message
portsnap extract
fail
portsnap update
fail
portsnap extract
And this time he succeed.

It download all the ports


----------



## ohauer (Dec 6, 2009)

indeed strange,

maybe you can report your founding in a PR?


----------



## DutchDaemon (Dec 6, 2009)

`portsnap extract` doesn't _update_ your ports tree, it just _uncompresses and reinstalls_ your existing ports tree. Without the 'fetch' part, portsnap does not download newer versions.


----------



## xequals13 (Feb 12, 2013)

*My solution*

Problem: when running [cmd=]portsnap extract[/cmd] I get the following error

```
Building new INDEX files... gunzip: can't stat: /var/db/portsnap/files/6c2aa14deb118a9043d72fb1bb9727b23116a7ad5dc49d8f80a48d6358b1c561.gz: No such file or directory
done.
```

Solution:

```
rm -rf /var/db/portsnap/files
portsnap fetch
portsdb -Uu
```

System: 

```
FreeBSD gamma 9.1-STABLE FreeBSD 9.1-STABLE #3: Thu Feb  7 13:34:21 EST 2013
```


----------

