# portsnap truncated gzip input error



## Paul-LKW (Jul 25, 2019)

Hi Guys:
Just today I got

```
# portsnap fetch extract
Looking up portsnap.FreeBSD.org mirrors... 6 mirrors found.
Fetching snapshot tag from ec2-ap-southeast-2.portsnap.freebsd.org... done.
Fetching snapshot metadata... done.
Fetching snapshot generated at Thu Jul 25 08:24:02 HKT 2019:
fetch: [URL]http://ec2-ap-southeast-2.portsnap.freebsd.org/s/2bc06447ea51a375ac48351efe6e1af0397586f957ea9f93fab0e34cd0306bcc.tgz[/URL]: size of remote file is not known
2bc06447ea51a375ac48351efe6e1af0397586f957ea9f        5868 kB  420 kBps    14s
Extracting snapshot... snap/31533630a778efdeda1177721fd3c5f224842f7b80e6b36f58bf174773b0f0ce.gz: truncated gzip input
tar: Error exit delayed from previous errors.
```
I tried to remove /var/db/portsnap/* and still not work.
Any thing could do to fix this ?


----------



## SirDice (Jul 25, 2019)

Just got another question: https://forums.freebsd.org/threads/is-latest-portsnap-snapshot-corrupted.71620

I just did a `portsnap fetch extract` on a test system and it just worked. But I'm getting it from a European mirror, common denominator with both problem posts is ec2-ap-southeast-2.portsnap.freebsd.org. So I'm starting to suspect an issue with this mirror.


----------



## Paul-LKW (Jul 25, 2019)

If so, how can I change to use another mirror instead of this problem one ?
Also how do I know which one URL acting as the portsnap mirror ?


----------



## KezKanKrayon (Jul 26, 2019)

I encountered the same issue with the same mirror ec2-ap-southeast-2.portsnap.freebsd.org. Though, it does appear to now be working. If this happens again, where can one find a list of available mirrors?


----------



## cpm@ (Jul 26, 2019)

KezKanKrayon said:


> I encountered the same issue with the same mirror ec2-ap-southeast-2.portsnap.freebsd.org. Though, it does appear to now be working. If this happens again, where can one find a list of available mirrors?



Use dig(1) or host(1) to list portsnap mirrors

```
% dig -t srv _http._tcp.portsnap.freebsd.org

; <<>> DiG 9.14.4 <<>> -t srv _http._tcp.portsnap.freebsd.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42055
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1452
;; QUESTION SECTION:
;_http._tcp.portsnap.freebsd.org. IN    SRV

;; ANSWER SECTION:
_http._tcp.portsnap.freebsd.org. 294 IN    SRV    4 10 80 ec2-ap-southeast-2.portsnap.freebsd.org.
_http._tcp.portsnap.freebsd.org. 294 IN    SRV    1 10 80 ec2-eu-west-1.portsnap.freebsd.org.
_http._tcp.portsnap.freebsd.org. 294 IN    SRV    2 10 80 your-org.portsnap.freebsd.org.
_http._tcp.portsnap.freebsd.org. 294 IN    SRV    3 10 80 metapeer.portsnap.freebsd.org.
_http._tcp.portsnap.freebsd.org. 294 IN    SRV    4 10 80 ec2-sa-east-1.portsnap.freebsd.org.
_http._tcp.portsnap.freebsd.org. 294 IN    SRV    4 10 80 ec2-ap-northeast-1.portsnap.freebsd.org.

;; Query time: 17 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Fri Jul 26 15:36:27 CEST 2019
;; MSG SIZE  rcvd: 384
```


```
% host -t srv _http._tcp.portsnap.freebsd.org
_http._tcp.portsnap.freebsd.org has SRV record 3 10 80 metapeer.portsnap.freebsd.org.
_http._tcp.portsnap.freebsd.org has SRV record 4 10 80 ec2-sa-east-1.portsnap.freebsd.org.
_http._tcp.portsnap.freebsd.org has SRV record 4 10 80 ec2-ap-northeast-1.portsnap.freebsd.org.
_http._tcp.portsnap.freebsd.org has SRV record 4 10 80 ec2-ap-southeast-2.portsnap.freebsd.org.
_http._tcp.portsnap.freebsd.org has SRV record 1 10 80 ec2-eu-west-1.portsnap.freebsd.org.
_http._tcp.portsnap.freebsd.org has SRV record 2 10 80 your-org.portsnap.freebsd.org.
```


----------

