categories
Updated on in

Troubleshoot: VNC connection refused, VNC Black Screen Issue and many others

Author: Helga York
Helga York Article author

Virtual Network Computing (VNC) is a screen sharing mechanism that makes it possible to remotely control another computer. Making use of the RFB (Remote Frame Buffer) protocol – VNC allows for the transporting of data between the server and client machines.

This includes peripheral inputs and outputs from your keyboard and mouse, making the VNC experience behave as if you’re physically connected to the server. The server is the remote device that you want to connect to. Client refers to your local machine from which you are accessing the server. Check other best secure remote access software.

The most common problems experienced by VNC users involve connectivity errors and display issues. This article will guide you through these common problems and provide you with recommended steps to resolve these issues.

Useful tip:
The best way to cope with common VNC problems is to switch to an alternative solution. We recommend HelpWire, a reliable and efficient remote desktop tool, catered towards independent professionals and small to medium-sized businesses offering a modern and streamlined interface that is easy to navigate with optimized features for remote support. Try HelpWire today for a hassle-free solution to your VNC Viewer issues.

VNC Server is Not Currently Listening for Cloud Connections

Step through the following checklist to resolve the problem:
  1. The remote computer or server must be connected to the Internet in order for you to connect to it.
  2. Make sure that the server is not in sleep mode. It is recommended that you configure the power options to ensure it never goes to sleep.
  3. Is “Allow cloud connections” checked in your VNC Server settings?
  4. Have you selected the correct team for the remote computer?

    vnc viewer

  5. For subscription users, verify that you are attempting to join your computer with the correct paid-for team.
  6. If you’re using Linux, establish that the Linux display server protocol Wayland is disabled.
  7. Сheck the RealVNC status page for service issues
  8. If none of the previous steps helped, restart the VNC Server itself and the computer, which is running it.

If you have gone through all the above steps but you are still experiencing a problem, then log a support ticket with RealVNC here.

VNC Viewer the Connection was Refused by the Computer

Reasons why you may get a “connection was refused” error:

VNC Viewer connection was refused

  1. The VNC server is not runningMake sure you log in with the correct user/password combination. When running the vncserver command, set the password as the correct user. Also make sure the server is started by using service vncserver start.
  2. VNC not running on the specified port rangeThe default VNC port is 5900. Make sure the VNC Server is configured to use that port. If you are using multiple displays you can use any port from 5901. Use /usr/bin/vncserver to edit the port.

VNC Connection Refused 10061

Possible reasons why you’re experiencing this problem:

  1. VNC server is not running
    Simply restart the service using the “service vncserver start” command.
  2. Firewall denying access
    Make sure that ports 5800 and 5900 are open on your firewall. If you use additional displays, make sure to open those ports too, for example 5801 and 5901 ports for the first display, 5802 and 5902 for the second one.
  3. VNC user’s IP is denied
    If the IP of the user is listed in /etc/hosts.deny you will not be able to connect. To rectify this, simply remove the blocked IP from the list and add it to /etc/hosts.allow instead.

Unable to Connect to VNC Server Using Your Chosen Security Setting

Common reasons for this error include:

  1. The encryption settings for a direct connection between the Server and the Viewer are not compatible.
  2. The version of VNC server may not support encryptionUnable to connect to VNC server using your chosen security setting

Sometimes you can see the “No Matching Security Types” error message because of these reasons.

To try to resolve this, check for the latest versions of the VNC Connect and VNC Server applications and make sure to upgrade accordingly.

If that doesn’t resolve the problem, change your VNC Server encryption parameter to one of the other settings other than AlwaysOff. Also change the VNC Viewer Encryption to Server, PreferOn or PreferOff.

VNC authentication failure

If VNC Viewer error ”The too many authentication failures” is experienced, this could indicate that someone is using brute force attacks to try and gain access to your server.

If you need to regain access to your VNC, follow these steps:

  1. Login using SSH.
  2. Use #pgrep vnc to retrieve the current VNC session ID.
  3. Kill the session using #kill XXXX where XXXX is the ID revealed in step 2.
  4. Use #vncserver to restart the VNC Session.

To prevent this from happening again, block all public IPs on your firewall with exception to those known / required IPs. This however will only work with static IPs.

  1. To list your current active firewall rules, use #iptables -L.
  2. To allow a specific port, i.e 5901, use # iptables -I INPUT -p tcp -s your-ip --dport 5901 -j ACCEPT.
  3. Now block all other IPs using # iptables -A INPUT -p tcp -s 0.0.0.0/0 --dport 5901 -j DROP.

VNC connection closed unexpectedly

If you get a “Connection closed unexpectedly” error, check the following:

  1. Make sure the VNC server and clients are allowed by the firewall.
  2. Is the VNC port correct?
  3. Confirm you are using the right password.

If previous steps didn’t work, you need to check the logs. An “Error during RFB initialization” means that you need to uninstall all display drivers incompatible with the VNC Server.

To check logs do next:

  1. Open Event Viewer.
  2. Select Windows Logs > Application.
  3. Select Filter Current Log.
  4. Choose VNC Server as the Event sources.

error

Another reason for this error may be because your version of Windows and VNC are incompatible. If you’re on Windows 7 or above, your version of RealVNC must be v5 or greater.

Best Reliable Alternative to VNC Viewer

 

If you’re encountering difficulties with VNC Viewer, HelpWire is a viable, free remote desktop solution worth considering. This free alternative to VNC Viewer provides essential tools for efficient customer support on both Mac and PC, accessible from anywhere. Notably, HelpWire is freely available for both personal and business use. It features a user-friendly interface, which allows for easy and quick setup of remote support sessions, reducing the complexity typically associated with such configurations.

Key Features of HelpWire:

Cross-Platform Remote Support: HelpWire facilitates smooth assistance for users on both Windows and macOS, offering compatibility and ease of use across various operating systems.
Customizable Performance: Tailor the settings to enhance data transfer speeds or improve the remote screen resolution, meeting diverse support needs.
Efficient Support Session Initiation: Teams can swiftly start support sessions using a unique HelpWire client application link, making the connection process more straightforward.
Hassle-Free File Sharing: Easily transfer files to and from remote client devices, improving the support experience.
Advanced Client Management: The operator account in HelpWire includes comprehensive features for client management, aimed at increasing user satisfaction.

FAQ

For users of macOS Mojave (10.14) upwards, you must give explicit permission to VNC Connect for Screen Recording and Accessibility. Without it, you will see a blank screen, or only have view access when using VNC Viewer.

To allow screen recording, go to System Preferences > Security & Privacy > Privacy > Screen Recording.
Accessibility options can be amended here: System Preferences > Security & Privacy > Privacy > Accessibility.

VNC only works when there is a monitor physically connected. If you connect to a headless computer (a computer with no monitor attached) or if the server’s HDMI/Display port is connected but powered off – you will be faced with a black screen when you try to connect to the server. The VNC Server uses DirectX to capture graphical updates, but without a monitor, Windows is unable to report any updates and therefore you will only see a black screen.

Some steps to resolve this problem:

  1. Version 6.5.0 of VNC Server includes an upgrade to recover from a blank screen, upgrade to at least this version.
  2. Adjust your power settings on the server to never turn off the display.
  3. Disable any Battery Saver modes on the server.
  4. Use an EDID emulator.
  5. Make the following changes on the VNC Server CaptureMethod parameter.
    • ◦ Open the VNC Server on the server machine.
    • ◦ Click on the menu and select Options.
    • ◦ Locate CaptureMethod in the Expert tab and change the value to 1.
    • ◦ Restart the VNC Server.
To Copy and Paste during a VNC session works the same as usual. Windows users can use the Ctrl+C, Ctrl+V combination. Mac Users use Cmd+C and Cmd+V. If however your server is a Mac and you’re connecting from a Windows machine, you need to press Alt+C instead of Cmd+C.

Copy and Paste only works with text. You cannot copy images, drag-and-drop files or other non-text items.

Should you experience any problems consider the following:

  1. If you have copied a large amount of data that exceeds 256kb, you will not be able to paste it. Instead the most recent item in the Clipboard will be pasted.
  2. It is possible that the copy/paste feature has been disabled on your VNC Server. You can check by accessing the global permissions from the VNC Server Options > Users & Permissions menu.
  3. The ability to copy and paste may be user specific. Check if you have permissions in the VNC Server Options > Users & Permissions settings screen.
If you can’t see the mouse during a VNC session, or you can only see a dot, then the most likely explanation is that there is no mouse connected to the VNC Server. The easiest way, if you have access, is to attach a mouse to the server. If you can’t do this, then try changing the VNC Server settings as follows:

Windows 10 Users:
Enable the “Use numeric keypad to move mouse around the screen” option from Start > Settings > Ease of Access > Mouse.

Windows 7 Users:
Open the Control Panel and select Mouse. From the “Pointer Options” tab, toggle the “Display pointer trails” option on or off. Click Apply to save your changes.