nemat
Posts: 6
Joined: Fri May 20, 2016 4:02 am

ssh - broken pipe/connection refused, wlan interface

Wed May 25, 2016 6:00 pm

I'm a newcomer to the rpi world, bought a rpi 3 recently.
Running up-to-date raspbian jessie.
Working over ssh from my macbook air, so switched rpi to console mode.
Noticed, that ssh connection is not stable and searched for a similar problem in the forum.
Some ppl had a success with iptables mangling, sshd_config option...but no way for me.
Changed ntp config so it uses ipv4, i see no problem with ntp.
Sometimes it works for an hour or so without any problem. but most part the ssh connection drops.
And I get connection refused all the time.
I don't understand what is the problem, no clue in rpi logs.
Is it a known issue using built-in wlan interface? Is there a firm workaround? Is there any planned update?

Thanks.

Nemat

nemat
Posts: 6
Joined: Fri May 20, 2016 4:02 am

Re: ssh - broken pipe/connection refused, wlan interface

Fri May 27, 2016 6:26 pm

I'm disappointed with my RPI 3. It does not work as advertised. :-(
I went with RPI 3 simply because it has built-in wi-fi.
And it simply does not do its work. Of course, with LAN cable it works great.
I've seen too many messages from other forum users about wi-fi problems. For some of them the workarounds did the job.
But it does not work for me. Too frequent broken pipes and almost every time connection refused.

epoch1970
Posts: 5132
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: ssh - broken pipe/connection refused, wlan interface

Sat May 28, 2016 9:54 am

At my desk I have a mac mini with OSX 10.11 and I connect over wifi to a Pi 3 which is setup in AP mode. The 2 machines are next to each other, the wifi connection is very robust, lasting days. Throughput is good too. I rarely use the Pi as a wifi client, but it doesn't seem to have issues connecting to my Airport Express AP either. So I don't think there is anything special with the Pi 3's wifi. Except than having built-in wifi and Bluetooth is great.

Your messages doesn't give any detail about your setup, so helping out is about impossible.
- You can get "broken pipe" during your session if the Pi changes IP address, or changes to another wifi network or loses contact with the AP, or if the sshd daemon suddenly dies (quite unlikely), etc.
- You can get connection refused if your are not knocking at the right door (IP address or login), if sshd is not (re)started, if a firewall is active on the Pi, etc.
- Or perhaps it is your mac that hops from network to network, or something like that. No the Pi.

What I would do (in this order):
1 - Discard the (faint) possibility the Mac is misbehaving. This one is easy enough, if you can use another machine and get the same issues when connecting to the Pi. Or, observe the console log on the Mac, your wifi router's log, your wifi connection before and after the connexion breaks up. You'll see if the Mac has an active part or not in the connection breakup.
2 - Make sure the Pi runs a clean operating system and see if the problem is still there.
3 - Connect the Pi to a monitor, run it with wifi networking, and observe messages in the system log and also messages in the wifi router.

That should give you clues as to why or when your connection over wifi breaks, and you'll be able to post details about the system's behavior.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

nemat
Posts: 6
Joined: Fri May 20, 2016 4:02 am

Re: ssh - broken pipe/connection refused, wlan interface

Sat May 28, 2016 1:30 pm

Thank you for your reply

Here are the details of my setup:

- Wi-Fi router TP-Link Archer C7 with Atheros QCA9558, official firmware, 2.4 and 5 GHz
- Since this is at my home, A lot of wi-fi clients, Macbook Air/Pro (latest Mac OS), HP laptop (Ubuntu 14.04), a few Windows laptops, iOS and Android phones, TVs, etc...
- 2.4GHz setup on channel 9 (tried other channels also)
- RPI 3 with up-to-date Raspian, setup from official image 2016-03-18 first and upgraded to the latest release with following apt-get updates. Runs as a wifi client. Power management switched off
- I can get into RPI from any of my laptop (Mac, Linux, Windows,...) through ssh or vice versa.
- root filesystem moved into 8GB usb flash disk
- RPI configured to run in console mode through raspi-config
- right now it is connected to a 2.4A Orico USB charger as a solely power client, but tried with other PSUs also (2A, 5V)

The only problem is that builtin wi-fi is not reliable as stated in my first post. Right now I've setup a cable connection and no single problem with ssh. No single package drop even it is connected through builtin wifi, just unstable ssh. Broken pipes and connection resets if it runs with builtin wifi.

As I said, I bought RPI 3 with purpose to run it using builtin wifi. I'm testing RPI for my pet project where I'll utilise some USB device. First, I wanted to use Odroid-C2 but went for RPI 3 since it has builtin wifi.

Return to “Troubleshooting”