ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Can't connect to X11 window server using DISPLAY variable

Can't connect to X11 window server using DISPLAY variable

原创 Linux操作系统 作者:zhanglei_itput 时间:2009-03-05 13:17:09 0 删除 编辑

今天一个同事问我在安装数据库的时候出现了
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window
server using ':0.0' as the value of the DISPLAY variable.

这个错误是为什么,其实我知道是由于当前用户不是oracle或者环境变量设置的不正确导致的,因为每次都是用oracle用户解压,安装,没有遇到这个问题,所以也没有仔细研究过这个错误,今天正好同事问到我这个问题,如果不回答清楚了显的我很不专业,呵呵,在这里简单说明一下自己的理解:

cause:
X-Windows emulation is not yet correctly configured or is being mis-used.
solution:
1.Make sure that "DISPLAY” is set properly as either:
     :0.0
          or
     :0.0
note:In this example, ip_address/hostname is the host name or IP address of the system that you want to use to display Oracle Universal Installer (your workstation or PC).
eg.[root@rac1 ~]# xhost +
access control disabled, clients can connect from any host
[root@rac1 ~]# su - oracle
[oracle@rac1 ~]$ export DISPLAY=192.16.2.98:0.0
[oracle@rac1 ~]$ cd database/
[oracle@rac1 database]$ ./runInstaller
Starting Oracle Universal Installer... 
Checking installer requirements... 
Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
                                      Passed 
All installer requirements met. 
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-03-05_03-36-28PM. Please wait ...[oracle@rac1 database]$ Oracle Universal Installer, Version 10.2.0.1.0 Production
Copyright (C) 1999, 2005, Oracle. All rights reserved.

2. Oracle Customer Support has seen instances where use of the UNIX/Linux “su” command, even “su - oracle” has caused this “Can't connect to X11 window server” error. Therefore, please be sure that you are LOGGED ON as the oracle account. Log directly into the install session. Do not use any variety of “su”.
     use oracle log on , not "su - oracle"
eg. [oracle@rac1 database]$ ./runInstaller

3.Oracle Customer Support has seen instances where the incorrect “ulimit” setting for number of files (aka “-n”, aka “nofiles”) has caused this “Can't connect to X11 window server” error. Therefore, please be sure that your values for “nofiles” in the output of “ulimit -a” is at least 65536.

备注:前2个办法只需要满足其中一个就可以避免这个错误了:直接用oracle登陆,不能su - oracle  or 设置display=ip_address_that you want to use to display Oracle Universal Installer :0.0

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9252210/viewspace-561498/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-02-10

  • 博文量
    400
  • 访问量
    1117171