install weblogic on VM with Solaris OS - weblogic

I stuck in install weblogic on my vm solaris. i try that
java -d64 -jar fmw_12.2.1.3.0_wls.jar
and i got an error
Checking monitor: must be configured to display at least 256 colors. DISPLAY environment variable not set. Failed <<<<
Any solution for these error?

This happens if you want to do an graphical install of the system without having a X11 running. The error message is quite normal for such an situation.
You could:
Not running the installer in the graphical mode by doing a silent install (please refer to https://docs.oracle.com/cd/E24329_01/doc.1211/e24492/silent.htm#WLSIG131 for information)
Install the nescessary package to have an X11 and stuff running in your VM with pkg install solaris-desktop. Then execute the java command again from the GUI . This obviously only works if you can get a the graphical output of the VM for example via VNC or other tools.
You could set the DISPLAY variable to an installed X11 implementation. For example i use Xquartz on my Apple notebook. Then configure DISPLAY and XAUTHORITY correctly. Or you could simply log into the Solaris system with ssh -X . I prefer the second one, as it does everything automatically.

Related

Fatal Error DISPLAY variable set incorrectly: :0

I want to install oracle weblogic server. I already downloaded it and it's fmw_12.1.3.0.0_wls.jar. In order to install it I'm instructed to run java -jar fmw_12.1.3.0.0_wls.jar. But when I run it I get
(...)X-Server access is denied on host
[Fatal Error] DISPLAY variable set incorrectly: :0
[Resolution] Verify that your DISPLAY environment variable is set correctly,
and that there is an X11 server on the system. If you are
running the Oracle Installer as a different user or on a different host,
you may need to use the xhost command to ensure that host/user
has permission to write to your display.
Logs are located here: /tmp/OraInstall2019-03-16_10-36-23PM.
My system is: CentOS Linux release 7.6.1810 (Core) My java is: Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
I'm trying to perform this installation locally. I'm confused because every solution I came across assumed that I was logging via ssh or vnc server while I'm definitely not. What I tried:
set $JAVA_HOME to point to my jdk directory.
unset $ORACLE_HOME that was created for the database I have installed.
trying to set DISPLAY values to some other number than 0 (I know
its stupid but whatever).
reinstall java
I'm thinking if it might be the problem related with graphic drivers. Might it be that the defaults that were installed with X11 are somehow wrong? Or maybe centOS is not compatibile with this software? Should I maybe try oracle linux?
Add -Djava.awt.headless=true to your command line, e.g.
java -Djava.awt.headless=true -jar fmw_12.1.3.0.0_wls.jar
I solved my problem by using jdk 1.8 x64. This issue seemed to be caused by jdk 1.8 x86.
And yes, the problem was similar to yours. Give it a shot.

How to get Sikuli working in headless mode

If we have a headless test server running sikuli (both ubuntu and windows configurations needed), how to get it work without a physical monitor and preferably for as many screen resolutions as possible.
I successfully got sikuli running in headless mode (no physical monitor connected)
Ubuntu: check Xvfb.
Windows: install display driver on the machine (to be headless) from virtualbox guest additions display drivers and use TightVNC to remotely set resolution from another machine.
Detailed steps for windows 7
Assume that:
Machine A: to be headless machine, windows 7, with vnc server ready (e.g. TightVNC server installed and waiting for connections).
Machine B: will be used to remotely setup the virtual display driver on machine A.
steps:
Download virtualbox guest additions iso file on Machine A from here (for latest version check latest version here and download VBoxGuestAdditions_x.y.z.iso)
Extract iso file (possibly with winrar) into a directory (let us call it folder D)
using command prompt cd to D folder
Driver extraction
-To extract the 32-bit drivers to "C:\Drivers", do the following:
VBoxWindowsAdditions-x86 /extract /D=C:\Drivers
-For the 64-bit drivers:
VBoxWindowsAdditions-amd64 /extract /D=C:\Drivers
Goto device manager
add hardware
Restart and connect with VNC viewer, now you should be able to change screen resolution
other valuable info on launchpad.
I got SikuliX working in a true headless mode in GCE with a Windows 2016 client system. It takes some duct tape and other Rube Goldberg contraptions to work, but it can be done.
The issue is that, for GCE (and probably AWS and other cloud environment Windows clients), you don't have a virtual video adapter and display, so, unless there's an open RDP connection to the client, it doesn't have a screen, and SikuliX/OpenCV will get a 1024x768 black desktop, and fail.
So, the question is, how to create an RDP connection without having an actual screen anywhere. I did this using Xvfb (X Windows virtual frame buffer). This does require a second VM, though. Xvfb runs on Linux. The other piece of the puzzle is xfreerdp 2.0. The 2.x version is required for compatibility with recent versions of Windows. 1.x is included with some Linux distros; 2.x may need to be built from sources, depending on what flavor Linux you're using. I'm using CentOS, which did require me to build my own.
The commands to establish the headless RDP session, once the pieces are in place, look something like this:
/usr/bin/Xvfb :0 -screen 0 1920x1080x24 &
export DISPLAY=:0.0
/usr/local/bin/xfreerdp /size:1920x1080 /u:[WindowsUser] /p:"[WindowsPassword]" /v:[WindowsTarget]
In our environment we automated this as part of the build job kicked off by Jenkins. For this to work under the Jenkins slave, it was also necessary to run the Jenkins slave as a user process, rather than a service... this can be accomplished by enabling auto admin login and setting the slave launch script as a run (on logon) command.
For those looking to automate on ec2 windows machines, this worked for me: http://www.allianceglobalservices.com/blog/executing-automation-suite-on-disconnectedlocked-machines
In summary, I used RDC to connect, put the following code in a batch file on remote desktop, double clicked it, and sikulix started working remotely (kicking me out of RDC at the same time). Note that ec2 windows machines default to 1024x768 when tscon takes over which may be too small so TightVnc can be used to increase the resolution to 1280x1024 before running.
tscon.exe 0 /dest:console
tscon.exe 1 /dest:console
tscon.exe 2 /dest:console
tscon.exe 3 /dest:console
START /DC:\Sikulix /WAIT /B C:\Sikulix\runsikulix.cmd -d 3 -r C:\test.sikuli -f C:\Sikulix\log.txt -d C:\Sikulix\userlog.txt
I just figure out a way to resolve similar issue.
My env:
local: windows pc
remote (for running sikulix + app I would like to test): windows ec2 instance
My way:
1.create a .bat file, its contents:
ping 127.0.0.1 -n 15 > nul
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
%windir%\System32\tscon.exe %%s /dest:console
)
cd "\path\to\sikulix"
java -jar sikulixide-2.0.5.jar -r /path/to/sikulix -c > logfile.log
prepare your app
run the bat (right click > run as administrator)
ping will give your 10s, so that you can bring your app back to front
you will be disconnnected from rdp connection
Explanation:
ping is like "sleep"
for loop: kick out current user & keep session alive

Using Enthought Canopy over SSH+Putty Fails to Start

I have Enthought Canopy installed on a machine running RedHat Enterprise Linux 5. I installed it successfully and can verify it runs.
I would like to be able to use it remotely from a windows computer, I have installed putty + xming for X11 forwarding. I can use regular applications like gedit and firefox fine. However when I try using canopy by launching ~/Canopy/canopy an empty gray box for the welcome screen appears, disappears after a few moments, and canopy exits with no return error without having started.
When I ssh with X forwarding from another linux computer, I can use canopy just fine.
There is no error code, I don't see any debug flags and I can't find any log files. I really have no idea why I cant access canopy with putty and xming.
I am trying this as a solution for interns so they can use a machine with access to our datafiles from their windows computers.
I highly appreciate any and all help.
Canopy needs some features not provided by XMing and a few other X server implementation on windows. See the following article for more details:
https://support.enthought.com/entries/21873380-Running-Canopy-Linux-via-remote-display-VNC-remote-X-display-
In short, use MobaXterm ( http://mobaxterm.mobatek.net/ ) or VcXSrv ( http://sourceforge.net/projects/vcxsrv/ )
EDIT: newer versions of Canopy have fixed this bug and should work fine with XMing

xquartz: couldn't query security extension and xterm failing

I am using OSX 10.7.5 from my MacBook Air to login to remote Linux workstation, running Suse (/etc/issue: SUSE Linux Enterprise Desktop 11 SP2 (x86_64) - Kernel \r (\l))
Everything was working fine until I started to play with macports latest X11, XQuartz XWindow System (XQuartz 2.7.4 (xorg-server 1.13.0)). By default OSX 10.7.5 comes with XQuartz 2.6.4 (xorg-server 1.10.6), however I've installed and made default XQuartz 2.7.4. I am now observing two issues:
(1) When logging to my remote Suse box (this is done via VPN tunnel btw, not sure if it matters), via 'user1> ssh -X user2#wks01' I am getting
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
This (at least appears) to be traced to the fact that there's no 'Security' extension on the new Xquarts server. Traced via ssh -vvv option, and then due to the fact that xauth is failing, so running it separately on MacBox, or remote Suse gives:
user2#wks04:~> xauth generate "$DISPLAY" .
trustedxauth: (argv):1: couldn't query Security extension on display "localhost:10.0"
'ssh -Y' logs in without warning
(2) What is also interesting, that in both ssh modes -X and -Y I am able to open and forward to my display any X-application that I have checked, including xclock, xlogo, xcalc and even eclipse. However running simple 'xterm' results in a hanging job (i.e. appears running), but xterm never displays on my Mac.
While rolling back to will XQuartz 2.6.4 probably help with the issues above (as all the above operations worked smoothly before), but I am curious now to understand the root of the matter.
Thank you in advance for your help,
Dmitry

Apache Web Development on Cygwin

I'm trying to get an Apache server running on my Cygwin setup to follow the Java Ranch Cattle Drive tutorials online (basically, to learn Java EE web page development that uses a MySQL back end.)
I used the Cygwin Setup program to install httpd (which is how I installed most other dev tools I use on cygwin) and it says install complete, yet when I run 'httpd' it cannot find the command. It also appears the expected install directory (/usr/local/apache...) doesn't exist.
Does anyone have any experience using this setup, and if so, you could walk me through the initial steps of getting the server up and running and getting a browser to display the server's default page?
To keep answers focused, I didn't want to discus the drawbacks of running Apache on a Windows system - this is just for learning purposes. Thanks in advance.
Looking at the Cygwin Package Listing for httpd, you can see that the executable is installed under /usr/sbin.
So, if /usr/sbin is not on your PATH (it isn't on mine, not by default anyhow), you would actually run:
/usr/sbin/httpd
And btw, if you would like to list the files installed for a certain package, you can use cygcheck:
cygcheck -l httpd
cygrunsrv -I Apache -p /usr/sbin/httpd -a "-X"
This will solve the problem. This assumes you already have cyrunsrv set up. The reason httpd fails with cygrunsrv if you leave out the -X is that the process disconnects from the terminal and cygrunsrv considers that a failure. The -X option for httpd is the debug or terminal mode.
I couldn't find any detailed information on how to get Apache working on Cygwin, so here it is if someone's interested:
Install the httpd-* and httpd-mod_* packages you need. Note that the packages named "Apache" are deprecated. You need the ones named "httpd" (which are actually Apache).
Install cygrunsrv (normally this is a default Cygwin package)
Run /usr/bin/cygserver-config as admin. This is needed because Apache requires an IPC server running.
Open services.msc, then go to the CYGWIN Cygserver. Right-click on it and start it. If you don't do this, you'll probably get errors like "AH00023: Couldn't create the proxy mutex".
Finally, start Apache by running /usr/sbin/apachectl restart
Config is in /etc/httpd/.
Some information about running Apache on Cygwin:
http://httpd.apache.org/docs/1.3/cygwin.html
http://www.issociate.de/board/goto/895433/apache2_does_not_start_in_cygwin.html
http://www.cygwin.com/ml/cygwin-apps/2005-02/msg00085.html
Personally, I would recommend installing WAMPServer or other WAMP stack and do it that way. There is no difference, except that you'll need to control Apache through Windows commands [net start, net stop], not Cygwin's ones.