Xlib: connection to ":1.0" refused by server 解决方法

使用VNC连接服务器,安装Oracle时的

报错:

[oracle@localhost database]$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 80 MB.   Actual 7164 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 2000 MB    Passed
Checking monitor: must be configured to display at least 256 colors
    >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set.    Failed <<<<

Some requirement checks failed. You must fulfill these requirements before

continuing with the installation,

Continue? (y/n) [n] y


>>> Ignoring required pre-requisite failures. Continuing...
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-07-06_10-41-54AM. Please wait ...[oracle@localhost database]$ Xlib: connection to ":1.0" refused by server
Xlib: No protocol specified

Exception in thread "main" java.lang.NoClassDefFoundError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:164)
        at java.awt.Toolkit$2.run(Toolkit.java:821)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
        at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)
        at com.jgoodies.looks.LookUtils.<clinit>(Unknown Source)
        at com.jgoodies.looks.plastic.PlasticLookAndFeel.<clinit>(PlasticLookAndFeel.java:122)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783)
        at javax.swing.UIManager.setLookAndFeel(UIManager.java:480)
        at oracle.install.commons.util.Application.startup(Application.java:758)
        at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164)
        at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
        at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265)
        at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114)
        at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132)

 

解决方法:

出现错误提示:“Xlib: connection to ":1.0" refused by server”

如下处理:

实用技巧:在Linux下设置xhost方法步骤

    第一步:用root登陆linux,启动vnc服务;

    第二步:根据vnc起来的端口,设置export DISPLAY=localhost:1(1表示vnc在第一个tty上启动的),vnc的启动信息如下:

 
  1. [root@localhost ~]# vncserver   
  2.   
  3. New 'localhost:1 (root)' desktop is localhost:1  
  4.   
  5. Starting applications specified in /root/.vnc/xstartup   
  6. Log file is /root/.vnc/localhost:1.log   
  7.   
  8. [root@localhost ~]# export DISPLAY=localhost:1    
  9. [root@localhost ~]# xhost +   
  10. access control disabled, clients can connect from any host  
[root@localhost ~]# vncserver

New 'localhost:1 (root)' desktop is localhost:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost:1.log

[root@localhost ~]# export DISPLAY=localhost:1 
[root@localhost ~]# xhost +
access control disabled, clients can connect from any host

  

    第三步:执行xhost +,并且提示“access control disabled, clients can connect from any host”才正确。 

使用上诉方法就可以搞定。

内容参考:http://bluestar.iteye.com/blog/252792

 

还有个问题,在服务器在图形界面里,直接启动的Oracle页面不停的刷新,根本点不到确认按键~~    不知道问题出在哪里~~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值