Oracle GUI Installation Issues
Oracle GUI Installation Issues
ExaGridDba
Database Administration
By Brian Fitzgerald
Introduction
This is for DBAs on who want to use Oracle X-windows based tools such as OUI or DBCA.
Techniques described here can lead to a smooth installation experience. Beyond just a cookbook,
this blog article also demonstrates the principles behind X forwarding. Red Hat Linux on AWS EC2
is presented here as an example platform.
X-windows
The X windows system consists of a server, a display, and clients. The X server accepts requests
for graphical output from the clients and renders those requests on the display. In older usage, the
server and the client processes usually ran on the same host, a desktop Unix system. In the
present context, the X server runs on your Windows PC and displays to your screen. The X server
usually listens on TCP port 6000.
In X-windows lingo, applications and utilities are called clients. In the present context, clients run
on the Oracle host system, an instance of AWS EC2. Examples of clients include xterm and
Oracle Universal Installer (OUI), which run on separate server hardware. Our objective, therefore,
is to have an Oracle installation tool, such as OUI, and connect back to the X server on your PC
so you can view and control the graphical user interface (GUI). Paradoxically, the X server does
not run on “server” hardware, but on your windows PC. This table should clear up any confusion.
Hardware PC server
The client application connects to the X server via sshd on Linux and via PuTTY on your PC.
AWS EC2
Red Hat Linux on Amazon EC2 is presented as an example platform. AWS EC2 instances are built
from an available Amazon Machine Image (AMI). For an Oracle installation, be sure to choose an
https://exagriddba.wpcomstaging.com/2019/08/12/x-windows-for-oracle-dbas/ 1/17
06/04/2021 X windows for Oracle DBAs | ExaGridDba
AMI with a supported processor type, such as Intel x86_64 (not ARM), and a supported operating
system, such as Red Hat (not Ubuntu or Amazon Linux).
The final step in EC2 launch is to select an existing key pair or create and download a new key
pair. A key pair file from AWS has extension .pem.
Linux packages
Linux package installs are required before you can run X clients. In addition, it is helpful to install
basic troubleshooting tools.
# yum -y update
Running yum update may get you a few new tools, such as lsipc and lsmem.
Depending on the AMI, you may find that basic Linux tools are missing. Installing those tools
makes troubleshooting easier. For example:
You want to set up a working X windows environment, but before you do, notice three things from
the login shell:
In /etc/ssh/sshd_config, check:
X11Forwarding yes
X11UseLocalhost no
After installing xauth, login using a new PuTTY session. On the first login, the following output will
appear:
Now recheck:
https://exagriddba.wpcomstaging.com/2019/08/12/x-windows-for-oracle-dbas/ 2/17
06/04/2021 X windows for Oracle DBAs | ExaGridDba
The “10” in DISPLAY refers to the offset from 6000. When you set your DISPLAY to localhost:10.0,
all X clients will connect to port 6010 by default.
The sshd process is listening on port 6010. You are going to run X-client application on the Linux
box. The client will connect to port 6010. The sshd process will forward the X-requests to your PC.
X server
There are several MS Windows-based X-servers available, Xming, for example. By default, the X
server listens on port 6000. Confirmation:
X server issues
Solution:
If you are using Xming, then install Xming fonts. For example: Xming-fonts-7-7-0-10-setup.exe
xdpyinfo
Behind the scenes, OUI runs xdpyinfo. If xdpyinfo is missing, this message will appear:
To get xdpyinfo, install package xorg-x11-utils. An example of normal OUI output is:
https://exagriddba.wpcomstaging.com/2019/08/12/x-windows-for-oracle-dbas/ 3/17
06/04/2021 X windows for Oracle DBAs | ExaGridDba
Warning: No xauth data; using fake authentication data for X11 forwarding.
Symptom:
The message is from the local ssh client, not the remote host. You can confirm this by referring to
package https://github.com/openssh/openssh-portable, file clientloop.c.
Fix:
Explanation.
mcookie a 128-bit random hexadecimal number for use with the X authority system
xterm issue
message:
Solution:
export LC_ALL=C
X libraries
The manual may instruct you to install certain X windows runtime libraries, or OUI may so instruct
you. The library list depends on the Oracle product and the version. Example:
If you have installed xterm, then you already have these dependent libraries.
mwm
mwm is the Motif Window Manager. It lets you move and resize windows. Without a window
manager, you may encounter situations where you have a dialog box waiting for input but is
inaccessible because it is behind another window. Here is the X root window after dragging three
windows to non-overlapping locations.
https://exagriddba.wpcomstaging.com/2019/08/12/x-windows-for-oracle-dbas/ 4/17
06/04/2021 X windows for Oracle DBAs | ExaGridDba
Network
The X windows display technique described here assumes that you can connect via the secure
shell (ssh) from your PC directly to the Oracle server host. The AWS EC2 instance has a Public IP
address that is reachable from your PC.
The X windows protocol is a very “chatty” protocol, meaning that clients make a high number of
small server requests. Chattiness makes every button press on the GUI respond very slowly.
Having a fast network connection is essential. One might give some thought to enabling SSH
compression; however, SSH compression does not mitigate the chattiness.
Enabling SSH compression will usually not result in a noticeable improvement in responsiveness.
https://exagriddba.wpcomstaging.com/2019/08/12/x-windows-for-oracle-dbas/ 5/17
06/04/2021 X windows for Oracle DBAs | ExaGridDba
In a prior section, xterm worked fine from the login shell (ec2-user). In practice, you will sudo to the
oracle account to execute runInsaller or dbca. You may also sudo to the grid account to run
gridSetup.sh. First, test xterm from the login account:
One thing you will notice here in this case is that the offset in the DISPLAY variable is 11. The
offset is not always 10, and depends on what port is available for X forwarding when you log in.
In this example, port 6010 was is in use when I logged in, so sshd started listening on port 6011
and set offset to 11.
If you try to run an X client across a sudo, you will get this error:
The DISPLAY environment setting did not carry over to the sudo shell. You can try setting
DISPLAY, but you will get a different error:
To fix the authorization error, copy .Xauthority from the login account to the oracle account:
To automate the copying, I added this code to the login user .bash_profile:
https://exagriddba.wpcomstaging.com/2019/08/12/x-windows-for-oracle-dbas/ 6/17
06/04/2021 X windows for Oracle DBAs | ExaGridDba
if [ -z "$DISPLAY" ] ; then
for port in {6010..6019} ; do
if netstat -ntl | grep -q :$port ; then
offset=$(( port - 6000 ))
export DISPLAY=localhost:$offset.0
break
fi
done
fi
To summarize, before sudo, copy .Xauthority from the login account to oracle. After sudo, set the
DISPLAY environment variable. Automate those settings in .bash_profile.
puttygen
To connect PuTTY from Windows to AWS EC2 you need to generate a Putty Private Key (PPK)
file. Start with the PEM (Privacy Enhanced Mail) file that you downloaded when you created your
EC2 instance. Startup PuTTY Key Generator (puttygen). Load the PEM file. Click Save private
key. Provide a name. Example:
us-east-1-key.pem
us-east-1-key.ppk
To establish a session with PuTTY, navigate the PuTTY screens and make these settings.
https://exagriddba.wpcomstaging.com/2019/08/12/x-windows-for-oracle-dbas/ 7/17
06/04/2021 X windows for Oracle DBAs | ExaGridDba
https://exagriddba.wpcomstaging.com/2019/08/12/x-windows-for-oracle-dbas/ 8/17
06/04/2021 X windows for Oracle DBAs | ExaGridDba
The private key file is the ppk file that you converted from the pem file.
X display location refers to the X server on your PC, and is usually localhost:0.0.
Instead of using PuTTy, you could use ssh. This example uses bash on Windows Subsystem for
Linux. The hypothetical hosts are lcl and rem.
lcl $ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/bf/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
https://exagriddba.wpcomstaging.com/2019/08/12/x-windows-for-oracle-dbas/ 9/17
06/04/2021 X windows for Oracle DBAs | ExaGridDba
bf@rem's password:
test
rem $ xdpyinfo | wc
287 1136 9544
sudo to oracle
https://exagriddba.wpcomstaging.com/2019/08/12/x-windows-for-oracle-dbas/ 10/17
06/04/2021 X windows for Oracle DBAs | ExaGridDba
copy .Xauthority
test
oracle@rem $ xdpyinfo | wc
287 1136 9544
oracle@rem $ cd /u01/download/oracle/em13400/
oracle@rem $ ./em13400_linux64.bin -J-Djava.io.tmpdir=/u01/tmp
Notes
DI SP L AY
P ORT S
https://exagriddba.wpcomstaging.com/2019/08/12/x-windows-for-oracle-dbas/ 11/17
06/04/2021 X windows for Oracle DBAs | ExaGridDba
F I LE
rem $ ls -l .Xauthority
-rw-------. 1 bf dba 100 Jul 6 17:41 .Xauthority
You can use ssh from the Windows command line to setup X forwarding via a tunnel at the
bastion. Identify the following items:
item example
ssh port 22
For example:
The bastion key file is the pem file that you downloaded when you created the EC2 instance
The local port is a free port on your PC that you will choose arbitrarily.
The oracle box is the private IP address or the oracle box that you want to ssh to.
Bastion user is your login on the bastion host, i.e. ec2-user.
bastionhost is the public IP address of your bastion host.
set DISPLAY=localhost:0.0
ssh -i us-east-1-key.pem -Y -p 3333 ec2-user@localhost
Warning: No xauth data; using fake authentication data for X11 forwardin
Last login: Tue Nov 19 02:50:02 2019 from ip-172-31-88-110.ec2.internal
Last login: Tue Nov 19 02:50:02 2019 from ip-172-31-88-110.ec2.internal
ec2-user@ip-172-31-95-14 ~$ xterm
The requirements for the bastion host are different from the oracle box.
Establishing ssh trust from the bastion to the oracle box is not required.
The tunneling session is not responsible for X forwarding. Option -X is not required.
Disabling X11Forwarding at the bastion does not disable X forwarding as described here
because the X11 forwarding happens at the Oracle host and in PuTTY.
The bastion login user does not have to be the same as the oracle box login user.
https://exagriddba.wpcomstaging.com/2019/08/12/x-windows-for-oracle-dbas/ 12/17
06/04/2021 X windows for Oracle DBAs | ExaGridDba
The bastion host does not have to be the same hardware or operating system architecture
as the oracle box. Amazon Linux works.
In some bastion EC2 systems, no configuration is required. ssh tunneling works out of the
box.
If the bastion /etc/ssh/sshd_config has “AllowTcpForwarding no”, then ssh tunneling is
disabled.
You do not need to log on to the bastion with an interactive shell. After the tunneling session is
established, you will not interact with it.
If you have a connection from Linux to the X11 port, usually 6000, on your PC, then you can
attempt X windows without X11 forwarding. You are going to set
DISPLAY=pc.dnsname.or.ipaddress:6000
“0.0.0.0:6000” refers to listening on port 6000 on all IP addresses on all network interfaces. If you
see
then your X server will not accept connections from outside your PC.
The addresses shown in this example are private IP addresses. If the oracle box and the PC are
not on the same private network, you cannot refer to this address.
or last:
The PC IP address is, therefore, 74.101.107.146. Instead of the IP address, you may refer to DNS
name. The DNS name appears when you login.
or from last:
real 0m10.029s
user 0m0.012s
sys 0m0.004s
If the nc connection times out, then an X-windows client will also time out.
real 2m7.366s
user 0m0.021s
sys 0m0.016s
If tcp_syn_retries = 6, then the TCP timeout works out to 127 seconds, calculated thus:
SYN_SENT lasting for a long time means that the connection is about to time out. runInstaller will
take more than twice as long as xterm does
to time out.
https://exagriddba.wpcomstaging.com/2019/08/12/x-windows-for-oracle-dbas/ 14/17
06/04/2021 X windows for Oracle DBAs | ExaGridDba
real 4m17.524s
user 0m2.835s
sys 0m0.303s
To save time, test your connection using nc, before attempting runInstaller.
dbca issues
Cause: The X server is down or not reachable. Troubleshoot as you would an xterm issue, such
as:
https://exagriddba.wpcomstaging.com/2019/08/12/x-windows-for-oracle-dbas/ 15/17
06/04/2021 X windows for Oracle DBAs | ExaGridDba
If you follow these steps one at a time and resolve issues as you go, it is less likely that you will
encounter difficulty when you try to run an Oracle tool
./runInstaller
Summary
It is extremely helpful to configure a proper Linux and X windows environment before attempting to
run an Oracle tool such as OUI. Commands nc, lsof, strace, traceroute, lsipc, and lsmem were
used while writing this blog article. From xorg-x11-utils, xlsclients and xev were used. From motif,
mwm was used. xauth is required for X windows. An oracle installation may require unzip and
xdpyinfo. Not all needed utilities installed by default. You must install them yourself.
If you Google “x windows forwarding not working” you will find cases where one person’s advice
works for one person and not another. Trying random tips and tricks without understanding can
lead to your own solutions that don’t work all the time, and enabling unnecessary options. To
improve understanding, I have added diagnostic output from netstat and lsof.
Be sure to understand that the X server runs on your PC and listens on port 6000 by default. On
the oracle box, sshd listens on port 6000 + an offset, often 10. Setting DISPLAY=localhost:10.0 will
lead X clients to connect to the sshd listening on port 6010 on the local host. sshd will forward the
X traffic back to the X server on your PC.
It is well to break up the setup and testing into multiple, simple steps, rather than attempting to
startup runInstaller in one go.
tl;dr
SHAR E T HIS:
LIKE T H I S :
Like
2 bloggers like this.
https://exagriddba.wpcomstaging.com/2019/08/12/x-windows-for-oracle-dbas/ 16/17
06/04/2021 X windows for Oracle DBAs | ExaGridDba
This entry was posted in 12c, 18c, 19c, AWS, cloud, database administration, ec2, Linux,
Networking, oracle by Brian Fitzgerald. Bookmark the permalink
[https://exagriddba.wpcomstaging.com/2019/08/12/x-windows-for-oracle-dbas/] .
https://exagriddba.wpcomstaging.com/2019/08/12/x-windows-for-oracle-dbas/ 17/17