Newbie "No Route To Host" Issue

The problem:
- When attempting to install any port that falls back to ftp.FreeBSD.org upon failing on the first fetch, I get a "no route to host" error for ftp.FreeBSD.org; and the installation fails with Error code 1.

Example:
Code:
=> Attempting to fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/gnome2/libxml2-2.7.8.tar.gz
fetch: ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/gnome2/libxml2-2.7.8.tar.gz: No route to host
=> Couldn't fetch it - please try to retrieve this
=> port manually into /usr/ports/distfiles/gnome2 and try again.
*** Error code 1

Stop in /usr/ports/textproc/libxml2

(Excuse if the url above is mis-typed, this is a wireless keyboard and the FreeBSD machine is another machine, so I can't just copy paste.)

The facts:
uname -a returns:
Code:
FreeBSD .awesome.jpg 8.1-RELEASE FreeBSD 8.1-RELEASE #8: Mon Jul 19 02:55:53 UTC 2010     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

ping FreeBSD.org returns:
Code:
PING FreeBSD.org (69.147.83.40): 56 data bytes
64 bytes from 69.147.83.40: icmp_seq=2 ttl=55 time=43.080 ms
64 bytes from 69.147.83.40: icmp_seq=3 ttl=55 time=41.029 ms
...

ping ftp.FreeBSD.org returns:
Code:
PING ftp.FreeBSD.org (87.51.34.132): 56 data bytes
64 bytes from 87.51.34.132: icmp_seq=0 ttl=54 time=200.334 ms
64 bytes from 87.51.34.132: icmp_seq=1 ttl=54 time=210.613 ms
...

ifconfig returns:
Code:
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE>
        ether 00:11:85:f3:31:a2
        inet 192.168.0.120 netmask 0xffffff00 broadcast 192.168.0.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 22:00:00:00:11:3d
        ch 1 dma -1
fwip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        lladdr 20.0.0.0.3.0.11.3d.a.2.ff.fe.0.0.0.0
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>

The facts:
- This machine can update other ports just fine, and anything that doesn't need to access ftp.FreeBSD.org.
- This machine has internet connection through ICS on a Windows XP Machine (via a cat6a ethernet cable) The machine has IPv6 disabled and DHCP enabled on that interface.
- The Windows XP Machine has internet through a 36mbps Wireless G connection that is always on, and has not suffered disruptions during these tests.

If you require any additional information, I will be happy to provide it.
 
Is the XP machine able to ftp from ftp.freebsd.org ?
Can you perform a traceroute to ftp.freebsd.org from your BSD box ?
 
I believe that Windows ISC uses NAT, and you should look for the problem there, because passing FTP through NAT isn't straightforward. Try if you can download something in passive mode:

Code:
fetch -p ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/gnome2/libxml2-2.7.8.tar.gz

If yes, specify this parameter in /etc/make.conf

Code:
FETCH_CMD="/usr/bin/fetch -p"
 
gkontos said:
Is the XP machine able to ftp from ftp.freebsd.org ?
Can you perform a traceroute to ftp.freebsd.org from your BSD box ?

The XP machine is able to connect to ftp.freebsd.org after 14 hops.

pbd said:
I believe that Windows ISC uses NAT, and you should look for the problem there, because passing FTP through NAT isn't straightforward. Try if you can download something in passive mode:

Code:
fetch -p ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/gnome2/libxml2-2.7.8.tar.gz

If yes, specify this parameter in /etc/make.conf

Code:
FETCH_CMD="/usr/bin/fetch -p"

Still unable to fetch.
 
You could try to use e.g. wget to get the file, this would show if fetch has the problem or the network.

//edit: if you are able to install wget from ports...
 
disi said:
You could try to use e.g. wget to get the file, this would show if fetch has the problem or the network.

//edit: if you are able to install wget from ports...

If fetch is unable to work properly it's quite likely wget isn't going to work either.


cbroughton, can you post the output of
# netstat -rn

I have a feeling it's routing related.
 
SirDice said:
cbroughton, can you post the output of
# netstat -rn

I have a feeling it's routing related.

It's unlikely since he can ping ftp.freebsd.org:

cbroughton said:
ping FreeBSD.org returns:
Code:
PING FreeBSD.org (69.147.83.40): 56 data bytes
64 bytes from 69.147.83.40: icmp_seq=2 ttl=55 time=43.080 ms
64 bytes from 69.147.83.40: icmp_seq=3 ttl=55 time=41.029 ms
...
 
This could be a firewall issue. Blocked traffic with the right ICMP notification can elicit the local "No route to host" error too.
 
Any luck with this? I ran into the same problem today.. no route to host. Both fetch -p and ftp failed. Able to ping the hostname.
 
What FreeBSD version do you use and, as asked in the thread already, what does # netstat -rn give you (may want to check with traceroute too)?
 
Back
Top