您的位置:首页 > 运维架构 > Shell

redhat系统使用xshell连接后无法弹出界面

2015-08-24 11:31 831 查看
问题现象:系统安装在redhat系统,使用xshell连接后无法弹出界面,主要异常信息如下

Caused by: java.lang.NoClassDefFoundError: sun.awt.X11GraphicsEnvironment (initialization failure)

Caused by: java.lang.InternalError: Can't connect to X11 window server using '192.168.1.135:0.0' as the value of the DISPLAY variable.

技术分析:

1.查看X11日志

[root@redhat ~]$ tail -100 /var/log/Xorg.0.log

其中有异常信息

[ 1699.465] AUDIT: Thu Aug 20 16:24:02 2015: 1690: client 12 disconnected

[ 1958.614] AUDIT: Thu Aug 20 16:28:21 2015: 1690: client 12 rejected from local host ( uid=501 gid=501 pid=2051 )

2. 进一步查看hosts文件

[root@redhat ~]# cat /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

#127.0.0.1 redhat localhost.localdomain localhost

#::1 localhost6.localdomain6 localhost6

解决方案:发现localhost未有解析说明,尝试在hosts文件增加

127.0.0.1 localhost

再尝试打开界面脚本,可以正常打开界面
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: