LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 05-31-2016, 11:07 PM   #1
rh.mahfuz
LQ Newbie
 
Registered: Feb 2016
Location: Singapore
Distribution: RedHat, CentOS, Solaris
Posts: 12

Rep: Reputation: Disabled
Can't connect to X11 window server using ':10.0' as the value of the DISPLAY variable.


Hi,

I am using LDOM in Solaris Server. Below are the the system information:

Code:
# uname -a
SunOS 5.10 Generic_147147-26 sun4v sparc SUNW,SPARC-Enterprise-T5220

# isainfo
sparcv9 sparc

# java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
Installed application on the server: Oracle Weblogic 12.2.1

I've installed Weblogic usng Generic Installer with GUI. During this installation I've enabled X11 and connect via putty without any issue. Below is the system scenario before installation: (weblogic is installed as "oracle" local user)

Code:

oracle$ echo $DISPLAY
localhost:10.0

oracle$ xhost +
access control disabled, clients can connect from any host

oracle$ java -jar fmw_12.2.1.0.0_wls.jar
--it open gui window in my windows without any issue.

oracle$ firefox &
--it also open firefox gui in my windows PC
Actual Problem:

After installation, when I am trying to run the weblogic configuration script it encounter below error and unable to open GUI window. I've also tried with VNC and still same:

ERROR:

Code:

oracle$ cd /export/home/oracle/Oracle/Middleware/Oracle_Home/oracle_common/common/bin/

oracle$ sh config.sh
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using 'localhost:10.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:110)
        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:195)
        at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
        at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:120)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:195)
        at java.awt.Toolkit$2.run(Toolkit.java:869)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:861)
        at sun.swing.SwingUtilities2.getSystemMnemonicKeyMask(SwingUtilities2.java:1937)
        at javax.swing.plaf.basic.BasicLookAndFeel.initComponentDefaults(BasicLookAndFeel.java:752)
        at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:434)
        at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:148)
        at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1589)
        at javax.swing.UIManager.setLookAndFeel(UIManager.java:536)
        at javax.swing.UIManager.setLookAndFeel(UIManager.java:576)
        at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1345)
        at javax.swing.UIManager.initialize(UIManager.java:1455)
        at javax.swing.UIManager.maybeInitialize(UIManager.java:1422)
        at javax.swing.UIManager.getDefaults(UIManager.java:656)
        at javax.swing.UIManager.put(UIManager.java:985)
        at com.oracle.cie.common.ui.gui.GUIHelper.initPLAF(GUIHelper.java:56)
        at com.oracle.cie.wizard.internal.cont.GUIContext.<clinit>(GUIContext.java:328)
        at com.oracle.cie.wizard.internal.cont.GUITaskContainer.createTaskContext(GUITaskContainer.java:107)
        at com.oracle.cie.wizard.internal.cont.GUITaskContainer.createTaskContext(GUITaskContainer.java:24)
        at com.oracle.cie.wizard.internal.cont.AbstractTaskContainer.init(AbstractTaskContainer.java:34)
        at com.oracle.cie.wizard.internal.cont.GUITaskContainer.init(GUITaskContainer.java:24)
        at com.oracle.cie.wizard.internal.engine.EmbeddedEngine.loadTaskContainer(EmbeddedEngine.java:459)
        at com.oracle.cie.wizard.internal.engine.EmbeddedEngine.configureMode(EmbeddedEngine.java:398)
        at com.oracle.cie.wizard.internal.engine.EmbeddedEngine.init(EmbeddedEngine.java:104)
        at com.oracle.cie.wizard.internal.engine.WizardControllerEngine.init(WizardControllerEngine.java:58)
        at com.oracle.cie.wizard.WizardController.createWizardEngine(WizardController.java:129)
        at com.oracle.cie.wizard.WizardController.<init>(WizardController.java:30)
        at  com.oracle.cie.wizard.WizardController.invokeWizardAndWait(WizardController.java:138)
        at com.oracle.cie.wizard.WizardController.main(WizardController.java:69)
I've already googled a lot but still no luck. There are simillar issue but not useful for this purpose.
Any help will be highly appreciated


Thanks
rh.mahfuz
 
Old 06-01-2016, 03:12 AM   #2
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,316

Rep: Reputation: Disabled
Code:
xhost +
This has to be set on computer you are connecting from, so the remote computer can display the application on your local display.
 
Old 06-01-2016, 03:39 AM   #3
rh.mahfuz
LQ Newbie
 
Registered: Feb 2016
Location: Singapore
Distribution: RedHat, CentOS, Solaris
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
Code:
xhost +
This has to be set on computer you are connecting from, so the remote computer can display the application on your local display.
Code:
 firefox &
is working only weblogic config.sh is not working
 
Old 06-01-2016, 05:22 AM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,797

Rep: Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425
Quote:
Originally Posted by Emerson View Post
Code:
xhost +
This has to be set on computer you are connecting from, so the remote computer can display the application on your local display.
Xhost has nothing to do with it.

All it does is allow ANYONE on the system access to the X server.... basically, turning off all security.

Normally the client system is using domain sockets, not TCP sockets, thus xhost will NOT suddenly permit connections.

It is sshd on the remote system that controls the limited TCP socket (normally only using localhost connections).

Now, for the problem. firefox is one of the applications that attempts to direct an existing firefox process to open windows. If firefox is running on Windows, being directed to open an X window may fail (I don't have a Windows box to try this on, so this part is conjecture).

The problem with weblogic, however, is different - weblogic on the remote system is NOT running as the user. I believe it running as the oracle user, which may not have access to the Xauthorization file, and not as the user login. This depends on how the putty login to the server is done, and how X forwarding is configured on the server (it is possible for it to be disabled for specific users via the "AllowUsers" options).

You might have to run the weblogic configuration tool in console mode.

Last edited by jpollard; 06-01-2016 at 05:32 AM.
 
Old 06-01-2016, 05:40 AM   #5
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,316

Rep: Reputation: Disabled
xhost has everything to do it if native X feature is used for remote application execution. Of course, if SSH is used for X forwarding xhost is not needed.
 
Old 06-01-2016, 09:23 AM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,797

Rep: Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425
Quote:
Originally Posted by Emerson View Post
xhost has everything to do it if native X feature is used for remote application execution. Of course, if SSH is used for X forwarding xhost is not needed.
NOPE.

Xhost is worthless. All it really does is disable security.

The standard installation does not enable TCP connections to the X server, and hasn't for almost 15 years.

Even when TCP connections were used routinely, xhost was bad security, and it was easy enough to transfer X authentication across the net.

Been doing that ever since X11 release 2.

Last edited by jpollard; 06-01-2016 at 09:25 AM.
 
Old 06-01-2016, 09:27 AM   #7
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,316

Rep: Reputation: Disabled
Well, I'm using it almost daily. Not over the internet, of course. I see no reason not to use it on trusted LAN. Besides, you can use xhost to enable just one IP address / hostname.
 
Old 06-01-2016, 10:19 AM   #8
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,797

Rep: Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425
There is no such thing as a "trusted lan". Specially when it includes a Windows based system.

Even "just one" allows anyone on that "one" (or anyone attached to the wire/wireless) to capture everything.

Been there, done that (well, actually, it was done to me).

The X protocol doesn't inherently support any security whatsoever. Originally, it included encryption - but the US export ban on encryption blocked that - so it had to be removed. Along with any comments/hooks/ whatever that could be used to support encryption. All authentication/passwords/messages are sent in clear text, available to any thing to capture.

ssh has been the best alternative - and it works. Some side benefits as well since the ssh protocol combines multiple X packets and compresses them, it reduces the traffic (more beneficial for long distance).

One last thing, the op reported that firefox worked fine over the connection.

Last edited by jpollard; 06-01-2016 at 10:21 AM.
 
Old 06-01-2016, 11:10 PM   #9
rh.mahfuz
LQ Newbie
 
Registered: Feb 2016
Location: Singapore
Distribution: RedHat, CentOS, Solaris
Posts: 12

Original Poster
Rep: Reputation: Disabled
@jpollard & @Emerson Thanks both of you for the reply.

I've logged into the system as oracle user and tring to run the configuration script as oracle user

Before I run the configuration script, I'd installed Weblogic using GUI and during GUI installation I'd logged in as oracle user and ran the installation script as oracle user. To run installation script I used below command

Code:
oracle$ java -jar weblogic-installer.jar
---It can open GUI installer without any issue.
.Xauthority file exist in both root and oracle user. Below is the file permission and content:

Code:
root# ls -al .Xauthority 
-rw-------   1 root     root         352 Jun  1 16:44 .Xauthority

oracle$ ls -al .Xauthority
-rw-------   1 oracle   other        416 Jun  2 11:07 .Xauthority

oracle$ vi .Xauthority
".Xauthority" [Incomplete last line] 5 lines, 416 characters (41 null)
^A^Rldg1.domain.com^B10^RMIT-MAGIC-COOKIE-1^P\244\371 :s^X\370^[9J\364^MB\330\270%^D^Rldg1.domain.com^B10^RMIT-MAGIC-COOKIE-1^P\244\371 :s^X\370^[9J\364^MB\330
\270%^D
[^A1^RMIT-MAGIC-COOKIE-1^P\327\235\304\237#\200l2\222<S\213^O<
o^A^Rldg1.doman.com^A1^RMIT-MAGIC-COOKIE-1^P\327\235\304\237#\200l2\222<S\213^O<
o^D
[^A2^RMIT-MAGIC-COOKIE-1^P\325u\250^N\3052\310w\276}bZv(K^]^A^Rldg1.domain.com^A2^RMIT-MAGIC-COOKIE-1^P\325u\250^N\3052\310w\276}bZv(K^]^A^Rldg1.domain.com^B11
^RMIT-MAGIC-COOKIE-1^P@U$^GS^Xfgh\350N\277\307w\234^_^A^Rldg1.domain.com^B13^RMIT-MAGIC-COOKIE-1^P\204\224\321z^M\220\211\2237\361\301rRPd]

[^A1^RMIT-MAGIC-COOKIE-1^P\327\235\304\237#\200l2\222<S\213^O<
o^A^Rldg1.domain.com^A1^RMIT-MAGIC-COOKIE-1^P\327\235\304\237#\200l2\222<S\213^O<
o^D
[^A2^RMIT-MAGIC-COOKIE-1^P\325u\250^N\3052\310w\276}bZv(K^]^A^Rldg1.domain.com^A2^RMIT-MAGIC-COOKIE-1^P\325u\250^N\3052\310w\276}bZv(K^]^A^Rldg1.domain.com^B11
^RMIT-MAGIC-COOKIE-1^P@U$^GS^Xfgh\350N\277\307w\234^_^A^Rldg1.domain.com^B13^RMIT-MAGIC-COOKIE-1^P\204\224\321z^M\220\211\2237\361\301rRPd]
I am using putty to login the system as oracle user and enabled X11 forwarding and X11 Display location as "localhost:0" inside putty. I've tried with other client like VNC and MobaXtem but result same. I didn't understand about "disabled for specific users via the "AllowUsers" options)" which specific user need to disable and where?

I am confused..... is it X11 display problem or something wrong with server/software version compatibility issue??

Thanks.
 
Old 06-02-2016, 12:41 AM   #10
rh.mahfuz
LQ Newbie
 
Registered: Feb 2016
Location: Singapore
Distribution: RedHat, CentOS, Solaris
Posts: 12

Original Poster
Rep: Reputation: Disabled
Its tricky but I've got the solution:

Its not X11/Display issue. I've changed some thing inside "config.sh file as below:

I've deleted "${JVM_D64}" form the below line:

before
Code:
JVM_ARGS="-Dpython.cachedir=/tmp/cachedir ${JVM_D64} ${UTILS_MEM_ARGS} ${SECURITY_JVM_ARGS} ${CONFIG_JVM_ARGS}"
after
Code:
JVM_ARGS="-Dpython.cachedir=/tmp/cachedir ${JVM_D64} ${UTILS_MEM_ARGS} ${SECURITY_JVM_ARGS} ${CONFIG_JVM_ARGS}"
After that I can run the script and can open the GUI confiscator. But still not yet done........

I can complete the configuration without any issue but Weblogic 12.2.1.0 required JDK 1.8 to run ./startWeblogic.sh or to open the administrative console http://hostname:7001/console

So I install JAVA 1.8 and then try to run the ./config.sh but getting same Display error (no matter whether I add or remove ${JVM_D64} )

To solve this I edit the config file to specify the JAVA_HOME location for JDK 1.7 :

Code:
JAVA_HOME=/usr/jdk/jdk1.7.0_80
JVM_ARGS="-Dpython.cachedir=/tmp/cachedir ${UTILS_MEM_ARGS} ${SECURITY_JVM_ARGS} ${CONFIG_JVM_ARGS}"
java -version will still show the the current version that is JAVA 1.8 only change inside the config.sh file. Both jdk1.7.0.80 and jdk1.8.92 directory are exist in my system.

Thats all and solved my issue.
 
Old 06-07-2016, 08:53 AM   #11
aidofitz
LQ Newbie
 
Registered: Jun 2016
Posts: 1

Rep: Reputation: Disabled
Hi,

I hit this same issue during WebLogic upgrades, and didn't want to be switching Java versions. After a lot of investigation we found that there is a Solaris issue that causes this behaviour. See below for details of Oracle documentation on this. Once we applied the recommend patch, the problems were resolved.

Hope this saves someone the days of work it took to get this sorted for us!!

Regards,

Adrian


https://support.oracle.com/epmos/fac...1&id=1545998.1 (may require support login)

APPLIES TO:

Oracle WebLogic Server - Version 10.3.1 to 12.1.2.0.0
SunOS
SYMPTOMS

The below error message could occur when using the configuration wizard in GUI mode on Solaris 10 update 10 by running <WLS_HOME>/common/bin/config.sh.

Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using 'xxx.xxx.xxx.xxx:0.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:110)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:74)
CHANGES

This worked but some Solaris patches have been installed then.

CAUSE

The installation of the "Patch #119059 revision 62" was the cause of this error.

This problem corresponds to unpublished defect 16226141 - CAN'T CONNECT TO X11 WINDOW SERVER AFTER APPLYING PATCH #119059-61 OR ABOVE

SOLUTION

Apply Solaris OS Patch #119059-64.
 
1 members found this post helpful.
Old 10-05-2016, 04:40 PM   #12
tctctctc
LQ Newbie
 
Registered: Oct 2016
Posts: 2

Rep: Reputation: Disabled
Where I can download that patch, it's not available in the oracle downloads.

Last edited by tctctctc; 10-05-2016 at 04:44 PM.
 
Old 10-05-2016, 04:43 PM   #13
tctctctc
LQ Newbie
 
Registered: Oct 2016
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by aidofitz View Post
Hi,

I hit this same issue during WebLogic upgrades, and didn't want to be switching Java versions. After a lot of investigation we found that there is a Solaris issue that causes this behaviour. See below for details of Oracle documentation on this. Once we applied the recommend patch, the problems were resolved.

Hope this saves someone the days of work it took to get this sorted for us!!

Regards,

Adrian


https://support.oracle.com/epmos/fac...1&id=1545998.1 (may require support login)

APPLIES TO:

Oracle WebLogic Server - Version 10.3.1 to 12.1.2.0.0
SunOS
SYMPTOMS

The below error message could occur when using the configuration wizard in GUI mode on Solaris 10 update 10 by running <WLS_HOME>/common/bin/config.sh.

Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using 'xxx.xxx.xxx.xxx:0.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:110)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:74)
CHANGES

This worked but some Solaris patches have been installed then.

CAUSE

The installation of the "Patch #119059 revision 62" was the cause of this error.

This problem corresponds to unpublished defect 16226141 - CAN'T CONNECT TO X11 WINDOW SERVER AFTER APPLYING PATCH #119059-61 OR ABOVE

SOLUTION

Apply Solaris OS Patch #119059-64.
Where I can download the solaris Patch

Last edited by tctctctc; 10-05-2016 at 04:44 PM.
 
Old 10-05-2016, 07:29 PM   #14
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Tribblix, Ubuntu/WSL
Posts: 9,761

Rep: Reputation: 459Reputation: 459Reputation: 459Reputation: 459Reputation: 459
Solaris patches are downloadable from MOS (My Oracle Support).

Note that you need a valid support contract to download them.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] kdm causes Can't connect to X11 window server using ':0' as the value of the DISPLAY mattca Slackware 7 12-02-2013 11:24 AM
Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. defa0009 Linux - General 13 01-20-2012 02:55 PM
Can't connect to X11 window server using ':0' as the value of the DISPLAY variable. chakrinu Linux - Server 3 12-21-2010 06:59 PM
Cannot connect to X11 window server using ":).0" as DISPLAY variable cclack Linux - Newbie 4 09-06-2007 09:32 PM
Can't connect to X11 window server suresheva31 Linux - General 0 10-19-2004 02:17 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 03:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration