Gigiux
Posts: 43
Joined: Wed Apr 10, 2019 7:28 pm

failure to connect to raspberry using VNC Viewer

Thu May 09, 2019 5:25 pm

Hello,
I followed the lead of this post https://www.raspberrypi.org/documentati ... ccess/vnc/ to gain access to my raspberry pi from linux mint. All went good, but when I try to connect, VNC does not find the address.
To note that I set a static IP and I can connect via SSH.
Any tip on what could have gone wrong? What can I test?
Thank you

User avatar
Botspot
Posts: 1536
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Website

Re: failure to connect to raspberry using VNC Viewer

Thu May 09, 2019 8:03 pm

Could you attach a screenshot of the error when trying to connect?
Since you mentioned ssh, to me that sounds like you are running the Pi without a screen. Do you know for sure if VNC Server is running on the Pi?
Want to run Minecraft Java on your RPi? Easiest way is with Pi-Apps - just click Install.
https://github.com/Botspot/pi-apps
Pi-Apps also includes Zoom, Visual Studio, Tor browser, Windows 10 theme, and 33 more.
Over 50,000 users!

Gigiux
Posts: 43
Joined: Wed Apr 10, 2019 7:28 pm

Re: failure to connect to raspberry using VNC Viewer

Sat May 11, 2019 8:06 am

Not much to show really: the error on VNC reads: 'Timed out waiting for a response from the computer'. I have attached a screen on Pi and the VCN icon is up and running on the bar.

User avatar
HawaiianPi
Posts: 5988
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: failure to connect to raspberry using VNC Viewer

Sat May 11, 2019 10:40 am

How did you set a static IP?

Which viewer are you using for VNC?

Check if avahi-daemon is running on Linux Mint, and if so, try connecting to pi@raspberrypi.local (or pi@raspberrypi), assuming you haven't changed the default hostname (should work with either SSH or VNC).

That guide seems overly-complicated. When I set up a headless Pi for remote desktop I just enable SSH, then use raspi-config to enable VNC server and set the screen resolution, after which I'm good to go. I have IP addresses reserved in my router's DHCP settings for all of my Pi computers, so I don't have to mess with static IP in the OS (they always have the same IP, regardless of what's on the boot drive).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

BlackKnight_UK
Posts: 94
Joined: Mon Jan 02, 2017 10:51 am

Re: failure to connect to raspberry using VNC Viewer

Sat May 11, 2019 11:24 am

I've had similar problems with 3 different Pi's (Zero W, 3A+ 3B+), not sure if it is the same problem but this fix might work for you, it did for me.

There's a thread on the forum at viewtopic.php?f=28&t=174861 about problems connecting to a headless Pi from VNC, near the bottom there's a post from "rin67630" with a solution that's worked every time for me.
The SOLUTION: install haveged (an entropy generator that does not need a mouse)

Code: Select all

sudo apt-get install haveged

Andyroo

Re: failure to connect to raspberry using VNC Viewer

Sat May 11, 2019 1:43 pm

BlackKnight_UK wrote:
Sat May 11, 2019 11:24 am
I've had similar problems with 3 different Pi's (Zero W, 3A+ 3B+), not sure if it is the same problem but this fix might work for you, it did for me.

There's a thread on the forum at viewtopic.php?f=28&t=174861 about problems connecting to a headless Pi from VNC, near the bottom there's a post from "rin67630" with a solution that's worked every time for me.
The SOLUTION: install haveged (an entropy generator that does not need a mouse)

Code: Select all

sudo apt-get install haveged
The new version of Raspbian (April 2019) has this fixed. They have kindly built in the rng-tools:
Added rng-tools
from http://downloads.raspberrypi.org/raspbi ... _notes.txt

This avoids the need of the haveged tool set for generating entropy. I’ve still not managed to track down what stopped VNC starting without this BUT I do know they use their own encryption routines so have assumed it’s part of the key generation.

BlackKnight_UK
Posts: 94
Joined: Mon Jan 02, 2017 10:51 am

Re: failure to connect to raspberry using VNC Viewer

Sun May 12, 2019 11:18 am

In that case the Google AIY Voice kit download needs updating as it was with that I had the problem a few days ago. But good to hear it has been fixed.

User avatar
HawaiianPi
Posts: 5988
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: failure to connect to raspberry using VNC Viewer

Mon May 13, 2019 5:44 pm

Andyroo wrote:
Sat May 11, 2019 1:43 pm
This avoids the need of the haveged tool set for generating entropy. I’ve still not managed to track down what stopped VNC starting without this BUT I do know they use their own encryption routines so have assumed it’s part of the key generation.
The only difference I have noticed with and without rng-tools (or haveged) is that VNC takes longer to connect. It never failed to start, it was just slower (I could connect with SSH well before VNC connections would work). ¯\_(ツ)_/¯
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Andyroo

Re: failure to connect to raspberry using VNC Viewer

Mon May 13, 2019 7:22 pm

HawaiianPi wrote:
Mon May 13, 2019 5:44 pm
Andyroo wrote:
Sat May 11, 2019 1:43 pm
This avoids the need of the haveged tool set for generating entropy. I’ve still not managed to track down what stopped VNC starting without this BUT I do know they use their own encryption routines so have assumed it’s part of the key generation.
The only difference I have noticed with and without rng-tools (or haveged) is that VNC takes longer to connect. It never failed to start, it was just slower (I could connect with SSH well before VNC connections would work). ¯\_(ツ)_/¯
I’ve got one box that refuses to start at all (always times out) despite waiting a week till I plug the keyboard / mouse dongle in :lol: Is it possible other programs generate entropy for the Pi? I know the Pi-Hole stack does not so it’s SSH or keyboard / mouse for the other bits on that for me :lol: just about got everything off other than the MQTT Broker so I’m not fussed now and will drop it to light on a Zero W soon.

rafaelmendy
Posts: 1
Joined: Sat Jul 04, 2020 3:58 pm

Re: failure to connect to raspberry using VNC Viewer

Sat Jul 04, 2020 4:15 pm

Hi
I have the same problem in connecting to raspberry pi 3b from win10 via vnc viewer. I've searched many different forums but couldn't find the answer. None of the solutions solved my problem.
In raspberry pi side, vnc server is running and shows the RP's ip in it's gui. Also i double checked the private ip by different approaches. Both my laptop and my RP are connected to my home wifi router. I set the resolution of the RP to be similar to my laptop resolution. I did that by keyboard, mouse and a monitor. After that i disconnected the monitor and restart the RP. Then i use vnc viewer in my laptop and connect to the RP's ip. Unfortunately "connection timed out" is the only thing that i get.
Help needed!

pfletch101
Posts: 630
Joined: Sat Feb 24, 2018 4:09 am
Location: Buffalo, NY, USA

Re: failure to connect to raspberry using VNC Viewer

Sun Jul 05, 2020 8:27 pm

This time last year, I had similar problems develop on a setup both ends of which had previously been stable and working for more than a year. It turned out that the (then) latest version of RealVNC client for Windows had a bug which fairly consistently caused such problems. RealVNC sent me a beta version that worked, and I assume that the release version will have been updated soon thereafter. If your Windows client is of that sort of vintage or was downloaded from anywhere except the RealVNC site, it might be worth getting the latest version from there.

Return to “Troubleshooting”