" portsnap fetch", fetching public key failed.

I am a newer to freeBSD, would you please give me a hand.

I want to update the ports.

Code:
# portsnap fetch
Looking up portsnap.FreeBSD.org mirrors... 5 mirrors found.
Fetching public key from portsnap2.FreeBSD.org... failed.
Fetching public key from portsnap1.FreeBSD.org... failed.
Fetching public key from portsnap6.FreeBSD.org... failed.
Fetching public key from portsnap5.FreeBSD.org... failed.
Fetching public key from portsnap4.FreeBSD.org... failed.
No mirrors remaining, giving up.

but i can ping portsnap2.FreeBSD.org

Code:
# ping portsnap2.FreeBSD.org
PING portsnap2.FreeBSD.org (208.83.221.214): 56 data bytes
64 bytes from 208.83.221.214: icmp_seq=0 ttl=43 time=281.134 ms
64 bytes from 208.83.221.214: icmp_seq=1 ttl=43 time=275.486 ms
^C
--- portsnap2.FreeBSD.org ping statistics ---
3 packets transmitted, 2 packets received, 33.3% packet loss
round-trip min/avg/max/stddev = 275.486/278.310/281.134/2.824 ms

and I try to fetch the public key directly

Code:
# fetch http://update3.FreeBSD.org/8.0-RELEASE/i386/pub.ssl
fetch: http://update3.FreeBSD.org/8.0-RELEASE/i386/pub.ssl: Not Found
#

here is the uname info.

Code:
# uname -a
FreeBSD .166 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 2009     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
#

Google doesn't help.
Thanks.
 
I tried http://portsnap2.freebsd.org/pub.ssl

Code:
# fetch http://portsnap2.freebsd.org/pub.ssl
fetch: http://portsnap2.freebsd.org/pub.ssl: Not Found
#

Code:
# fetch -vvv http://portsnap2.freebsd.org/pub.ssl
scheme:   [http]
user:     []
password: []
host:     [portsnap2.freebsd.org]
port:     [0]
document: [/pub.ssl]
---> portsnap2.freebsd.org:80
looking up portsnap2.freebsd.org
connecting to portsnap2.freebsd.org:80
requesting http://portsnap2.freebsd.org/pub.ssl
>>> GET /pub.ssl HTTP/1.1
>>> Host: portsnap2.freebsd.org
>>> User-Agent: fetch libfetch/2.0
>>> Connection: close
>>> 
<<< HTTP/1.1 404 Not Found
<<< Server: nginx/0.8.53
<<< Date: Fri, 03 Dec 2010 08:54:27 GMT
<<< Content-Type: text/html
<<< Content-Length: 3652
content length: [3652]
<<< Connection: close
<<< Vary: Accept-Encoding
<<< 
offset 0, length -1, size -1, clength 3652

any idea?

thanks
 
What IP address does portsnap2 resolve to on your server? You shouldn't be hitting an nginx proxy as far as I can see.

Code:
$ fetch -vvv http://portsnap2.freebsd.org/pub.ssl
scheme:   [http]
user:     []
password: []
host:     [portsnap2.freebsd.org]
port:     [0]
document: [/pub.ssl]
---> portsnap2.freebsd.org:80
looking up portsnap2.freebsd.org
connecting to portsnap2.freebsd.org:80
requesting http://portsnap2.freebsd.org/pub.ssl
>>> GET /pub.ssl HTTP/1.1
>>> Host: portsnap2.freebsd.org
>>> User-Agent: fetch libfetch/2.0
>>> Connection: close
>>> 
<<< HTTP/1.1 200 OK
<<< Date: Fri, 03 Dec 2010 01:13:44 GMT
<<< Server: Apache/2.2.15 (FreeBSD) mod_ssl/2.2.15 OpenSSL/0.9.8k DAV/2
<<< Last-Modified: Fri, 03 Dec 2010 01:09:00 GMT
<<< ETag: "551a0c-1c3-496772ef62300"
last modified: [2010-12-03 01:09:00]
<<< Accept-Ranges: bytes
<<< Content-Length: 451
<<< Connection: close
content length: [451]
<<< Content-Type: text/plain
<<< 
offset 0, length -1, size -1, clength 451
remote size / mtime: 451 / 1291338540
pub.ssl                                       100% of  451  B 2247 kBps
Code:
$ dig portsnap2.freebsd.org +short                                                                                     
208.83.221.214

Edit: I see in your first post that ping resolves the IP address correctly, but maybe fetch doesn't for some reason. Anything untoward in /etc/hosts or /etc/resolv.conf?
 
I not modified anything in /etc/hosts or /etc/resolv.conf
this is the content of /etc/hosts
Code:
# $FreeBSD: src/etc/hosts,v 1.16.34.1.2.1 2009/10/25 01:10:29 kensmith Exp $
#
# Host Database
#
# This file should contain the addresses and aliases for local hosts that
# share this file.  Replace 'my.domain' below with the domainname of your
# machine.
#
# In the presence of the domain name service or NIS, this file may
# not be consulted at all; see /etc/nsswitch.conf for the resolution order.
#
#
::1                     localhost localhost.my.domain
127.0.0.1               localhost localhost.my.domain
#
# Imaginary network.
#10.0.0.2               myname.my.domain myname
#10.0.0.3               myfriend.my.domain myfriend
#
# According to RFC 1918, you can use the following IP networks for
# private nets which will never be connected to the Internet:
#
#       10.0.0.0        -   10.255.255.255
#       172.16.0.0      -   172.31.255.255
#       192.168.0.0     -   192.168.255.255
#
# In case you want to be able to connect to the Internet, you need
# real official assigned numbers.  Do not try to invent your own network
# numbers but instead get one from your network provider (if any) or
# from your regional registry (ARIN, APNIC, LACNIC, RIPE NCC, or AfriNIC.)
and /ect/resolv.conf
Code:
search 166
nameserver 172.25.85.1

thanks
 
Code:
# dig portsnap2.freebsd.org +short
208.83.221.214
And I tried to use wget,
Code:
# wget http://portsnap2.freebsd.org/pub.ssl
--2010-12-03 10:36:29--  http://portsnap2.freebsd.org/pub.ssl
Resolving portsnap2.freebsd.org... 208.83.221.214
Connecting to portsnap2.freebsd.org|208.83.221.214|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2010-12-03 10:36:29 ERROR 404: Not Found.

Can help me please.
 
And I think my network setting is no problem.
Code:
# wget http://portsnap2.freebsd.org/
--2010-12-03 10:45:57--  http://portsnap2.freebsd.org/
Resolving portsnap2.freebsd.org... 208.83.221.214
Connecting to portsnap2.freebsd.org|208.83.221.214|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1826 (1.8K) [text/html]
Saving to: `index.html'

100%[======================================>] 1,826       --.-K/s   in 0.1s    

2010-12-03 10:45:58 (17.6 KB/s) - `index.html' saved [1826/1826]
 
There's something on your network that seems to proxy your traffic. It's this proxy that's causing the problems.
 
jetaime said:
And I think my network setting is no problem.
Code:
# wget http://portsnap2.freebsd.org/
--2010-12-03 10:45:57--  http://portsnap2.freebsd.org/
Resolving portsnap2.freebsd.org... 208.83.221.214
Connecting to portsnap2.freebsd.org|208.83.221.214|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1826 (1.8K) [text/html]
Saving to: `index.html'

100%[======================================>] 1,826       --.-K/s   in 0.1s    

2010-12-03 10:45:58 (17.6 KB/s) - `index.html' saved [1826/1826]

For the record: there is no index.html on that server. You should have gotten an error:

Code:
403 Forbidden

Forbidden
You don't have permission to access /
on this server.

fetch: http://portsnap2.freebsd.org/: Forbidden

So something's definitely intercepting/redirecting your http traffic. Open that index.html file, and see what it says. Might give you a clue.
 
Back
Top