用的好好的vncserver 突然遇到这个错误:

[vnc@localhost ~]$ sudo systemctl status vncserver@:1.service -l
● 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 日 2016-05-29 22:13:19 EDT; 6min ago
Process: 2888 ExecStart=/usr/sbin/runuser -l vnc -c /usr/bin/vncserver %i (code=exited, status=2)
Process: 1576 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)

5月 29 22:13:12 localhost.localdomain systemd[1]: Starting Remote desktop service (VNC)...
5月 29 22:13:19 localhost.localdomain systemd[1]: vncserver@:1.service: control process exited, code=exited status=2
5月 29 22:13:19 localhost.localdomain systemd[1]: Failed to start Remote desktop service (VNC).
5月 29 22:13:19 localhost.localdomain systemd[1]: Unit vncserver@:1.service entered failed state.
5月 29 22:13:19 localhost.localdomain systemd[1]: vncserver@:1.service failed.
5月 29 22:13:19 localhost.localdomain runuser[2888]: Warning: localhost.localdomain:1 is taken because of /tmp/.X11-unix/X1
5月 29 22:13:19 localhost.localdomain runuser[2888]: Remove this file if there is no X server localhost.localdomain:1
5月 29 22:13:19 localhost.localdomain runuser[2888]: A VNC server is already running as :1

查看日志的最后一行是“A VNC server is already running as :1”,

于是我就把/etc/systemd/system/下的 vncserver@:1.service 改成 vncserver@:2.service

执行:

# systemctl disable vncserver@:1.service

# systemctl daemon-reload

# systemctl start vncserver@:2.service

# systemctl enable vncserver@:2.service

查了一下:

# systemctl status vncserver@:2.service

运行状态是active:-)

# netstat -nlp | grep vnc

发现vncserver在监听 5902端口

这时运行 vncviewer, 访问 IP:5902, 成功,OK了。

Unable to VNC onto Centos server remotely的更多相关文章

  1. 解决loadrunner录制时 Request Connection: Remote Server @ 0.0.0.0:80 (Service=?) NOT PROXIED! (REASON: Unable to connect to remote server: rc = -1 , le = 0)问题

    环境为win7+ie8+loadrunner11,录制脚本回放查看Recoding log 出现如下错误:[Net An. Error    ( 7f8:1340)] Request Connecti ...

  2. org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within

    org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeo ...

  3. Unable to connect to zookeeper server within timeout: 5000

    错误 严重: StandardWrapper.Throwable org.springframework.beans.factory.BeanCreationException: Error crea ...

  4. CentOS7图形界面启动报错unable to connect to X server

    以前还可以正常启动图形界面,这次启动失败,报错unable to connect to X server 使用的是oracle用户,因为我是在oracle用户下创建的oracle数据库等 解决办法: ...

  5. Message Unable to connect to SQL Server '(local)'

    最近在sql server 加了一些job,但是run job的时候发生了一下错误: ssage Unable to connect to SQL Server '(local)' 问题根源:调用 T ...

  6. Unable to connect to the server: x509: certificate signed by unknown authority

    0x00 Problem 在使用二进制搭建 k8s 集群的过程中,使用 kubectl get 等操作时始终显示 x509: certificate signed by unknown authori ...

  7. Unable to connect to web server 'IIS Express'(无法连接到Web服务器“IIS Express”)的解决方式-Jexus Manager

    在运行微软示例工程eShopOnWeb时候, 在经过一段时间再运行启动报Error "Unable to connect to web server 'IIS Express'"  ...

  8. Caused by: org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 5000

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brandControl ...

  9. ROS-debug1 : 运行roscore时报错:Unable to contact my own server at...

    一.问题描述 在终端运行roscore时,出现错误:Unable to contact my own server at...,如下图: 二.解决方法 以上问题是由于ROS环境变量ROS_MASTER ...

随机推荐

  1. delphi 设置开机自动启动函数

    有些程序要设置为开机启动,所以自己写了个函数方便以后使用,供大家参考 procedure TMainForm.SetAutoRun(ok: boolean); var   Reg:TRegistry; ...

  2. ASIHTTPRequest学习(一)

    Creating a synchronous request 可以创建同步和异步两种方式的请求,一般情况下应当使用异步请求.使用同步请求主应用线程会锁住直至解锁为止. 创建异步请求,会在后台执行 - ...

  3. tomcat下载安装以及在eclipse中的配置

    eclipse的下载地址是http://www.eclipse.org/downloads/. tomcat的下载地址为http://tomcat.apache.org/ 这两个工具的安装都非常eas ...

  4. 16个Linux服务器监控命令

    在不同的Linux发行版中,会有不同的GUI程序可以显示各种系统信息,比如SUSE linux发行版中,就有非常棒的图形化的配置和管理工具YaST,KDE桌面环境里的KDE System Guard也 ...

  5. ZeroMQ使用学习记录(转)

    ZMQ简介 ZMQ(ØMQ.ZeroMQ, 0MQ)看起来像是一套嵌入式的网络链接库,但工作起来更像是一个并发式的框架.它提供的套接字可以在多种协议中传输消息,如线程间.进程间.TCP.广播等.你可以 ...

  6. androidmanifest

    在unity里面这个androidmanifest.xml 就相当于 buildsetting 里面的playersettings

  7. as well as

    一.as well 用法: 1.as well常用作状语,作“又:也”解,相当于too或also,常位于句末,无须用逗号与句子分开.如: I am going to London and my sis ...

  8. ElasticSearch 监控单个节点详解

    1.介绍 集群健康 就像是光谱的一端——对集群的所有信息进行高度概述. 而 节点统计值 API 则是在另一端.它提供一个让人眼花缭乱的统计数据的数组,包含集群的每一个节点统计值. 节点统计值 提供的统 ...

  9. rabbit mq 安装

    不知道为什么上不去erlang的官网,所以只能到中文社区来下载了. http://www.cnerlang.com/ 我下载的是下面这个版本 http://download.cnerlang.com/ ...

  10. SQL 根据表获取字段字符串

    SQLSERVER查询单个数据表所有字段名组合成的字符串脚本 --SQLSERVER查询单个数据表所有字段名组合成的字符串脚本 --应用场合: 用于生成SQL查询字符串中select 字段名列表1 f ...