# Portsnap timeout.



## mpnw (Oct 15, 2013)

I install FreeBSD 9.2 on VMWare Server 2. Network is set up. (No proxy). I can ping google.com, etc, but: https://www.dropbox.com/s/slyfv14l8nql02x/000.jpg


----------



## DutchDaemon (Oct 15, 2013)

Just a corrupt snapshot or an unpacking error. Just run `rm -rf /var/db/portsnap/tag /var/db/portsnap/files` and run `portsnap fetch extract`. 

That should work.


----------



## DutchDaemon (Oct 15, 2013)

Oh wait, I missed the 'none found' line at the top. Check your resolving and your Internet connectivity. See if you can resolve portsnap1.freebsd.org, and see if port 80 is open there.


```
$ telnet portsnap1.freebsd.org 80                                                                                      
Trying 46.137.83.240...
Connected to portsnap.freebsd.org.
Escape character is '^]'.
GET / HTTP/1.0

HTTP/1.0 404 Not Found
Content-Type: text/html
Content-Length: 345
Connection: close
Date: Tue, 15 Oct 2013 10:40:38 GMT
Server: lighttpd/1.4.31

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
  <title>404 - Not Found</title>
 </head>
 <body>
  <h1>404 - Not Found</h1>
 </body>
</html>
Connection closed by foreign host.
```


----------



## mpnw (Oct 15, 2013)

It's ok, I think.


```
tor#
tor# telnet portsnap1.freebsd.org 80
Trying 46.137.83.240...
Connected to portsnap.freebsd.org.
Escape character is '^]'.

GET / HTTP/1.0

HTTP/1.0 400 Bad Request
Content-Type: text/html
Content-Length: 349
Connection: close
Date: Tue, 15 Oct 2013 13:28:30 GMT
Server: lighttpd/1.4.31

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
  <title>400 - Bad Request</title>
 </head>
 <body>
  <h1>400 - Bad Request</h1>
 </body>
</html>
Connection closed by foreign host.
tor#
tor#
```

But again:

```
tor#
tor# portsnap fetch
Looking up portsnap1.FreeBSD.org mirrors... none found.
Fetching snapshot tag from portsnap1.FreeBSD.org... done.
Fetching snapshot metadata... done.
Fetching snapshot generated at Tue Oct 15 04:11:42 SAMT 2013:
c4ec02b6145e344f4deed996512cb68628c73fa14717e6  0% of   69 MB    0  Bps
fetch: transfer timed out
fetch: c4ec02b6145e344f4deed996512cb68628c73fa14717e667ef3482cf9b9d566e.tgz appears to be truncated: 0/72689464 bytes
tor#
```


----------



## DutchDaemon (Oct 15, 2013)

What does `dig portsnap1.FreeBSD.org` produce?


----------



## mpnw (Oct 15, 2013)

```
tor# dig portsnap1.FreeBSD.org

; <<>> DiG 9.8.1-P1 <<>> portsnap1.FreeBSD.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46937
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;portsnap1.FreeBSD.org.         IN      A

;; ANSWER SECTION:
portsnap1.FreeBSD.org.  300     IN      CNAME   portsnap.FreeBSD.org.
portsnap.FreeBSD.org.   300     IN      A       46.137.83.240

;; Query time: 118 msec
;; SERVER: 212.24.53.2#53(212.24.53.2)
;; WHEN: Tue Oct 15 17:35:30 2013
;; MSG SIZE  rcvd: 78

tor#
```

I generally install Apache, PHP, MySQL. All these programs download (from Internet) anything during the installation, and all set up Ok. This is only a portsnap (portsnap tuning) problem, I think.


----------



## SirDice (Oct 15, 2013)

Looking at your hostname, you're not trying to push portsnap through Tor? I don't think that's going to work particularly well. Tor may be a little too slow for it and the FreeBSD portsnap servers might even block access from Tor exit nodes.


----------



## mpnw (Oct 15, 2013)

Tor is only the name of my FreeBSD host. I just can't ping portsnap.freebsd.org.


----------



## DutchDaemon (Oct 15, 2013)

That's because not every machine on the Internet responds to pinging. This is one of them.


----------



## mpnw (Oct 16, 2013)

Ðžops... to misfire.  Ok. May I manually download this snapshot and use it? I think I would need it only once.


----------



## mpnw (Oct 16, 2013)

I try use another mirror: 

```
tor# portsnap fetch extract
Looking up ru.portsnap.FreeBSD.org mirrors... 7 mirrors found.
Fetching snapshot tag from ec2-eu-west-1.portsnap.freebsd.org... done.
Fetching snapshot metadata... done.
Fetching snapshot generated at Wed Oct 16 04:09:01 SAMT 2013:
7f232f570d48e6faf789a3166db5d7e0fd92618a3a03dc  0% of   69 MB    0  Bps
fetch: transfer timed out
fetch: 7f232f570d48e6faf789a3166db5d7e0fd92618a3a03dcfe7737fa0bee7a78f7.tgz appears to be truncated: 0/72652650 bytes
tor#
```
The result is the same.


----------



## DutchDaemon (Oct 16, 2013)

I have no idea what is happening. You're getting the mirrors, the tag, the metadata. Why the actual tarball gets truncated, I don't know. Do you have problems with other big downloads? Can you download a -RELEASE ISO, for example?


----------



## mpnw (Oct 17, 2013)

*From ftp.freebsd.org ...*

... at full speed


----------



## psoi (Oct 17, 2013)

Hello. I have the same problem: http://ipic.su/img/img7/fs/bida.1382008452.jpg

No proxy. I can ping everything, but not portsnap.freebsd.org. There is just no response.


----------



## DutchDaemon (Oct 17, 2013)

Read my previous post again. Ping is a very limited diagnostic tool on the Internet.


----------



## psoi (Oct 17, 2013)

Maybe the IP adresses from Eastern Europe countries (Ukraine, Russia etc.) are banned or something like that? I just tried to connect to http://portsnap.freebsd.org:80 via a free online HTTP proxy and got access. The same action without proxy has "404 not found" as a result.


----------



## DutchDaemon (Oct 17, 2013)

The 404 is the proper response. There is nothing in the DocumentRoot to see.


----------



## mpnw (Nov 5, 2013)

Hi, you use VMWare Server too? I trÑƒ with Oracle VirtualBox, the result is the same.


----------



## mpnw (Nov 6, 2013)

*Solved!*

It was a hard (manually) set value mtu on my ASA firewall!


----------

