Oracle Database Configuration Assistant (DBCA) will not start from the terminal.
Invalid MIT-MAGIC-COOKIE-1 keyException in thread "main" java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit
Invalid MIT-MAGIC-COOKIE-1 keyError: null
Oracle Net Services configuration failed. The exit code is 1
Red Hat 7+
Oracle 19c
Three possibilities:
xorg-x11-apps.x86_64
package is installedIf you connect to the server remotely, you need a terminal emulator. You also need to set the location where the GUI tools can display their output; you use the export display command for that. Run the following in the terminal:
su -l oracle
export DISPLAY=ip_address:display_number
The oracle user must be allowed to run binaries that open GUIs, such as Oracle installation and Oracle Database Configuration Assistant (DBCA). Run the following in the terminal:
su -l root
xhost +SI:localuser:oracle
After completing the above verifications, log in to the oracle user and launch the Oracle Database Configuration Assistant (DBCA):
su -l oracle
$ORACLE_HOME/bin/netca