Oops!! Frustrated with VNC the connection was refused by the computer error?
One of the main reasons for the VNC connection refused by the computer error is, VNC server not running on the specified port.
At Bobcares, we get requests on VNC errors, as a part of our Server Management Services.
Today, we’ll see how our Support Engineers fix this.
Scenarios where VNC the connection refused by the computer error occurrs
VNC is a graphical desktop-sharing system in order to control another computer remotely. But there are scenarios where an error like VNC connection refused by the computer to occur while trying to connect.
The two main causes handled by our Engineers are:
- VNC Server not running
- VNC not running on the specified range of port.
The sample error message looks like
Today we are going to discuss how our Support Engineers fix it for our customers.
How we fix VNC the connection refused by the computer error
Recently one of our customers approached us saying that he is getting a connection refused by computer error when he tried to start vnc. Let us discuss how our Support Engineers resolve the error for our customers.
1. VNC server not running
On analyzing the server our Engineers found that the VNC server was not running.
And we found that the problem was that he tried to get in as the user newuser after installing the server and setting the password. But found that he logged in as root when he ran the command vncserver for starting a VNC server.
So we ran the vncserver command as newuser and set the password and then restarted the service using :
service vncserver start
This fixed the problem.
2. VNC not running on the specified range of port
Also, We recently handled a situation when a customer approached us with the same error. When checked, we found that he established a direct connection and he specified a port other than the default for VNC (5900) but didn’t configure VNC Server to use that port. So, our Engineers configured the VNC server to the specified port. We edited the port in:
/usr/bin/vncserver
This fixed the issue.
Note: Ports 5901 and upwards can use if you have multiple displays and the next consecutive port number for each display. Fix may vary depending on the OS and VNC (TightVNCTigerVNC, UltraVNC, etc).
Here we discussed only a few scenarios handled by our Support Engineers.
[Having trouble in fixing vnc errors? – Our Experts are available 24/7.]
Conclusion
In short, the VNC connection refused error may occur due to different reasons depending on OS, VNC, etc. In today’s write-up, we discussed this topic in detail and saw how our Support Engineers find the fix for different scenarios.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
GET STARTED
var google_conversion_label = «owonCMyG5nEQ0aD71QM»;
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.
VNC Server is Not Currently Listening for Cloud Connections
Step through the following checklist to resolve the problem:
- The remote computer or server must be connected to the Internet in order for you to connect to it.
- 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.
- Is “Allow cloud connections” checked in your VNC Server settings?
-
Have you selected the correct team for the remote computer?
- For subscription users, verify that you are attempting to join your computer with the correct paid-for team.
- If you’re using Linux, establish that the Linux display server protocol Wayland is disabled.
- Сheck the RealVNC status page for service issues
- 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:
- The VNC server is not running
Make 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 usingservice vncserver start
. - VNC not running on the specified port range
The 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:
- VNC server is not running
Simply restart the service using the “service vncserver start
” command. - 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. - 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:
- The encryption settings for a direct connection between the Server and the Viewer are not compatible.
- The version of VNC server may not support encryption
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:
- Login using SSH.
- Use
#pgrep vnc
to retrieve the current VNC session ID. - Kill the session using #kill XXXX where
XXXX
is the ID revealed in step 2. - 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.
- To list your current active firewall rules, use
#iptables -L
. - To allow a specific port, i.e 5901, use
# iptables -I INPUT -p tcp -s your-ip --dport 5901 -j ACCEPT
. - 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:
- Make sure the VNC server and clients are allowed by the firewall.
- Is the VNC port correct?
- 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:
- Open Event Viewer.
- Select Windows Logs > Application.
- Select Filter Current Log.
- Choose VNC Server as the Event sources.
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.
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:
- Version 6.5.0 of VNC Server includes an upgrade to recover from a blank screen, upgrade to at least this version.
- Adjust your power settings on the server to never turn off the display.
- Disable any Battery Saver modes on the server.
- Use an EDID emulator.
- 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:
- 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.
- 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.
- 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.
VNC the connection was refused by the computer, one of the essential clarifications behind the VNC relationship declined by the PC error is, VNC worker not running on the foreordained port.
At ARZHOST, we get requests on VNC errors, as a piece of our Server Management Services.
Today, we’ll see how our Support Engineers fix this.
Circumstances where VNC the connection dismissed by the PC error occurs
VNC is a graphical workspace sharing structure to control another PC remotely. VNC the connection was refused by the computer, In any case, there are circumstances where an error like VNC connection declined by the PC to occur while trying to interface.
The two central drivers distributed by our Engineers are:
- VNC Server not running
- VNC not running on the predefined extent of the port.
The model error message looks like. Today we will discuss how our Support Engineers fix it for our customers.
How we fix VNC the connection declined by the PC error
Actually one of our customers pushed toward us saying that he is getting a connection declined by PC error when he tried to start vnc. VNC the connection was refused by the computer, Permit us to discuss how our Support Engineers settle the screw up for our customers.
People also ask
Question # 1: How do I allow VNC connections?
Answer: Click “Advanced Settings”
Right-click “Inbound Rules” > New Rule.
Select Rule Type – Ports, click “Next”
Port type: TCP, 5900 – 5901, click “Next”
Allow the connection, click “Next”
Allow for networks Domain, Private, not Public. …
Service name “VNC”, click Finish.
Question # 2: How do I start a VNC server on Windows?
Answer: To start VNC Server: In Service Mode, select RealVNC > VNC Server from the Start menu. You may be required to confirm this operation.
Question # 3: How do I stop the VNC server?
Answer: To explicitly stop VNC Server: Under Windows, right-click the VNC Server icon in the Notification area and, from the shortcut menu, select Stop VNC Server.
1. VNC worker not running
On taking apart the worker our Engineers found that the VNC specialist was not running.
VNC the connection was refused by the computer, Also, we found that the issue was that he tried to get in as the customer’s new user resulting in presenting the worker and setting the mysterious word. In any case, discovered that he recognized it as root when he ran the request vnc server for starting a VNC specialist.
So we ran the vnc server request as a new user and set the secretive word and a while later restarted the help using:
organization vnc server start
This is an appropriate issue.
2. VNC not running on the foreordained extent of the port
In like manner, we actually dealt with a situation when a customer pushed toward us with a comparative slip-up. VNC the connection was refused by the computer, When checked, we found that he set up a prompt association and he showed a port other than the default for VNC (5900) anyway didn’t plan VNC Server to use that port. Thusly, our Engineers planned the VNC specialist to the predefined port. We adjusted the port in:
/usr/canister/vncserver
This legitimate the issue.
VNC the connection was refused by the computer, Ports 5901 and upwards can use if you have different grandstands and the accompanying consistent port number for each show. The fix may change dependent upon the OS and VNC. Here we two or three circumstances managed by our Support Engineers.
Termination
Along these lines, the VNC association denied misstep may happen due to different reasons depending upon OS, VNC, etc. in the current audit, VNC the connection was refused by the computer, we discussed this subject comprehensively and saw how our Support Engineers find the fix for different circumstances.
Category:
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit «Cookie Settings» to provide a controlled consent.
46 / 43 / 1 Регистрация: 02.07.2007 Сообщений: 2,413 |
|
1 |
|
04.11.2020, 18:16. Показов 21604. Ответов 11
Из Windows 7 пробую подключиться к серверу VNC, программа TightVNC выдаёт следующее сообщение: 10.90.14.88 — TightVNC Viewer Из LINUX через программу Remmina: Подключался к серваку по SSH и давал команду: Но это не сыграло никакой роли. Позавчера я благополучно подключался. Там у меня была цель настроить программу x2Go, но ведь действия Как растормошить VNC, чтобы заработало? Миниатюры
__________________
0 |
Programming Эксперт 94731 / 64177 / 26122 Регистрация: 12.04.2006 Сообщений: 116,782 |
04.11.2020, 18:16 |
Ответы с готовыми решениями: Можете подсказать что не так.Я недавно начал работать в матлабе,и еще не все знаю 500 ошибка на сервере, хотя в локалке все работало нормально Еще раз про setw: не определяется, хотя все файлы импортированы Зарегил новый домен,а выяснилось,что он ещё недавно существовал. 11 |
10931 / 6786 / 1815 Регистрация: 25.12.2012 Сообщений: 28,715 |
|
04.11.2020, 20:10 |
2 |
Сервер vnc на чем поднят?
1 |
46 / 43 / 1 Регистрация: 02.07.2007 Сообщений: 2,413 |
|
04.11.2020, 21:14 [ТС] |
3 |
ОС из семейства RedHat. [root@server ~]# ps -aux | grep vnc [root@server ~]# ps -aux | grep x11vnc
0 |
10931 / 6786 / 1815 Регистрация: 25.12.2012 Сообщений: 28,715 |
|
04.11.2020, 21:27 |
4 |
Покажите выхлоп: Код iptables -L netstat -tulpn systemctl status firewall
1 |
46 / 43 / 1 Регистрация: 02.07.2007 Сообщений: 2,413 |
|
04.11.2020, 21:51 [ТС] |
5 |
Код [root@server ~]# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination [root@server ~]# netstat -tulpn Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 7995/smbd tcp 0 0 0.0.0.0:3051 0.0.0.0:* LISTEN 1/systemd tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1721/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2159/master tcp 0 0 0.0.0.0:636 0.0.0.0:* LISTEN 13490/slapd tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 7995/smbd tcp 0 0 0.0.0.0:389 0.0.0.0:* LISTEN 13490/slapd tcp 0 0 127.0.0.1:8101 0.0.0.0:* LISTEN 16440/soffice.bin tcp6 0 0 :::139 :::* LISTEN 7995/smbd tcp6 0 0 :::111 :::* LISTEN 1/systemd tcp6 0 0 :::8080 :::* LISTEN 8210/java tcp6 0 0 :::22 :::* LISTEN 1721/sshd tcp6 0 0 :::636 :::* LISTEN 13490/slapd tcp6 0 0 :::445 :::* LISTEN 7995/smbd tcp6 0 0 127.0.0.1:8005 :::* LISTEN 8210/java tcp6 0 0 :::389 :::* LISTEN 13490/slapd tcp6 0 0 :::8009 :::* LISTEN 8210/java udp 0 0 10.90.14.88:123 0.0.0.0:* 1505/ntpd udp 0 0 127.0.0.1:123 0.0.0.0:* 1505/ntpd udp 0 0 0.0.0.0:123 0.0.0.0:* 1505/ntpd udp 0 0 10.90.14.63:137 0.0.0.0:* 1720/nmbd udp 0 0 10.90.14.88:137 0.0.0.0:* 1720/nmbd udp 0 0 0.0.0.0:137 0.0.0.0:* 1720/nmbd udp 0 0 10.90.14.63:138 0.0.0.0:* 1720/nmbd udp 0 0 10.90.14.88:138 0.0.0.0:* 1720/nmbd udp 0 0 0.0.0.0:138 0.0.0.0:* 1720/nmbd udp6 0 0 fe80::225:90ff:fe0f:123 :::* 1505/ntpd udp6 0 0 ::1:123 :::* 1505/ntpd udp6 0 0 :::123 :::* 1505/ntpd [root@server ~]# systemctl status firewall Unit firewall.service could not be found.
0 |
10931 / 6786 / 1815 Регистрация: 25.12.2012 Сообщений: 28,715 |
|
04.11.2020, 22:13 |
6 |
Ошибся: Код systemctl status firewalld И кстати не вижу, что запущено приложение/сервис, которое бы слушало порт
1 |
46 / 43 / 1 Регистрация: 02.07.2007 Сообщений: 2,413 |
|
04.11.2020, 22:42 [ТС] |
7 |
[root@server ~]# systemctl status firewalld ************************* Сделал следующие команды: Код [root@server ~]# systemctl start x11vnc У вас есть новая почта в /var/spool/mail/root [root@server ~]# systemctl status x11vnc ● x11vnc.service - Start x11vnc at startup. Loaded: loaded (/usr/lib/systemd/system/x11vnc.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Ср 2020-11-04 22:30:06 MSK; 4min 45s ago Process: 9906 ExecStart=/usr/bin/x11vnc --reopen --forever -auth /etc/vncpasswd (code=exited, status=1/FAILURE) Main PID: 9906 (code=exited, status=1/FAILURE) ноя 04 22:30:06 server x11vnc[9906]: Starting with x11vnc 0.9.9 you can have it try to guess by using: ноя 04 22:30:06 server x11vnc[9906]: -auth guess ноя 04 22:30:06 server x11vnc[9906]: (see also the x11vnc -findauth option.) ноя 04 22:30:06 server x11vnc[9906]: Only root will have read permission for the file, and so x11vnc must be run ноя 04 22:30:06 server x11vnc[9906]: as root (or copy it). The random characters in the filenames will of course ноя 04 22:30:06 server x11vnc[9906]: change and the directory the cookie file resides in is system dependent. ноя 04 22:30:06 server x11vnc[9906]: See also: http://www.karlrunge.com/x11vnc/faq.html ноя 04 22:30:06 server systemd[1]: x11vnc.service: main process exited, code=exited, status=1/FAILURE ноя 04 22:30:06 server systemd[1]: Unit x11vnc.service entered failed state. ноя 04 22:30:06 server systemd[1]: x11vnc.service failed. [root@server ~]#
0 |
12384 / 7223 / 758 Регистрация: 09.09.2009 Сообщений: 28,185 |
|
05.11.2020, 09:45 |
8 |
«простыня» из предыдущего сообщения гласит, что вы пытаетесь подключаться к незапущенному сервису…
1 |
Kubuntovod 2658 / 777 / 173 Регистрация: 14.01.2013 Сообщений: 3,586 |
||||||||
05.11.2020, 14:34 |
9 |
|||||||
Подключался к серваку по SSH и давал команду: На сервере можно и так посмотреть, слушает кто порт или нет. Если порт стандартный, то как-то так:
И если в выхлопе ничего нет, то и ломиться туда бесполезно. Надо искать причину незапуска VNC. А снаружи, тоже очень просто проверяется. Регулярно проделываю такой фокус:
Где последний аргумент, это ip сервера. Вот, когда nmap скажет, что порт — open, тогда и можно подключаться.
1 |
46 / 43 / 1 Регистрация: 02.07.2007 Сообщений: 2,413 |
|
05.11.2020, 15:50 [ТС] |
10 |
Как искать причину незапуска сервера VNC?
0 |
12384 / 7223 / 758 Регистрация: 09.09.2009 Сообщений: 28,185 |
|
05.11.2020, 16:48 |
11 |
Как искать причину незапуска сервера VNC? читать тут:
root@server ~]# systemctl status x11vnc
0 |
Kubuntovod 2658 / 777 / 173 Регистрация: 14.01.2013 Сообщений: 3,586 |
||||
05.11.2020, 16:51 |
12 |
|||
Как искать причину незапуска сервера VNC? В 7-м посте он Вам открытым текстом пишет, что у него не получилось и что он предлагает сделать для успеха. Если хотите, вот моя строка запуска:
0 |
IT_Exp Эксперт 87844 / 49110 / 22898 Регистрация: 17.06.2006 Сообщений: 92,604 |
05.11.2020, 16:51 |
Помогаю со студенческими работами здесь 3G-модем не коннектится:»Устройство отключено или недоступно», хотя в ДУ он есть.
Оптимизация кода, структуры базы, или что еще можно сделать что бы быстрее работало!? Есть куча связанных таблиц…. Почему ADO .Net не коннектится с dbf базой, а с ADODB всё проходит?
Что поменять чтобы все работало? Искать еще темы с ответами Или воспользуйтесь поиском по форуму: 12 |