VNC Viewer连接报错 Timed out waiting for a response from the computer

报错如下

在这里插入图片描述

排查&解决

检查监听情况:端口5901处于监听状态,监听IP是127.0.0.1。说明只能使用127.0.0.1进行连接,使用真实IP(非127.0.0.1)进行连接则失败,需要将监听IP修改为0.0.0.0

fivek@fivek-host:~$ vncserver -list

TigerVNC server sessions:

X DISPLAY #	RFB PORT #	PROCESS ID
:1		5901		4573
fivek@fivek-host:~$ netstat -ano | grep 5901
tcp        0      0 127.0.0.1:5901          0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp6       0      0 ::1:5901                :::*                    LISTEN      off (0.00/0/0)
fivek@fivek-host:~$ 

修改监听IP为0.0.0.0,使用 sudo vncserver -localhost no 命令即可将监听IP改为0.0.0.0

fivek@fivek-host:~$ sudo vncserver -localhost no

New 'fivek-host:1 (root)' desktop at :1 on machine fivek-host

Starting applications specified in /etc/X11/Xvnc-session
Log file is /root/.vnc/fivek-host:1.log

Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd /root/.vnc/passwd fivek-host:1 to connect to the VNC server.

fivek@fivek-host:~$ 
fivek@fivek-host:~$ netstat -ano | grep 5901
tcp        0      0 0.0.0.0:5901            0.0.0.0:*               LISTEN      off (0.00/0/0)
tcp6       0      0 :::5901                 :::*                    LISTEN      off (0.00/0/0)
fivek@fivek-host:~$ 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值