Network problems and hangs... losing faith... (solved)


114 posts   Page 1 of 5   1, 2, 3, 4, 5
by halfabiscuit » Mon Jul 02, 2012 12:42 pm
Hello - I have had my pi for about three weeks now and I am not really getting anywhere. I have posted my issues in another thread that I hijacked but I thought I would repost in my own topic.
The problem seems fairly consistent, pi will boot up OK and if you don't do anything it will sit at the prompt or in an X windows session. However, if you boot it up with the ethernet connected it will eventually hang necessitating a reboot. You can give it an IP address with ifconfig and sit there pinging your own IP address - it will work for a few minutes and then start timing out followed by the pi freezing. I really want to use my pi headless so getting it onto a network with a reliable connection is a must for me.
I have tried all manner of combinations; 3 different SD cards (2, 4 and 16GB), different images (arch, debian and qtonpi), different power supplies (700mA Blackberry charger, 1.2A RS Components PSU, powering via a powered USB hub) and they all seem to display the same problem.
A lot of what I have read on here points towards power issues and I have seen the keyboard issues often (keyboard stops responding or does not behave correctly) but the power ratings of the supplies mentioned above seem OK. I checked the voltage using a multimeter and the readings were within normal ranges.
I was thinking of trying to source another PSU but I am not too optimistic about this solving the problem.

I have been through everything here: http://elinux.org/R-Pi_Troubleshooting and none of it seems to quite match.

Would be grateful for any other suggestions.
Posts: 26
Joined: Thu Jun 21, 2012 10:55 am
by NickT » Mon Jul 02, 2012 1:37 pm
It sound like you have already spent quite enough money on PSUs, so I would try to get it running headless as that is your ultimate aim and your network connectivity problems may well then disappear.

I believe that there are problems with the USB drivers that may manifest themselves differently depending on what combination of peripherals are plugged into the USB ports. This also may affect the ethernet, as it's tied in with the USB somehow. I'm running my Pi successfully using just a 700mA charger and an ethernet connection. Naturally there is nothing plugged into the USB ports in this configuration.

If you pick the new Debian Wheezy beta distro, then ssh server is enabled by default and from there you can install Tightvnc and thus get a a command line interface or a GUI from your desktop machine. I'd also try starting up with just the keyboard and ethernet connected (no mouse) in a headful configuration, just to see if one less USB device makes it any better.
User avatar
Posts: 91
Joined: Mon May 21, 2012 10:43 am
by halfabiscuit » Mon Jul 02, 2012 6:02 pm
Hmm, just tried that, still the same. Everything disconnected other than the ethernet cable, I sit there and ping the address I have configured on the pi, it responds for a while then stops responding.
This looks to me like either a bug with the firmware or a hardware problem. I am getting close to the point of asking for a replacement...
Posts: 26
Joined: Thu Jun 21, 2012 10:55 am
by dom » Mon Jul 02, 2012 6:21 pm
halfabiscuit wrote:Hmm, just tried that, still the same. Everything disconnected other than the ethernet cable, I sit there and ping the address I have configured on the pi, it responds for a while then stops responding.
This looks to me like either a bug with the firmware or a hardware problem. I am getting close to the point of asking for a replacement...


Start with Wheezy image:
http://www.raspberrypi.org/archives/1435

and nothing plugged in except network. If that fails, can you plug in another networked device into the same cable, and confirm that the ping test works reliably (in case of network cable/router problem).

My next test would be to measure voltage when running the test:
http://elinux.org/R-Pi_Troubleshooting# ... r_problems

If voltage is fine, then RMA.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4043
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by leon_heller » Mon Jul 02, 2012 6:32 pm
Have you tried another Ethernet cable? The first cable I tried didn't work - both of them have the little plastic locking thing broken, which might have had something to do with it. I think that one is a crossover cable, but that shouldn't matter.
Leon Heller
G1HSM
User avatar
Posts: 40
Joined: Wed May 02, 2012 4:10 pm
by halfabiscuit » Tue Jul 03, 2012 12:46 pm
Yes tried a variety of cables attached to a variety of things (crossover to another PC, straight to a hub, straight to a router) and they all do the same thing - I am actually a network engineer for a living so this is one area I do feel some confidence in ;)

I will give that a try with the multimeter and let you know the results.
Posts: 26
Joined: Thu Jun 21, 2012 10:55 am
by nickon314 » Wed Jul 04, 2012 1:33 pm
I know you said you are a network engineer, so you have probably checked this.
But, what about the arp cache? Could it be a MAC address to IP translation thing?


Regards

Nick
Posts: 115
Joined: Tue Jul 03, 2012 12:11 pm
Location: West Yorkshire
by halfabiscuit » Wed Jul 04, 2012 1:41 pm
Nah - it can't be that. If you sit there pinging something on your LAN continuously then it will not time out in your arp cache. If you try and ping something it will arp for the MAC address and when resolved cache it and use it, if it is not used then it will time out after a given time (6 minutes I think). It would make no sense to be able to ping something for a few seconds and then suddenly drop it.
Posts: 26
Joined: Thu Jun 21, 2012 10:55 am
by nickon314 » Thu Jul 05, 2012 3:29 am
Yes, you're probably right.
Although, I have seen it happen, but not with the Pi. It was using an industrial PLC - which was sending out random garbage on the network which was being misinterpreted by Windows PC's and upsetting the arp cache. But, that's another story.

Can you ping the other way at the same time? does it bomb out at the same time at both ends?

Also, I notice that my Pi picks up a DHCP IP address from my local router, which is OK.
Except, that I have added the MAC address of the Pi to the local LAN setup so that it should get the same IP address each time. But, the Pi never gets that specific static IP. It alwas gets one from the DHCP range! I thought that was strange, but I've not yet probed in to that. Maybe needs a wireshark session to see what's going on.

Regards

Nick
Posts: 115
Joined: Tue Jul 03, 2012 12:11 pm
Location: West Yorkshire
by halfabiscuit » Thu Jul 05, 2012 6:59 am
Maybe I did not explain the symptoms quite right. I took DHCP out of the equations and just set the ip address of the pi using ifconfig i.e. "ifconfig eth0 192.168.1.1" and manually set the IP address of the PC at the other end of the crossover to 192.168.1.2. I then ping 192.168.1.2 from the pi - it responds - lovely. But then after about 30 seconds the ping response comes back as "network unreachable". This to me is indicative of the interface going down (as if you had pulled the cable). This is further evidenced by the fact that if you then run ifconfig eth0 it has lost the IP address (if you use ifconfig to set the IP address and the link goes down and then comes back up again you will lose whatever IP address was set - this is normal behaviour).
This is why it looks like the ethernet firmware is crashing after a short time for some reason.
Interestingly I can sit there and ping 127.0.0.1 (the loopback address) and it will respond all day and night.
Anyway - I still need to borrow my Dad's multimeter so still not done the test yet. Watch this space.
Posts: 26
Joined: Thu Jun 21, 2012 10:55 am
by godFather89 » Thu Jul 05, 2012 8:23 am
Any info on dmesg?
Posts: 150
Joined: Fri May 18, 2012 9:40 am
Location: Timisoara, RO
by nickon314 » Thu Jul 05, 2012 2:23 pm
Ah,
I see what you mean, I just had the same thing happen to me too.
But, My RaspPi had been on for over an hour before it started to go wonky.

Looks like there is a problem with the underlying networking drivers after all.

I am using Debian Squeeze by the way.

Regards

Nick
Posts: 115
Joined: Tue Jul 03, 2012 12:11 pm
Location: West Yorkshire
by halfabiscuit » Thu Jul 05, 2012 7:24 pm
I got round to doing the tests.
Hooked up the pi to my TV with just a regular keyboard and nothing else.
Allows it to boot, before logging in checked the voltage: 4.93
Logged in, set my own ip address with ifconfig and set a ping going to my own address, checked again 4.93
Attached the ethernet cable 4.90
Tried pinging something at the other end of the cable 5.03
Repeated the test twice and got identical results.

I noticed something else odd too. During the test I set my own address to 192.168.0.1 and then set a continuous ping going to my own address with the ethernet cable out. Now, not all OS will respond if the interface is down like this but the pi does (I am running wheezy by the way). So you can sit there pinging your own address happily but then when you connect the ethernet cable it stops responding AND the pi becomes unresponsive and has to be rebooted. That makes no sense to me.

Hope this means something to someone because I am running out of ideas...
Posts: 26
Joined: Thu Jun 21, 2012 10:55 am
by RonnieMcK » Sat Jul 07, 2012 7:27 pm
Day 3 of Raspberry Di

Bought the peripheral package from MicroMundi via Amazon Market place, and they assure me they have several Pi s up and running. I have no reason to doubt them.

But I have yet to load a single Web page. Pi just keeps locking out with wired keyboard and mouse turning off. ala halfabiscuit

Can ping 127.0.0.1, other machines on network and occasionally www.raspberrypi.org etc, then wham its down. No rhyme No reason.

I realise that I am dependent on other in the forum here as a newbie I am completely stuck.

Standing on the shoulders of giants.
Posts: 4
Joined: Thu Jul 05, 2012 12:44 pm
by raspberryipad » Sat Jul 07, 2012 7:44 pm
I am getting the same problem here. Nothing in USB, only ethernet and power. it seems to happen when I hit it with an rsync client to back up files stored on it. (Strangely, it didn't happen when I scp'd the files up to it in the first place.) I have had another machine on the same router with the same cable for a while carrying out similar uploads/downloads without problems.

Power is (or claims to be) 1A.

I saw this:

http://lists.debian.org/debian-user/201 ... 00715.html

which links to this:

https://bugs.launchpad.net/ubuntu/+sour ... bug/404708

...but whether they are remotely related, I can't say.
Posts: 1
Joined: Sat Jul 07, 2012 7:23 pm
by pluggy » Mon Jul 09, 2012 2:26 pm
Finally got my Pi which turns out to be one I ordered on-line way back and I thought hadn't 'flagged' with Farnell's site. and I left it. I have one I ordered later apparently coming this week...

Anyway on with the plot. I'm an old Linux hand (12 years +) and I set my Pi emulating a job I presently have a hacked ARM NAS box doing namely pulling data out of an Arduinio, potting graphs and providing a Web interface for my home monitoring system. :

http://pluggy.is-a-geek.com

I intend to make a few for other people, and as the said hacked NAS box isn't available anymore I though the Pi would be an ideal replacement. I wouldn't have to hack it and its the right price point.
Its basically a collection of BASH shell scripts running as Cron jobs. I've spent 3 days trying to get it to work reliably, but it crashes constantly.

3 Different power supplies (no cheap nasty Ebay tosh either, one of them is a 2.5 Amp Dlink adapter that once belonged to a router I modified to feed the Pi via the GPIO pins), 2 different 8 GB SD cards (1 Samsung, 1 Sandisk). Its running headless but I have connected a Monitor & Keyboard. Everything works, no problem at least for a time. It reads stuff off the internet and the local network (wired ethernet port) as well as the Arduino which is plugged into on of the USBs.
It will run for a few minutes or maybe an hour and then dies. The lights stay on but it stops responding and stops updating log files at the same time. Sometimes I get a load of stuff in log files suggesting its having problems with the USB and network, sometimes not. Tried Debian
Squeeze, Arch Linux and Debian Wheezy, changing memory mix sizes, done Hexxeth's firmware updates, and all the tweaks I can find. They all do exactly the same on each power supply and SD card. If I leave the Arduino unplugged, it will usually run for several hours before crashing, but it still does. Tweaking the BASH scripts so it doesn't do so much stuff on the network/internet also helps. Not doing much on the network at all seems to keep it alive for extended periods, but that kind of defeats the object of the exercise.

Reading some of the developers comments on Github doesn't exactly inspire me with confidence, the finger seems to point at the (my paraphrase) unholy botch that is the USB/Ethernet hardware system and the closed source patched into opensource (or is it the other way around ;) ) drivers for said hardware. I'm not expecting my next Pi when it arrives to behave any differently. I've tried playing with it with a GUI and browsing the internet and it works, but I generally get fed up of the performance on most sites before it gets around to crashing.

Any pointers ? But I've probably already tried it......
Don't judge Linux by the Pi.......
User avatar
Posts: 2637
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by BarryK » Mon Jul 09, 2012 3:04 pm
I would be very interested to know if you guys have better luck with a powered usb hub as the only power source, and running Puppy Linux alpha2, as described here:

http://bkhome.org/arm/rp-hardware-setup.htm

This configuration may resolve some mysterious problems that may have something to do with those darn polyfuses.

Also, no-one has yet reported any problem with running Puppy alpha2 for extended periods on the Internet via the ethernet. Alpha2 here:

http://bkhome.org/blog/?viewDetailed=02879

...please read the Release Notes, the config.txt file is configured for HDMI video.

I don't know if these measures will solve your problem, but worth a go before giving up.

Regarding mysterious problems, sound doesn't work on my board, I have given up on that. I really think it is a faulty board.
Posts: 25
Joined: Thu Dec 08, 2011 12:47 am
by pluggy » Mon Jul 09, 2012 3:25 pm
I have tried my PC's internal powered hub which is just like an external one only powered from a molex connector from the PC's internal power supply - it doesn't make any difference. It doesn't flinch with a couple of USB powered hard drives plugged into it and I get 4.7 volts across the test points when using it with the Pi. The 2.5 amp jobby wired to the GPIO gives me 5.1 volts across the test points. Without the KB & Mouse it doesn't need to provide any extra power. The Arduino draws around 20-30 mA when its plugged in. Haven't yet gone down the puppy route however.
Don't judge Linux by the Pi.......
User avatar
Posts: 2637
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by marsman2020 » Mon Jul 09, 2012 4:32 pm
I think what you are seeing may be a software issue, not a hardware issue.

I've seen networking drop when using a powered hub with keyboard/mouse attached. Starting the GPM console mouse service or X Windows killed the networking.

I used an oscilloscope to verify the voltages on my Pi were within spec the entire time.

I eventually found a mouse that didn't cause this issue.... The problem mouse was a Logitech and the "working" one is a $5 wired mouse from Monoprice.

I documented my findings in https://github.com/raspberrypi/linux/issues/29, but have yet to receive any response from anyone officially involved with the Pi. A little annoyed at that given I spent quite a few hours troubleshooting, borrowing the oscilloscope, etc.

Are you using a mouse?

Can you boot your pi with no USB devices connected and use SSH to log into it and see if the networking stays up when you do that?
Posts: 70
Joined: Sun May 20, 2012 11:26 pm
by pluggy » Mon Jul 09, 2012 4:41 pm
I'm pretty certain its a software issue. No mouse involved, No Keyboard involved - headless via ssh. Having the Ardunio connected via USB makes it a lot worse but it will crash just on its lonesome with nobody logged in, just running the BASH scripts.
Don't judge Linux by the Pi.......
User avatar
Posts: 2637
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by halfabiscuit » Tue Jul 10, 2012 10:06 am
I have already tried it powered via a USB hub (I actually said that in my original post).
I had another play around with it this weekend to no avail. I have tried it headless with nothing but the ethernet plugged in - it displays the exact same behaviour - boot it up, ethernet comes up and responds to ping then 30 seconds later ethernet dies and never recovers.
Posts: 26
Joined: Thu Jun 21, 2012 10:55 am
by ganders » Tue Jul 10, 2012 11:09 am
pluggy wrote:Everything works, no problem at least for a time. It reads stuff off the internet and the local network (wired ethernet port) as well as the Arduino which is plugged into on of the USBs.
It will run for a few minutes or maybe an hour and then dies. The lights stay on but it stops responding and stops updating log files at the same time. Sometimes I get a load of stuff in log files suggesting its having problems with the USB and network, sometimes not.

No solutions, but I've found very similar issues - things will run fine for a while, but then will lock up. Rarely manages to get anything into the logfiles but plug in a screen and there's often some kernel panics around USB/network stuff.

Two different Pi and a variety of different hardware which makes me suspect it must be a software issue. On the bright side, that means it might be possible to get it fixed :)

Curiously it seems to be worse if I'm connecting to it remotely - if I sit in front of the TV working on it direct, it feels a lot more stable.
Posts: 7
Joined: Thu Jun 07, 2012 10:02 am
by jamesh » Tue Jul 10, 2012 11:15 am
This is most bizarre. There are plenty of people who are seeing no problems at all. For example, Dom has been running an overclocked overvolted Pi overnight, with Midori set up to refresh every 20 seconds the Engadget webpage - that's a lot of ethernet traffic. It's been running ten hours with no issues. Wheezy with the latest firmware I believe.

I'll pass the thread ID on to others to see if they can see any rhyme or reason to it.
Soon to be employed engineer - Hurrah! Volunteer at the Raspberry Pi Foundation, helper at PiAcademy September 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11959
Joined: Sat Jul 30, 2011 7:41 pm
by asb » Tue Jul 10, 2012 12:21 pm
marsman2020 wrote:I documented my findings in https://github.com/raspberrypi/linux/issues/29, but have yet to receive any response from anyone officially involved with the Pi. A little annoyed at that given I spent quite a few hours troubleshooting, borrowing the oscilloscope, etc.


We are tracking that issue, apologies you haven't had a response. Let me just say that we do *massively* appreciate it when users such as yourself take the time to debug the problem. Your reported issue is certainly puzzling. Other people in that issue have reported problems running out of periodic channels "schedule_periodic: No host channel available for periodic transfer." - we are actually testing a patch for that at the moment.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 799
Joined: Fri Sep 16, 2011 7:16 pm
by bassabaas » Tue Jul 10, 2012 1:58 pm
I have the same issue. The PI hangs/is unreachable a few minutes after I've left it. It's headless, only network cable is in. I'm sshing into the Pi, and now and then access it through tightvnc. After I've left it I can't get in anymore.
Posts: 2
Joined: Tue Jul 10, 2012 1:54 pm