用的好好的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. iOS import framework头文件时报错could not build module xxx

    导致这个错误的原因有多种: 1.库的search paths没有设置对. 2.库里面某些头文件找不到. 而导致.h头文件找不到的原因也有多种: (a)search paths没设置对,文件可能换过位置 ...

  2. ASP.net MVC 基于角色的权限控制系统的实现

    一.引言 我们都知道ASP.net mvc权限控制都是实现AuthorizeAttribute类的OnAuthorization方法. 下面是最常见的实现方式: public class Custom ...

  3. MailKit---如何知道文件夹下有多少封未读邮件

    如果在mailkit中,文件夹已经选中并打开了的话,那直接使用ImapFolder.Unread属性就可以获取到有多少封未读邮件了. 如果文件夹没有打开,那么你还可以使用查询状态的方法来获取未读状态的 ...

  4. httpd.conf详细解释

    httpd.conf详解  http://www.php100.com/html/webkaifa/apache/2009/0418/1192.html

  5. python开发微信支付学习记录(转)

    前言 微信支付是由微信及财付通联合推出的移动支付创新产品.如今,随着微信支付的全面开放,相关需求也越来越多,很多开发人员进行微信支付开发及商家申请微信支付时,面临着诸多疑惑. 要想开发顺利进行,首先要 ...

  6. domino数据同步到sql server

          近期有个需求,要同步domino数据到selservlet数据库,查看几年前ls使用odbc写的同步功能,还能正常使用.而且加入读者域进去功能(之前没有这个需求).改进成网页配置版本号(曾 ...

  7. ubuntu 查看系统服务的列表

    service --status-all

  8. 2017.9.5 postgresql加密函数的使用

    需要安装的插件的名字:pgcrypto 官网地址:https://www.postgresql.org/docs/9.4/static/pgcrypto.html stackoverflow: htt ...

  9. spring 配置多数据源 (案例)

    *.properties配置: <!--数据连接配置一--> jdbc.type=mysqljdbc.driver=com.mysql.jdbc.Driverjdbc.url=jdbc:m ...

  10. Elasticsearch教程(六) elasticsearch Client创建

    Elasticsearch  创建Client有几种方式. 首先在 Elasticsearch  的配置文件 elasticsearch.yml中.定义cluster.name.如下: cluster ...