VNC connect:Connection refused(10061)

在Windows机器上使用VNC Viewer访问Linux服务器,有时候会遇到"connect:Connection refused(10061)"这个错误,导致这个错误出现的原因有多重,下面总结一下:

1:使用VNC Viewer时忘记加桌面号(一般为IP:桌面号,桌面号要看你自己的配置而定。如10.20.34.76:2)

错误使用方法:

正确使用方法:

2:Linux服务器的vncserver服务没有启动。

如果vncserver服务没有启动,使用VNC Viewer访问时,就会出现"connect:Connection refused(10061)"错误。

3:配置问题导致VNC Viewer访问时,就会出现"connect:Connection refused(10061)"错误。

如下截图所示,一次配置VNC的配置文件是,顺手Copy注释部分做了一些修改,然后在Windows 使用VNC Viewer访问时,一直报"connect:Connection refused(10061)",检查vncserver服务、防火墙、配置文件的等等都OK,一直折腾了很久才发现,其实是因为配置文件部分地方弄错了,如下所示, Use "-localhost" to prevent remote VNC clients connecting except when doing so through a secure tunnel. See the "-via" option in the man vncviewer‘ manual page.

这个参数其实是禁止远程使用VNC Client登录VNC服务器。结果一不小心,自己狠狠把自己折腾了一把,自己被自己蠢哭了。

注意:网上有一些资料,说防火墙配置问题会导致"connect:Connection refused(10061)",但是以我的测试和遇到的案例,防火墙问题只会导致"connect: Connection timed out (10060)" .并不会出现10061这种错误的,当然也不排除是有些环境、平台我没有测试到。

时间: 2024-10-14 11:20:41

VNC connect:Connection refused(10061)的相关文章

linux下FTP拒绝(ftp: connect: Connection refused,500 OOPS: cannot read config file)

使用Ubunto15.0.4环境下,使用APT命令下载的vsftpd程序 在/etc/vsftpd.conf中开启匿名用户权限(anonymous_enable=YES),重新启动vsftpd后,在用ftp localhost,竟然会报ftp: connect: Connection refused的错误,使用sudo service vsftpd start,或sudo /etc/init.d/vsftpd start,竟然启动不起来.报500 OOPS: cannot read config

python代码在linux终端中执行报错:Unable to init server: Could not connect: Connection refused

python代码在linux终端中执行时报错: Unable to init server: Could not connect: Connection refused Unable to init server: 无法连接: Connection refused 解决办法: 在要执行的python文件里加入以下两句代码: 切记:在最开头添加. import matplotlib matplotlib.use('Agg') 原文地址:https://www.cnblogs.com/ming-4/

com.microsoft.sqlserver.jdbc.SQLServerException: 到主机 的 TCP/IP 连接失败。 java.net.ConnectException: Connection refused: connect

问题描述:最简单的数据库连接报错,到主机  的 TCP/IP 连接失败.(win 7 操作系统) 错误信息: com.microsoft.sqlserver.jdbc.SQLServerException: 到主机  的 TCP/IP 连接失败. java.net.ConnectException: Connection refused: connect package sqlconnect; import java.sql.*; public class sqlconnect { public

Android客户端连接tomcat时出错:connect failed: ECONNREFUSED (Connection refused)

public static final String BASE_URL = "http://127.0.0.1:8090/HelloWord/"...; 会抛异常Caused by: libcore.io.ErrnoException: connect failed: ECONNREFUSED (Connection refused) 解决方法: String url = "http://127.0.0.1:8090/HelloWord/"...;  修改成 pub

“psql: could not connect to server: Connection refused” Error when connecting to remote database

问题: I am trying to connect to a postgres database installed in a remote server using the following command: psql -h host_ip -U db_username -d db_name This the error that occurs: psql: could not connect to server: Connection refused Is the server runn

Could not connect to Redis at 192.168.0.129:6379: Connection refused

在虚拟机上(CentOS 6.7)本机连接自己的redis [[email protected] bin]# ./redis-cli -h 192.168.0.129 -p 6379 Could not connect to Redis at 192.168.0.129:6379: Connection refused Could not connect to Redis at 192.168.0.129:6379: Connection refused not connected> 查看配置文

我遇到的错误curl: (7) Failed to connect to 127.0.0.1 port 1086: Connection refused

今天我用curl命令,无论如何都是出现: curl: (7) Failed to connect to 127.0.0.1 port 1086: Connection refused 找了很久,不知道是什么问题,后来发现curl有一个配置文件: p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff } span.s1 { } ~/.curlrc 里

nginx connect() failed (111: Connection refused) while connecting to upstream,请求无响应错误

2015/01/02 16:01:36 [error] 29002#0: *714153 connect() failed (111: Connection refused) while connecting to upstream, client: 172.16.3.32, server: bizorder.qianbao666.com, request: "POST /api/queryOrder/orderList HTTP/1.1", upstream: "http:

Redis 服务端配置——Could not connect to Redis at 127.0.0.1:6379: Connection refused

[[email protected] 桌面]# redis-cli Could not connect to Redis at 127.0.0.1:6379: Connection refused Could not connect to Redis at 127.0.0.1:6379: Connection refused not connected> exit [[email protected] 桌面]# redis-server /etc/redis.conf [[email prote