Troubleshoot Refused VNC Connection in CentOS 7
Troubleshoot Refused VNC Connection in CentOS 7
The other day I connected to my CentOS 7 computer from Windows via RealVNC Viewer. Everything went fine, but after I left the machines unattended for a short time, the connection froze to the point that I had to shut CentOS down and boot it again. When I tried to connect again, I got an error message saying something like “The connection was refused by the host computer” or similar, I can’t remember exactly. I rebooted CentOS several times, but nothing changed. Now I had to connect a monitor and the necessary peripherals to the box and start troubleshooting.
First, I checked the status of the VNC service:
[root@localhost Desktop]# systemctl status vncserver@:2.service -l
vncserver@:2.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/vncserver@:2.service; enabled)
Active: failed (Result: exit-code) since Sat 2015-02-28 14:37:00 CET; 10min ago Feb 28 14:37:00 localhost.localdomain systemd[1]: vncserver@:2.service: control process exited, code=exited status=2
Feb 28 14:37:00 localhost.localdomain systemd[1]: Failed to start Remote desktop service (VNC).
Feb 28 14:37:00 localhost.localdomain systemd[1]: Unit vncserver@:2.service entered failed state.
The VNC service apparently failed to start. If you don’t know why I used vncserver@:2.service
, please read my earlier post about configuring VNC. I tried to start the service, but it kept failing:
[root@localhost Desktop]# systemctl start vncserver@:2.service
Job for vncserver@:2.service failed. See 'systemctl status vncserver@:2.service' and 'journalctl -xn' for details.
As I was digging through the internet, I found some clues about corrupted session files that had to be deleted to solve this problem. The files were supposed to be in the /tmp/.X11-unix
directory (capital X11, Linux is case-sensitive!). When I checked the contents of /tmp, I found this:
There was no /.X11-unix
directory inside. The issue was, that this folder is hidden and such items can only be seen if you put -la
after ls
, like this:
Now I saw the folder I was looking for at the end of the list. Inside /.X11-unix
were the session files:
The corrupted file belonging to “vncuser”, the user I configured for VNC access, was X2. I removed it with the rm /tmp/.X11-unix/X2
command. Then, I started the service, rebooted the computer and I was able to seamlessly connect to my CentOS machine through VNC.
Troubleshoot Refused VNC Connection in CentOS 7的更多相关文章
- []: secureCRT连接ubuntu问题- The remote system refused the connection
secureCRT连接ubuntu问题- The remote system refused the connection http://jxyang.iteye.com/blog/1484915 解 ...
- SecureCRT远程连接The remote system refused the connection问题
今天用SecureCRT远程连接Linux(Centos 7)时,连不上,报错The remote system refused the connection.于是就百度,首先查看sshd服务有没有启 ...
- Listener refused the connection with the following error 错误解决
原文地址 :http://blog.csdn.net/zajin/article/details/17753351 做个备份: 查询数据库当前进程的连接数: select count(*) from ...
- 关于Oracle出现listener refused the connection with the ORA-12505错误,解决方案
出现listener refused the connection with the ORA-12505错误,解决方案: 1.首先重启一下电脑,释放被占用的1521端口 2.重启后打开Oracle D ...
- Connection to Oracle failed. [66000][12505] Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor .
我安装了Oracle数据库,默认的数据库用户名是system,密码口令是安装过程中你自己设置的.可以先使用命令框,输入 sqlplus system; 然后再输入密码即可. 然后我的数据库连接工具使用 ...
- Ubuntu secuerCRT连接失败,The remote system refused the connection.
新安装的ubuntu系统,securtCRT连接失败,出现下面结果,这是因为ubuntu没有安装工具. The remote system refused the connection. 解决办法: ...
- SecureCRT connecting VM Linux show error message: The remote system refused the connection.
SecureCRT connecting VM Linux show error message: The remote system refused the connection.
- SecureCRT连接Ubuntu报The remote system refused the connection.解决方案
使用SecureCRT连接到远程Ubuntu,连接失败报The remote system refused the connection. 进入Ubuntu系统,终端中敲入以下命令: ps -ef|g ...
- Hive中导入Oracle数据错误:Listener refused the connection with the following error: ORA-12505
问题: 今天往Hive中导入Oracle数据的时候碰到了如下错误:Listener refused the connection with the following error: ORA-12505 ...
随机推荐
- java学习第9天
形式参数和返回值的问题 (1)形式参数: 类名:需要该类的对象 抽象类名:需要该类的子类对象 接口名:需要该接口的实现类对象 (2)返回值类型: 类名:返回的是该类的对象 抽象类名:返回的是该类的子类 ...
- spark1.5.1环境搭建
今天一个小伙伴找我搞spark,搞了一个中午都没搭建好.心里痒痒的.索性自己重来了一遍. 本来很简单的事情,被这小子搞的老复杂了.究其原因,有以下几点: 下载的软件不对,我用的是这两个软件 spark ...
- 关于DCOM的安全性
关于DCOM的安全性 DCOM的安全性设置在注册表中. 2. 通过DCOMCNF.exe可以配置
- Mycat配置文件rule.xml
打开<MyCAT_HOME>/conf/rule.xml,对应的分片配置截取内容如下: <tableRule name="auto-sharding-rang-mod&qu ...
- kali 虚拟机开启mysql:3306 供主机访问.
mysql -u root -p use mysql; update user set host='ip' where user='root'; //更新访问权限 flush privileges; ...
- VC++双缓冲保持背景不擦除之实现
几天前,我终于克服了C++窗体重绘时的闪烁问题,用到的技巧就是双缓冲.但是怎样保持住已经绘制的图形呢?也就是仿照Windows自带的画图程序一般,动态的做出一条直线.最容易想到的方法是在MouseMo ...
- Azure DW
1. 安装环境a. 安装环境https://www.microsoft.com/web/downloads/platform.aspx b. InputImport-Module 'C:\Progra ...
- cadence学习之——原理图库的添加及器件的放置
画原理图,库是必不可少的,库有cadence自带的,也可以自己建自己的库,然后在画原理图工程时, 这些库都需要被添加进原理图工程才能使用. 1.库的添加 打开Place Part属性框,操作如下: ( ...
- 新创建的项目利用git添加远程仓库
git initgit remote add origin https:// //git账号中的网址 (git remote //可以查询添加的远程仓库) git add . //添加刚刚导入的整个工 ...
- 使用dynamic动态设置属性值与反射设置属性值性能对比
static void Main(string[] args) { int times = 1000000; string value = "Dynamic VS Reflection&qu ...