I recently managed to setup a Raspberry Pi 2 Model B as a VPN Server, and was using PuTTY to control the Pi via SSH during the setup.
I had previously enabled RealVNC on the Pi and set up my account with the intention of using it to transfer the OpenVPN config files back to my computer.
However, when I try to connect to the Pi, which is saved as part of my "team" on my RealVNC account, RealVNC seems to have difficulty connecting. The screen gets part way through refreshing, before cutting to what you see here: This happens repeatedly for ~10 minutes, but then eventually connects and works as normal.
The weird thing is that this only happens with my laptop, and every time I've tried it on my phone it works just fine connecting to my Pi.
I have tried to connect from both my home network and other networks and I always get the same result: My computer has issues but my phone always connects first time.
I don't know if this is due to my computer's security software (Kaspersky) interfering (although I did try disabling Kaspersky but still the VNC couldn't connect) or if I messed up port forwarding on my router, or somehow messed up the ports that the Pi is listening for. Or it could also be an error with windows, I'm really not sure.
===========================================================================
[EDIT]
I have now set up port forwarding on my router so that traffic from port 5900 is forwarded to my raspberry pi. I did this as when I went into the "Diagnostics" tab of VNC Server and tested the connection to the cloud, it reported that the router was sometimes blocking traffic from the cloud, or not sending it to the right place. I set up the port forwarding and now the diagnostic tool doesn't show this error, but my Laptop still has difficulty connecting.
Detailed below are the steps to get to the diagnostic tool should anyone find it useful:
First go to the VNC server menu and the click the icon that looks like a person:
Then click the "diagnostics" tab and click the "Test direct connection" button:
Then click "start" and it will test the connection to the VNC cloud.
However I am still having issues so I suspect this was not causing the issue anyway.
Connecting over LAN rather than through a cloud connection doesn't work first time either on my Laptop. But my phone always connects first time.