zoukankan      html  css  js  c++  java
  • CentOS 8.2远程连接vncserver升级后1.10.1无法启动解决记录

    问题起源:手贱yum upgrade,重启服务器后无法使用vnc viewer远程连接

    查看状态

    # systemctl status vncserver@:1
    ● vncserver@:1.service - Remote desktop service (VNC)
       Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
       Active: failed (Result: exit-code) since Thu 2020-12-10 21:38:43 CST; 1h 5min ago
      Process: 1154 ExecStart=/usr/bin/vncserver_wrapper root :1 (code=exited, status=203/EXEC)
      Process: 1141 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill :1 > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
     Main PID: 1154 (code=exited, status=203/EXEC)

    12月 10 21:38:43 VM-0-9-centos systemd[1]: Starting Remote desktop service (VNC)...
    12月 10 21:38:43 VM-0-9-centos systemd[1]: Started Remote desktop service (VNC).
    12月 10 21:38:43 VM-0-9-centos systemd[1154]: vncserver@:1.service: Failed to execute command: No such file or directory
    12月 10 21:38:43 VM-0-9-centos systemd[1154]: vncserver@:1.service: Failed at step EXEC spawning /usr/bin/vncserver_wrapper: No such file >
    12月 10 21:38:43 VM-0-9-centos systemd[1]: vncserver@:1.service: Main process exited, code=exited, status=203/EXEC
    12月 10 21:38:43 VM-0-9-centos systemd[1]: vncserver@:1.service: Failed with result 'exit-code'.
    看官方文档发现升级后有变更,解决步骤整理如下:
    vim /etc/tigervnc/vncserver.users
        :1=root(窗口及默认用户)
    vim $HOME/.vnc/config
        session=gnome(远程桌面的名称,可在/usr/share/xsessions查看)
    restorecon -RFv /home/root/.vnc(有远程访问密码的需要执行)
    rm -f /etc/systemd/system/vncserver@:1.service(删除旧版本配置,不然无法启动)
    systemctl daemon-reload(重新加载配置文件)
    systemctl start vncserver@:1(启动)
    成功启动,无报错,查看状态OK:
    systemctl status vncserver@:1
    ● vncserver@:1.service - Remote desktop service (VNC)
       Loaded: loaded (/usr/lib/systemd/system/vncserver@.service; enabled; vendor preset: disabled)
       Active: active (running) since Thu 2020-12-10 22:46:46 CST; 9s ago
      Process: 18003 ExecStart=/usr/libexec/vncsession-start :1 (code=exited, status=0/SUCCESS)
     Main PID: 18009 (vncsession)
        Tasks: 1 (limit: 49372)
       Memory: 2.0M
       CGroup: /system.slice/system-vncserver.slice/vncserver@:1.service
               ‣ 18009 /usr/sbin/vncsession root :1

    12月 10 22:46:46 VM-0-9-centos systemd[1]: Starting Remote desktop service (VNC)...
    12月 10 22:46:46 VM-0-9-centos systemd[1]: Started Remote desktop service (VNC).

    重启服务器后远程连接依然可用,问题解决。

  • 相关阅读:
    《百闻牌》
    unity插件开发:dos(cmd)命令输入窗口
    Unity插件开发:使用ScriptedImporter优化Lua文件导入
    崩坏3 渲染分析和PBR展示
    Unity插件开发:SerializedObject/SerializedProperty——查找引用的资源
    Unity插件开发:PrefabUtility(二)--Prefab实例批量Apply
    ml-agent v0.3 win10安装和实践
    Unity文件、文件引用、meta详解
    Unity开发:开启Unity项目中VS工程的属性面板
    Unity宏+RSP文件定义宏
  • 原文地址:https://www.cnblogs.com/bmate/p/14118040.html
Copyright © 2011-2022 走看看