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

    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).

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

  • 相关阅读:
    什么是软件质量?
    软件生存周期及其模型是什么?
    给你一个网站,你如何测试?
    jquery中$.get()提交和$.post()提交有区别吗?
    JQuery有几种选择器?
    ajax和layui总结
    md5加密
    Collection接口相关介绍
    JS 中document.URL 和 windows.location.href 的区别
    window.location.href的用法(动态输出跳转)
  • 原文地址:https://www.cnblogs.com/xuanbjut/p/14266553.html
Copyright © 2011-2022 走看看