Solved Portsnap snapshot is corrupt

Recently I have been having issues with updating ports tree with portsnap on FreeBSD 10.3. The common issue I run into is when executing #portsnap fetch update we receive a
Code:
metadata is corrupt
Simply running #portsnap fetch update again seems to resolve this issue. Today, however, I ran into the issue of snapshot is corrupt.
# portsnap fetch update
Code:
Looking up portsnap.FreeBSD.org mirrors... 7 mirrors found.
Fetching snapshot tag from your-org.portsnap.freebsd.org... done.
Fetching snapshot metadata... done.
Updating from Tue Sep 20 04:22:54 CDT 2016 to Mon Oct 10 14:04:19 CDT 2016.
Fetching 0 metadata patches. done.
Applying metadata patches... done.
Fetching 0 metadata files... done.
Fetching 20 patches.
(20/20) 100.00%  done.
done.
Applying patches...
  Skipping d76e83fb499b0a7af388e77a0e4e7ce9bd47baa7ad9f11805059e0a7c851221e-1d13d1476d72147d0e2bfd6406f8800dbb9d8301932e
Skipping 6b9f6219a162c96818a81e40973732788e8b8ee0b90c758b5c6b0c84629be2c9-d677df7fe3541dceee15afd8ef41d5aac43b06a363af
Skipping 333f616611a2d2a04af98ecaf82311308e50dcf0e26414b38a31771f2714cbb8-5866f0e0315e3882865aa4ceb61589743a31e6a38704
Skipping f13347b329b05bb264b6bcc8f5765ae49c995bb7fbc83c43480d4c10ee55a312-f5cdd29366301c803f8569b70c99da8e6e989abc9a42
Skipping 9403db2c3e20678f3258884a402d33721ce6b53f824b2c2a90e00a493d324a58-f3c6791c9665063031870c20bfaa6a4165ac02a9e317
Skipping a390234910c2b7753c247db9ac436fd56e281c7f580c5ea7c2aa3a2938107bf4-6b63fffe465056ddb104c61e4863620831b38e405a9c
Skipping b97fd9cbba98b665e30cda4994648283804c0bfe333ba6c9c08b05a9b87c0ae5-efae62888f99c084af0c78bfb3553953527887ee3344
Skipping e637d726b856ef5553eb9d9f7d01f3bbce9dab54408df9d90d6413100a092023-e51a12fd46af85eed25dba6192ad96a1b03b615ff222
Skipping 47ddf96bc1d0cfa232ed4e0ad5336aabba57760844e23a71efff2ec89e7d6d21-870034425fa3ef2fdb58c6231e0753eabce044a01701
Skipping 692f22c9b904a37848b52e6d4e218a9fc2a2b99dc2be03086ad7b0fe0b04d8f1-c9d014250f4df75152a82e657a1fa08ed9a17a5a3756
Skipping cd1eccdb2088dcbdf07bb10ab40eec09d537545e5ff138d04ff47b14661b5d8a-f9045bfa0d76bad3dee7713f8ef8185af8f2319aa2c9
Skipping 5971ac7cea1a55f513f0422be96ee29a39c56b6e0098ea2a281c4f3b3b6e91cc-e26a1ffb6a660653d5d1aa162b78c50f95ae803e5b75
Skipping 556394634e12d7fa33706c0905ad592d11c7581cd08e3e17e70358575a1bbc61-e25b4865ffe0089c8acd035745befcc76b571bef57cd
Skipping 6df1e454a27cb4adaa854e745bbb4669f557f1aa996dc4146236c6f4fffa7684-9fa2dd9a3515f51d853b67b36aa339b751986fe963e8
Skipping cb7e32149e9702c29aa8ffa479d128adc0fccb8aad1b0bae7926220c886c01a3-b812552caac00b5186e1905f770596e1fed7fefd2694
Skipping d17b1d052bae39d831b29f62dd6da77293516c5e1070f1429375617ccce78836-71ea3def48dce3a4a97ac9655ae40d70c4608089a3b8
Skipping 570958bb2935cd4b3a1c1a437e0f60ff9a17c9ae4296b8700ba3211cc3d3d048-b5d35ef7fc627e1f30558a48f45067606d6b321151e0
Skipping cdd35fdf855e61e7e8c3e8b78536e26252ed4088da67e706a328ff43ee7fd995-a37c6e1bbac0d6c2eb9130a17afb67ac8a18a2cc57da
Skipping dbb676cd28fdb5694ca8085c7ece31d91724471ab36c72636ad0100e5eb10625-98900d1540eaebb548a646796e911aca7f2d23cea17a
Skipping a0f90d17b7fd174b4da784c14a8ce5a6a0603dea2b7fb826e02a8875913e6bc7-3124f131f774439854b90e386e11b33ba5f9102c4648done.82ccb3cfcfb19bb (20 of       20 patchlist).
Fetching 20 new ports or files... /usr/sbin/portsnap: cannot open 1d13d1476d72147d0e2bfd6406f8800dbb9d8301932e54ed1f052d57cd81a0a7.gz: No such file or directory
snapshot is corrupt.
After attempting multiple fixes, we were finally able to get portsnap working again by

#rm -rf /var/db/portsnap/*

then changing the /etc/portsnap.conf to look at a server in the southeast
Code:
# $FreeBSD: releng/10.3/etc/portsnap.conf 286384 2015-08-06 19:45:25Z delphij $

# 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=portsnap.FreeBSD.org
SERVERNAME=ec2-ap-southeast-2.portsnap.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-9 DESCRIBE.9
INDEX INDEX-10 DESCRIBE.10

Next we run
#portsnap fetch and #portsnap extract again and it rebuilds the ports tree successfully.

I then switched back to the default server in /etc/portsnap.conf and get this message when running #portsnap fetch update
Code:
# portsnap fetch update
Looking up portsnap.FreeBSD.org mirrors... 7 mirrors found.
Fetching snapshot tag from your-org.portsnap.freebsd.org... done.
Latest snapshot on server is older than what we already have!
Cowardly refusing to downgrade from Wed Oct 12 11:50:08 CDT 2016
to Mon Oct 10 14:04:19 CDT 2016.
I am having this issue on multiple virtual machines and while i seem to have found a workaround, my questions are:
Why is this happening?
Is this an issue on my end?
Is there a way to permanently fix the issue?

Thanks in advance!
 
Code:
# portsnap fetch update
Looking up portsnap.FreeBSD.org mirrors... 7 mirrors found.
Fetching snapshot tag from your-org.portsnap.freebsd.org... done.
Latest snapshot on server is older than what we already have!
Cowardly refusing to downgrade from Wed Oct 12 11:50:08 CDT 2016
to Mon Oct 10 14:04:19 CDT 2016.
I am having this issue on multiple virtual machines and while i seem to have found a workaround, my questions are:
Why is this happening?
Is this an issue on my end?
Is there a way to permanently fix the issue?

Thanks in advance!

I'm seeing the same issue w/that particular mirror (your-org). It was indicating a snapshot from 10/9 when I tried fetching from it this morning, then was showing the same snapshot you see when I tried a bit ago:

Code:
refusing to downgrade from Wed Oct 12 09:37:28 MDT 2016
to Mon Oct 10 13:04:19 MDT 2016.
 
And I have the problem to on FreeBSD 10.3-RELEASE:
Code:
portsnap fetch update
Looking up portsnap.FreeBSD.org mirrors... 6 mirrors found.
Fetching snapshot tag from your-org.portsnap.freebsd.org... done.
Fetching snapshot metadata... done.
Updating from Sun Oct  9 06:20:05 EDT 2016 to Mon Oct 10 15:04:19 EDT 2016.
Fetching 0 metadata patches. done.
Applying metadata patches... done.
Fetching 0 metadata files... done.
Fetching 3 patches.
(3/3) 100.00%  done.                            
done.
Applying patches...
  Skipping 1806018225546259f5a9b9d60a70e89e6b3c98e37fddb2a851d7d8d73671db72-efae62888f99c084af0c78bfb3553953527887ee3344add64eb723179d7cea37 (1 of        3 patc  Skipping 98bb23a5c281b23a8de7849749ca1d9172a0eefe7d06438c9304966636a270a2-e26a1ffb6a660653d5d1aa162b78c50f95ae803e5b7534b047285062a47b045b (2 of        3 patc  Skipping e0084381d440d4a150ea6eda1286595f0c6843bd09e895de8abeb1e969e4f5f9-b812552caac00b5186e1905f770596e1fed7fefd2694c2e3b2927a15a967499c (3 of        3 patcdone.).
Fetching 3 new ports or files... /usr/sbin/portsnap: cannot open efae62888f99c084af0c78bfb3553953527887ee3344add64eb723179d7cea37.gz: No such file or directory
snapshot is corrupt.

Yesterday, portsnap didn't work.
 
The snapshot metadata corruption is most likely an out of sync mirror, the security/errata fixes can't do anything about that.
 
Adding a "me too" to this one.

Yesterday freebsd-update was also failing and mysteriously started working again today, so it does seem like a mirror problem. Maybe something is out of whack or overburdened due to the new 11.0 release?
 
I'm using 10.2, same error as well.

I've used server ec2-ap-southeast-2.portsnap.freebsd.org as Remington recommended and portsnap works like a charm.

Thank you.
 
Back
Top