11

I have raspbmc (Debian) installed on my Raspberry Pi and it seems to not be able to download anything?

wget seems to stall yet it can ping!

The same happens for apt-get

Resolving google.com... 173.194.41.160, 173.194.41.165, 173.194.41.163, ...
Connecting to google.com|173.194.41.160|:80... connected.
HTTP request sent, awaiting response... Read error (Connection timed out) in headers.
Retrying.

--1970-01-01 00:17:51--  (try: 2)  http://google.com/
Connecting to google.com|173.194.41.160|:80... connected.
HTTP request sent, awaiting response... Read error (Connection timed out) in headers.
Retrying.

pi@raspbmc:~$ sudo apt-get install curl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libcurl3 libssh2-1
The following NEW packages will be installed:
  curl libcurl3 libssh2-1
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 578 kB of archives.
After this operation, 1065 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
0% [Waiting for headers]

Does anyone know why this is happening/how to fix?

Jon Egerton
  • 3,083
  • 2
  • 22
  • 32
Pez Cuckow
  • 275
  • 2
  • 3
  • 7

3 Answers3

4

I think your IP configuration might not be correct. Try ifconfig -aand review your configuration. I came to this assumption because your system time doesn't get set via NTP.

An other possibility is a proxy configuration. You could see it with export | grep -i proxy

macrojames
  • 96
  • 3
  • You were correct, shame this isn't on superuser any more! For some reason the static IP wasn't working. Enabling DHCP fixed it! – Pez Cuckow Jul 17 '12 at 08:40
3

Run dmesg and see if there are any issues at the end of the output. I had a problem where insufficient power was being supplied to the Pi which caused the network to drop out every few seconds, and this could exhibit similar symptoms to what you are seeing.

Malvineous
  • 1,874
  • 14
  • 20
2

Another possibility is that you have hit a slow IPv6 DNS issue on your internet connection, at lot of ISP's have badly broken IPv6 DNS setups which result in long timeouts for negative (not found) responses. Just try:

wget -4 www.google.it

and see if this is any faster. If you have hit this issue and can find out how to turn off IPv6 in raspbmc I would love to know also. I am currently researching this problem.

Avio
  • 1,217
  • 2
  • 14
  • 25