You are on page 1of 6

[Solved] metadata corrupt ?!

[Archive] - The FreeBSD Forums

The FreeBSD Forums > Ports & Packages > Installation and Maintenance of FreeBSD Ports or Packages > [Solved] metadata
corrupt ?!
PDA

View Full Version : [Solved] metadata corrupt ?!


nORKy

December 9th, 2008, 09:31

Hi,
I don't known what to do with this error :
# portsnap fetch update && portversion -l "<"
Looking up portsnap.FreeBSD.org mirrors... 3 mirrors found.
Fetching snapshot tag from portsnap1.freebsd.org... done.
Fetching snapshot metadata... done.
Updating from Mon Dec 8 14:40:05 CET 2008 to Tue Dec 9 07:14:40 CET 2008.
Fetching 3 metadata patches.. done.
Applying metadata patches... done.
Fetching 3 metadata files... /usr/sbin/portsnap: cannot open ca3d1528c2ecc4e2241979fac3ee3ce28ea68f9db12150f8ad
3457929e69242d.gz: No such file or directory
metadata is corrupt.
Thanks for your help
artificer

December 9th, 2008, 10:08

Try deleting the /var/db/portsnap directory and running "portsnap fetch" again.
nORKy

December 9th, 2008, 10:10

Thanks you, it works.


# rm -Rf /var/db/portsnap/
pc-Joff# portsnap fetch update && portversion -l "<"
portsnap: Directory does not exist or is not writable: /var/db/portsnap
# mkdir /var/db/portsnap
# portsnap fetch update && portversion -l "<"
Looking up portsnap.FreeBSD.org mirrors... 3 mirrors found.
Fetching public key from portsnap2.freebsd.org... done.
Fetching snapshot tag from portsnap2.freebsd.org... done.
Fetching snapshot metadata... done.
Fetching snapshot generated at Tue Dec 9 01:43:15 CET 2008:
7a804d0d777e4786b5a895af34dfa476ff2eeb821d942c 8% of 54 MB 217 kBps 03m55s
nabsta

January 5th, 2009, 21:45

I have the same issue, tried it with 4 different servers , same error. It still is amazing why this happened not to just one but 4
of my servers.
Anyways, deleting /var/db/portsnap and repopulating the ports tree helps.
thanks
ale

January 5th, 2009, 23:03

I had some fun with some messages.


robertclemens
I have yet to resolve the problem.
[root@abyss /var/db]# rm -rf portsnap
[root@abyss /var/db]# mkdir portsnap
[root@abyss /var/db]# portsnap fetch
Looking up portsnap.FreeBSD.org mirrors... 2 mirrors found.
Fetching public key from portsnap1.FreeBSD.org... done.

http://forums.freebsd.org/archive/index.php/t-901.html[15/12/2012 10:05:57 ]

January 5th, 2009, 23:19

[Solved] metadata corrupt ?! [Archive] - The FreeBSD Forums


Fetching snapshot tag from portsnap1.FreeBSD.org... done.
Fetching snapshot metadata... done.
Fetching snapshot generated at Sun Jan 4 19:38:12 EST 2009:
916e4693ea4689b7598778ef6358f1c2705c84aeaf4a79100% of 55 MB 713 kBps 00m00s
Extracting snapshot... done.
Verifying snapshot integrity... done.
Fetching snapshot tag from portsnap1.FreeBSD.org... done.
Fetching snapshot metadata... fetch: http://portsnap1.FreeBSD.org/t/ef1df878b5fba73256d50b9944b5fb8ee1e9d376fec917a60e
52af5e02a861b7: Not Found
sha256: ef1df878b5fba73256d50b9944b5fb8ee1e9d376fec917a60e 52af5e02a861b7: No such file or directory
[: !=: unexpected operator
mv: rename ef1df878b5fba73256d50b9944b5fb8ee1e9d376fec917a60e 52af5e02a861b7 to tINDEX.new: No such file or
directory
done.
grep: tINDEX.new: No such file or directory
look: tINDEX.new: No such file or directory
Portsnap metadata appears bogus.
Cowardly refusing to proceed any further.
[root@abyss /var/db]#
ale

January 6th, 2009, 00:06

# portsnap fetch
Looking up portsnap.FreeBSD.org mirrors... 2 mirrors 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 Sun Jan 4 19:38:12 EST 2009:
916e4693ea4689b7598778ef6358f1c2705c84aeaf4a79100% of 55 MB 713 kBps 00m00s
Extracting snapshot... done.
Verifying snapshot integrity... done.
Fetching snapshot tag from portsnap1.FreeBSD.org... done.
Fetching snapshot metadata... fetch: http://portsnap1.FreeBSD.org/t/ef1df878b5fba73256d50b9944b5fb8ee1e9d376fec917a60e
52af5e02a861b7: Not Found
sha256: ef1df878b5fba73256d50b9944b5fb8ee1e9d376fec917a60e 52af5e02a861b7: No such file or directory
[: !=: unexpected operator
mv: rename ef1df878b5fba73256d50b9944b5fb8ee1e9d376fec917a60e 52af5e02a861b7 to tINDEX.new: No such file or
directory
done.
grep: tINDEX.new: No such file or directory
look: tINDEX.new: No such file or directory
Portsnap metadata appears bogus.
Cowardly refusing to proceed any further.That's what is was talking about ;)
EDIT:
I run portsnap several times per day and this is the first error message I've gotCowardly refusing to downgrade from Mon Jan 5
18:36:54 CET 2009 to Mon Jan 5 14:06:34 CET 2009.
So I updated my clock with ntpdate and I got 5 Jan 20:39:17 ntpdate[62802]: step time server 193.204.114.105 offset
812.242543 secSo it was 812 secs behind!
Very strange!
ale

January 6th, 2009, 00:32

It should work now.


eujedi

January 6th, 2009, 15:54

I have the very same error with tINDEX.new: No such file or directory. I have updated my time and still it gives the same
output. What should i do?
DutchDaemon

January 6th, 2009, 15:56

Had this on three different servers today. It must be a problem with the portsnap mirrors. In one instance, deleting
/var/db/portsnap and running portsnap fetch extract worked, but only after two tries (the first fetch extract produced the same
error).
ale

http://forums.freebsd.org/archive/index.php/t-901.html[15/12/2012 10:05:57 ]

January 6th, 2009, 16:00

[Solved] metadata corrupt ?! [Archive] - The FreeBSD Forums


After my previous post I had no more errors.
I've always used portsnap3.freebsd.org since then.
DutchDaemon

January 6th, 2009, 16:11

Maybe a side-effect of 7.1-RELEASE (end of ports freeze, loads of updates today).


eujedi

January 6th, 2009, 16:15

My bad! I deleted the /var/db/portsnap and it all magically happened ok!


Sorry for the screaming
DutchDaemon

January 6th, 2009, 16:18

It's not your bad. It's obviously a problem @FreeBSD. Or it was, it seems.
tangram

January 6th, 2009, 17:25

There's some talk on the mailing list about sub-par performance on portsnap servers because of the new 7.1.
It's just a matter of updating in a couple of days.
gammamatrix

January 6th, 2009, 18:05

I am unable to get my jails to fetch ports without failing.


The jail host server will fetch without any problems.
Here is the jail error:
portsnap fetch
Looking up portsnap.FreeBSD.org mirrors... 2 mirrors found.
Fetching snapshot tag from portsnap1.FreeBSD.org... done.
Fetching snapshot metadata... done.
Updating from Tue Dec 30 23:14:16 UTC 2008 to Tue Jan 6 15:30:58 UTC 2009.
Fetching 3 metadata patches. done.
Applying metadata patches... done.
Fetching 3 metadata files... /usr/sbin/portsnap: cannot open 7384b82098e057ca3c7de84565209471909d35edfac4d3d3d0
7368430f9dfe44.gz: No such file or directory
metadata is corrupt.
Portsnap is not downloading files into:
/var/db/portsnap/files/
Deleting the contents of the directory /var/db/portsnap does not solve the problem.
I have had this problem for months, if not longer. My workaround is to copy the files from the host to the jail. I may just mount
the directory to be shared as I do for distfiles.
I have had this problem on 6.X to 7.X. I do not know how long ago it stopped working.
Anybody have any ideas?
tangram
I am unable to get my jails to fetch ports without failing.
The jail host server will fetch without any problems.
Here is the jail error:
portsnap fetch
Looking up portsnap.FreeBSD.org mirrors... 2 mirrors found.
Fetching snapshot tag from portsnap1.FreeBSD.org... done.
Fetching snapshot metadata... done.
Updating from Tue Dec 30 23:14:16 UTC 2008 to Tue Jan 6 15:30:58 UTC 2009.
Fetching 3 metadata patches. done.

http://forums.freebsd.org/archive/index.php/t-901.html[15/12/2012 10:05:57 ]

January 6th, 2009, 18:23

[Solved] metadata corrupt ?! [Archive] - The FreeBSD Forums


Applying metadata patches... done.
Fetching 3 metadata files... /usr/sbin/portsnap: cannot open 7384b82098e057ca3c7de84565209471909d35edfac4d3d3d0
7368430f9dfe44.gz: No such file or directory
metadata is corrupt.
Portsnap is not downloading files into:
/var/db/portsnap/files/
Deleting the contents of the directory /var/db/portsnap does not solve the problem.
I have had this problem for months, if not longer. My workaround is to copy the files from the host to the jail. I may just mount
the directory to be shared as I do for distfiles.
I have had this problem on 6.X to 7.X. I do not know how long ago it stopped working.
Anybody have any ideas?
Just wait it out. I had same problem last night and a couple hours ago it worked fine again.
Just run
# freebsd-update upgrade -r 7.1-RELEASE
And follow the steps on the annoucement, http://www.freebsd.org/releases/7.1R/announce.html.
Regarding where freebsd-update places its files... freebsd-update defaults to /var/db/freebsd-update but you can specify
another directory through the -d flag. Take a look here for more info, http://linux-bsd-sharing.blogspot.com/2008/12/tipupdating-freebsd-with-freebsd.html.
kamikaze

January 6th, 2009, 18:50

There's been a mail on stable saying that this is due to the strong traffic because of the 7.1 release (mirrors have trouble
synchronizing).
It will get better again by itself and a new mirror will be available, soon.
graudeejs

January 6th, 2009, 20:37

portsnap -I fetch
resoved my problems
gammamatrix

January 6th, 2009, 20:56

Just wait it out. I had same problem last night and a couple hours ago it worked fine again.
This does not have to do with 7.1. This is broken for me in 6.2 and 6.3 for several months.
Portsnap works on the server holding the jails, but not inside the jails.
gammamatrix

January 6th, 2009, 21:03

This does not have to do with 7.1. This is broken for me in 6.2 and 6.3 for several months.
Portsnap works on the server holding the jails, but not inside the jails.
To restate myself:
Portsnap is broken for me in jails for 6.2, 6.3, 7.0 and 7.1.
This problem has been around for me for quite some time.
francisloco
how i fix this?
i add to /etc/services
http 80/tcp www www-http # WorldWideWeb HTTP
http 80/udp www www-http # HyperText Transfer Protocol
https 443/tcp # MCom

http://forums.freebsd.org/archive/index.php/t-901.html[15/12/2012 10:05:57 ]

April 6th, 2010, 16:40

[Solved] metadata corrupt ?! [Archive] - The FreeBSD Forums


https 443/udp # MCom
gss-http 488/tcp
gss-http 488/udp
http-alt 8008/tcp
http-alt 8008/udp
http-mgmt 280/tcp # http-mgmt
http-mgmt 280/udp # http-mgmt
http-rpc-epmap 593/tcp # HTTP RPC Ep Map
http-rpc-epmap 593/udp # HTTP RPC Ep Map
then portsnap work again, cuz removing the /var/db/portsnap, the problem back again.
SirDice

April 6th, 2010, 16:49

To restate myself:
Portsnap is broken for me in jails for 6.2, 6.3, 7.0 and 7.1.
All versions of FreeBSD use the same ports tree.
Great, now I've replied to a year old post x(
SirDice

April 6th, 2010, 16:52

i add to /etc/services
Those entries should already be there.
then portsnap work again,
Coincidence.
francisloco

April 7th, 2010, 10:56

i havent these lines, so when i add it this work again.


i post it, for someone searching on the same problem, then he can try the fix.
francisloco

August 26th, 2010, 22:31

okey, i saw somepost with problem portsnaping inside of jail


i fix this
editing
/etc/make.conf
adding
PORTSDIR=/var/ports
with my /etc/make.conf as:
WRKDIRPREFIX= /var/ports
DISTDIR= /var/ports/distfiles
PACKAGES= /var/ports/packages
INDEXDIR= /var/ports
sorry 4 bump. But searching for my problem, i fix for myself, and how not see reply for the jail portsnap, i put it for someone
in futher problem.
graudeejs

August 26th, 2010, 22:42

Why the hell did you set PORTSDIR ?


francisloco

August 30th, 2010, 13:34

cuz im in ezjail.
kriscom

http://forums.freebsd.org/archive/index.php/t-901.html[15/12/2012 10:05:57 ]

October 20th, 2011, 19:20

[Solved] metadata corrupt ?! [Archive] - The FreeBSD Forums


I try to portsnap fetch FreeBSD 7.4 for several days now and I get always error at metadata files ... "cannot open... no such file
or directory... metadata is corrupt"
I do always delete /var/db/portsnap, and as I have noticed, the hash for the missing file is not always the same.
Any ideas?
Bombardier

December 15th, 2011, 01:10

Hi all. I also give error


mamuka# portsnap fetch
Looking up portsnap.FreeBSD.org mirrors... none found.
Fetching snapshot tag from portsnap.FreeBSD.org... done.
Fetching snapshot metadata... done.
Updating from Wed Dec 14 11:03:14 PETT 2011 to Thu Dec 15 10:16:49 PETT 2011.
Fetching 4 metadata patches. done.
Applying metadata patches... done.
Fetching 4 metadata files... /usr/sbin/portsnap: cannot open 18ecdb55c6c56d64bef878dad4732c82c290ec1188c0c26226
9a4b24e0df8268.gz: No such file or directory
metadata is corrupt.
There are multiple reason for this problem. Many people advice to remove /var/db/portsnap directory, but this is not decision, if
you are using proxy. In my case, I've got this error when run portsnap via proxy. And I find solution on
http://forum.sysadmins.su/index.php?showtopic=20449. The problem will occur if you set http_proxy variable instead of setting
both HTTP_PROXY and HTTP_PROXY_AUTH. You could see it with run
portsnap --debug fetch
this is place with error
Applying metadata patches... done.
Fetching 4 metadata files...
/usr/libexec/phttpget portsnap.FreeBSD.org f/18ecdb55c6c56d64bef878dad4732c82c290ec1188c0c26226 9a4b24e0df8268.gz
f/bbe749ca16b778d8be945f3e7bfc4f18017bb76cd5fe1d53e4 def53dcac239a5dff0679bcce77c24abc7746fa0d9c1643c8. gz
f/ee040d95aadd43543ea8cc011f48597e8382e437987a8d168b e03ca41ab2589f.gz
phttpget: host = hz, port = strongpassword@192.168.1.25:3128: servname not supported for ai_socktype
/usr/sbin/portsnap: cannot open 18ecdb55c6c56d64bef878dad4732c82c290ec1188c0c26226 9a4b24e0df8268.gz: No such file or
directory
metadata is corrupt.

and in the part of source code of phttpget


env_HTTP_PROXY = getenv("HTTP_PROXY");
if (env_HTTP_PROXY == NULL)
env_HTTP_PROXY = getenv("http_proxy");
if (env_HTTP_PROXY != NULL) {
if (strncmp(env_HTTP_PROXY, "http://", 7) == 0)
env_HTTP_PROXY += 7;
p = strchr(env_HTTP_PROXY, '/');
if (p != NULL)
*p = 0;
p = strchr(env_HTTP_PROXY, ':');
if (p != NULL) {
*p = 0;
proxyport = p + 1;
} else
proxyport = "3128";
}
sorry for my english and big thanx to Drunky from forum.sysadmins.su
vBulletin v3.8.7, Copyright 2000-2012, vBulletin Solutions, Inc.

http://forums.freebsd.org/archive/index.php/t-901.html[15/12/2012 10:05:57 ]

You might also like