如何排除 TigerVNC 连接故障?

如何排除 TigerVNC 连接故障?

对于这个模糊的主题,我深表歉意,但我在使用 VNC 时遇到了一些问题,我真的很想了解如何更好地解决这个问题。

我有两台服务器,hercules 和 Hermes:

# hercules
root@hercules:/var/log# cat /etc/*release*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=21.10
DISTRIB_CODENAME=impish
DISTRIB_DESCRIPTION="Ubuntu 21.10"
PRETTY_NAME="Ubuntu 21.10"
NAME="Ubuntu"
VERSION_ID="21.10"
VERSION="21.10 (Impish Indri)"
VERSION_CODENAME=impish
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=impish
root@hercules:/var/log# dpkg -l | grep tiger
ii  tigervnc-common                               1.11.0+dfsg-2ubuntu1                       amd64        Virtual network computing; Common software needed by servers
ii  tigervnc-standalone-server                    1.11.0+dfsg-2ubuntu1                       amd64        Standalone virtual network computing server
# hermes
-bash-5.0# cat /etc/*release*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.4 LTS"
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
-bash-5.0# dpkg -l | grep tiger
ii  tigervnc-common                            1.10.1+dfsg-3                       amd64        Virtual network computing; Common software needed by servers
ii  tigervnc-standalone-server                 1.10.1+dfsg-3                       amd64        Standalone virtual network computing server

在我的工作站上:

# dpkg -l | grep tiger
ii  tigervnc-viewer                                  1.11.0+dfsg-2+deb11u1            amd64        Virtual network computing client for X

当我连接到 Hermes 时,它工作正常,但对于 Hercules 我要么收到错误,例如 在此输入图像描述

或者我进入登录屏幕,输入用户/密码并看到一个黑色矩形。在这两种情况下,日志中都没有错误详细信息。 Hercules 上的 VNC 服务器是这样启动的:

root@hercules:/var/log# cat /etc/systemd/system/[email protected]
[Unit]
Description=XVNC Per-Connection Daemon

[Service]
ExecStart=-/usr/bin/Xvnc -inetd -query localhost -geometry 1920x1080 -once -SecurityTypes=None -Log="*:stderr:100"
User=nobody
StandardInput=socket
StandardError=syslog

root@hercules:/var/log# grep -i vnc syslog
...
Sep 20 12:15:59 hercules systemd[1]: Started XVNC Per-Connection Daemon (192.168.50.29:49552).
Sep 20 12:15:59 hercules systemd[1]: [email protected]:5900-192.168.50.29:49552.service: Deactivated successfully.
Sep 20 13:36:23 hercules systemd[1]: /etc/systemd/system/[email protected]:6: Special user nobody configured, this is not safe!
Sep 20 13:36:23 hercules systemd[1]: /etc/systemd/system/[email protected]:8: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Sep 20 13:36:23 hercules systemd[1]: Started XVNC Per-Connection Daemon (192.168.50.29:50658).
Sep 20 13:36:23 hercules systemd[1]: [email protected]:5900-192.168.50.29:50658.service: Deactivated successfully.

我使用相同的日志参数运行客户端:

# xtigervncviewer -Log "*:stderr:100"

TigerVNC Viewer 64-bit v1.11.0
Built on: 2022-01-26 17:59
Copyright (C) 1999-2020 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.

Tue Sep 20 12:11:21 2022
 DecodeManager: Detected 8 CPU core(s)
 DecodeManager: Creating 4 decoder thread(s)
 TcpSocket:   Connecting to hercules [192.168.50.157] port 5900
 CConn:       Connected to host hercules port 5900
 CConnection: reading protocol version
 CConnection: Server supports RFB protocol version 3.8
 CConnection: Using RFB protocol version 3.8
 CConnection: processing security types message
 CConnection: Server offers security type None(1)
 CConnection: Choosing security type None(1)
 CConnection: processing security message
 CConnection: processing security result message
 CConnection: processing security result message
 CConn:       read: Connection reset by peer (104)

我可以在哪里获取有关出错的更多信息吗?

相关内容