Error thrown indicating Spectrum account cannot connect to X11 Window Server when running SCP
search cancel

Error thrown indicating Spectrum account cannot connect to X11 Window Server when running SCP

book

Article ID: 220807

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

When trying to run Spectrum Control Panel (SCP) after setting the DISPLAY variable, an error is thrown that shows that this account cannot connect to the X11 window server (and so cannot run X11 GUI applications such as the SCP):

~/Spectrum/bin$ ./SCP

Exception in thread "main" java.awt.AWTError: Can't connect to X11 window server using 'localhost:0' as the value of the DISPLAY variable.

at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)

at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)

at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115)

at java.security.AccessController.doPrivileged(Native Method)

at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:264)

at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)

at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)

at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:132)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:264)

at java.awt.Toolkit$2.run(Toolkit.java:860)

at java.awt.Toolkit$2.run(Toolkit.java:855)

at java.security.AccessController.doPrivileged(Native Method)

at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854)

at javax.swing.ImageIcon.<init>(ImageIcon.java:198)

at javax.swing.ImageIcon.<init>(ImageIcon.java:217)

at com.aprisma.spectrum.app.swing.image.JarImageRetriever.retrieveImage(JarImageRetriever.java:56)

at com.aprisma.spectrum.app.swing.image.ImageMap.retrieveImage(ImageMap.java:394)

at com.aprisma.spectrum.app.swing.image.ImageMap.getImage(ImageMap.java:175)

at com.aprisma.spectrum.app.swing.image.ImageMap.getImage(ImageMap.java:103)

at com.aprisma.spectrum.app.controlpanel.ControlPanel.cpMain(ControlPanel.java:4465)

at com.aprisma.spectrum.app.controlpanel.ControlPanel.main(ControlPanel.java:4633)

 

Environment

Release : 20.2

Component : Spectrum Core / SpectroSERVER

Resolution

When trying to run SCP and add users, the Spectrum Control Panel (SCP) must be run as the spectrum install user account. If it is run as any other account, including root, then the user will not be able to run the commands since that user is not modelled in Spectrum as the admin user. And you will end up with the error shown above.

To fix this, add the spectrum user account to the X11 Xauth system.