Friday, December 19, 2014

PacktPub eBook Bonanza

Interested in cheap IT-ebooks for the new year?  Then, the PacktPub campaign is definitely something for you!
Check it out:
http://bit.ly/1w1Vkps

Read the press release here.

Saturday, December 13, 2014

WebLogic installation on a non-English server machine

I often install WebLogic environment for various companies.  Most of them are using Oracle Linux, or other Linux variants, and a minority use MS Windows Server.
They are all installed in English, but last week I had a Wallonian customer that installed their Windows machine in French...

So, I installed their the WebLogic software and the ADF libraries and everything seemed to work fine:
no errors during installation and configuration, admin server started well.
But when starting the managed server, it generated a lot of these messages:

####<09-mai-2014 9 h 05 min 23 s CEST> <Error> <Socket> <CH1WL01> <AdfServer> <ExecuteThread: '0' for queue: 'weblogic.socket.Muxer'> <<WLS Kernel>> <> <3bef1877-e26f-4f29-b579-34da429a7b65-00000013> <1399619123679> <BEA-000403> <IOException occurred on socket: Socket[addr=/10.1.0.74,port=52704,localport=7003]
 java.io.IOException: Une connexion établie a été abandonnée par un logiciel de votre ordinateur hôte.
java.io.IOException: Une connexion établie a été abandonnée par un logiciel de votre ordinateur hôte
 at sun.nio.ch.SocketDispatcher.read0(Native Method)
 at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
 at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
 at sun.nio.ch.IOUtil.read(IOUtil.java:197)
 at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)
 at weblogic.socket.NIOSocketMuxer$NIOInputStream.read(NIOSocketMuxer.java:747)
 at weblogic.socket.NIOSocketMuxer$NIOInputStream.read(NIOSocketMuxer.java:733)
 at weblogic.socket.SocketMuxer.readFromSocket(SocketMuxer.java:1017)
 at weblogic.socket.NIOSocketMuxer.readFromSocket(NIOSocketMuxer.java:642)
 at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:951)
 at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:928)
 at weblogic.socket.NIOSocketMuxer.process(NIOSocketMuxer.java:507)
 at weblogic.socket.NIOSocketMuxer.processSockets(NIOSocketMuxer.java:473)
 at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:30)
 at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:43)
 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:147)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:119)

####<09-mai-2014 9 h 05 min 23 s CEST> <Error> <HTTP> <CH1WL01> <AdfServer> <ExecuteThread: '0' for queue: 'weblogic.socket.Muxer'> <<WLS Kernel>> <> <3bef1877-e26f-4f29-b579-34da429a7b65-00000013> <1399619123679> <BEA-101083> <Connection failure.
java.io.IOException: Une connexion établie a été abandonnée par un logiciel de votre ordinateur hôte
 at sun.nio.ch.SocketDispatcher.read0(Native Method)
 at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
 at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
 at sun.nio.ch.IOUtil.read(IOUtil.java:197)
 at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)
 at weblogic.socket.NIOSocketMuxer$NIOInputStream.read(NIOSocketMuxer.java:747)
 at weblogic.socket.NIOSocketMuxer$NIOInputStream.read(NIOSocketMuxer.java:733)
 at weblogic.socket.SocketMuxer.readFromSocket(SocketMuxer.java:1017)
 at weblogic.socket.NIOSocketMuxer.readFromSocket(NIOSocketMuxer.java:642)
 at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:951)
 at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:928)
 at weblogic.socket.NIOSocketMuxer.process(NIOSocketMuxer.java:507)
 at weblogic.socket.NIOSocketMuxer.processSockets(NIOSocketMuxer.java:473)
 at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:30)
 at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:43)
 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:147)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:119)


And when deploying a test application on the server, it gave no response in my browser...

Fortunately, I found a patch on My Oracle Support to solve this.
I applied patch 18373180 (available for Oracle WebLogic 12c R2) through OPatch and did not encounter anymore this error...

Review PacktPub : Oracle Solaris 11 Advanced Administration Cookbook

I was asked by Packt Publishing to review a brand new cookbook about Oracle Solaris 11 written by Alexandre Borges:
https://www.packtpub.com/hardware-and-creative/oracle-solaris-11-advanced-administration-cookbook

As a consultant, I notice that our customers prefer Oracle Linux over Solaris.  But from time to time I do projects on Oracle Solaris.  That implies that I am more an Oracle Linux expert than a Solaris expert, but despite of that I was very curious about this new book to extend my knowledge.

I must say, this book is really a recommendation for people with a base knowledge that want to dive deeper into Solaris.

From the very first chapter you notice that this book is written by an IT expert for IT experts: no extended prose, just the very rudimentary theory and a lot of exercises, explained step by step.
Alexandre tested all his exercises in Oracle VirtualBox, so it is quite easy to test out the labs he made.  Unfortunately these days I don't have too much time to test it all out, but it is really one of my agenda topics for the next weeks.

Here is an overview of the chapters in the book:

(1) IPS and Boot Environments
(2) ZFS
(3) Networking
(4) Zones
(5) Playing with Oracle Solaris 11 Services
(6) Configuring and Using an Automated Installer (AI) Server
(7) Configuring and Administering RBAC and Least Privileges
(8) Administering and Monitoring Processes
(9) Configuring the Syslog and Monitoring Performance




Hint for Alexandre:
I guess there is still a small typo in the third chapter on top of page 161.  The abbreviation of "External Network Modifier" is not "EMN" but "ENM".


Thursday, December 11, 2014

WebLogic Server silent install

If you are not a fan of the GUI installer or if you have to install WLS on multiple instances, then the silent install mode is really interesting.

Note that there is a big difference in the install method between 11g and 12c.
In this post, I will explain the difference.


11g

In 11g, you must create a silent xml-file.

(1)
Create a xml file (e.g. silent.xml) with this content:

<?xml version="1.0" encoding="UTF-8"?>
<bea-installer>
<input-fields>
<data-value name="BEAHOME" value="/opt/oracle/Oracle/Middleware" />
<data-value name="WLS_INSTALL_DIR" value="/opt/oracle/Oracle/Middleware/wlserver_10.3" />
<data-value name="COMPONENT_PATHS" value="WebLogic Server/Core Application Server|WebLogic Server/Administration Console|WebLogic Server/Configuration Wizard and Upgrade Framework|WebLogic Server/Web 2.0 HTTP Pub-Sub Server|WebLogic Server/WebLogic SCA|WebLogic Server/WebLogic JDBC Drivers|WebLogic Server/Third Party JDBC Drivers|WebLogic Server/WebLogic Server Clients|WebLogic Server/WebLogic Web Server Plugins|WebLogic Server/UDDI and Xquery Support|WebLogic Server/Server Examples|WebLogic Server/Evaluation Database|Oracle Coherence/Coherence Product Files|Oracle Coherence/Coherence Examples" />
<data-value name="LOCAL_JVMS" value="/opt/jdk/jdk1.6.0_27" />
</input-fields>
</bea-installer>


(2)
Execute the (generic) installer in silent mode:

java -d64 -jar wls1035_generic.jar -mode=silent -silent_xml=silent.xml -log=silent.log


12c

12c does not work with a xml-file but with a response file which can be generated for the very first time by executing the GUI installer: when already passed some steps in the wizard, you can generate the response file by clicking on the "Save Response File" button in the "Installation Summary" screen.

If you really don't want to use the GUI installer, you can copy the content of the response file from here. :-)

(1)
Generate a response file with this content:

(2)
If this installation is the first Oracle installation on your system, then you must create as well the oraInst.loc file to define the directory and permission for the Oracle Inventory.
The user root has to create this file with this content:
inventory_loc=/u01/weblogic/OracleInventory
inst_group=oinstall

(3)
Execute the silent installer.
If this is the first installation:
java -jar /u01/software/fmw_12.1.3.0.0_wls.jar -silent -responseFile /u01/weblogic/wls12c.rsp -invPtrLoc /u01/weblogic/oraInst.loc

If you have already installed Oracle products:
java -jar /u01/software/fmw_12.1.3.0.0_wls.jar -silent -responseFile /u01/weblogic/wls12c.rsp


Sunday, December 7, 2014

Retrieving the Oracle Forms and Reports version number

You can easily check the version number of Forms & Reports installed on your system by the opatch utility.

Suppose you are on a Windows system, you can do this by executing the following.

(1) Extend your PATH variable:

C:\>set PATH=C:\Oracle\Middleware\user_projects\domains\ClassicDomain;%PATH%


(2) Execute opatch:

C:\>opatch lsinventory

or

C:\>opatch lsinventory -details


You will receive a huge output but one of the lines will look like this:


Monday, December 1, 2014

Using your Oracle Linux ISO as local YUM Repository

If you don't have an Internet connection on your server and you want to install some packages through yum, then there is a very interesting workaround for that: you can use your CD/DVD or ISO-file as local YUM repository.

In this blog post, I will explain to you how you can configure it.  Here I will use a virtualized environment that uses an ISO-file.

(1)
In your VM environment, attach the CD/DVD-iso to your Linux VM.
This operation will mount automatically the ISO in the /media directory.

(2)
Unmount (not eject) the ISO through the GUI or commandline:
[root@ol6 ~]# umount /media/OL6.5\ x86_64\ Disc\ 1\ 20131125/

(3)
Create a directory where we will mount this ISO:
[root@ol6 ~]# mkdir /OL6DVD
[root@ol6 ~]# mount /dev/sr0 /OL6DVD/
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@ol6 ~]# ls /OL6DVD/
EFI         GPL               LoadBalancer  README-en.html           RELEASE-NOTES-x86_64-en.html  ResilientStorage    Server
EULA        HighAvailability  media.repo    RELEASE-NOTES-en         RELEASE-NOTES-x86-en          RPM-GPG-KEY         supportinfo
eula.en_US  images            Packages      RELEASE-NOTES-en.html    RELEASE-NOTES-x86-en.html     RPM-GPG-KEY-oracle  TRANS.TBL
eula.py     isolinux          README-en     RELEASE-NOTES-x86_64-en  repodata                      ScalableFileSystem  UEK3
[root@ol6 ~]# mount | grep OL6
/dev/sr0 on /OL6DVD type iso9660 (ro)

(4)
Create a config file to use this local repo:
[root@ol6 ~]# more /etc/yum.repos.d/local.repo
[local]
name=OL6u5 DVD Repository
baseurl=file:///OL6DVD

(5)
The keys must be imported from this local repo:
[root@ol6 ~]# rpm --import /OL6DVD/RPM-GPG-KEY
[root@ol6 ~]# rpm --import /OL6DVD/RPM-GPG-KEY-oracle

(6)
Verify that you use this local repo:
[root@ol6 ~]# yum repolist
Loaded plugins: refresh-packagekit, security
local                                                                                                                                   | 3.7 kB     00:00 ...
local/primary_db                                                                                                                        | 3.0 MB     00:00 ...
http://public-yum.oracle.com/repo/OracleLinux/OL6/UEKR3/latest/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'public-yum.oracle.com'"
Trying other mirror.
repo id                                            repo name                                                                                             status
local                                              OL6u5 DVD Repository                                                                                  3,669
public_ol6_UEKR3_latest                            Unbreakable Enterprise Kernel Release 3 for Oracle Linux 6Server (x86_64)                                 0
public_ol6_latest                                  Oracle Linux 6Server Latest (x86_64)                                                                      0
repolist: 3,669

(7)
In the existing public config file (“/etc/yum.repos.d/public-yum-ol6.repo”) disable all repo sources by setting the enabled parameter on “0”.
Verify again the used yum repo:
[root@ol6 ~]# yum repolist
Loaded plugins: refresh-packagekit, security
repo id                                                               repo name                                                                          status
local                                                                 OL6u5 DVD Repository                                                               3,669
repolist: 3,669

(8)
We can now install packages through the local yum repo.
Verify that the package “lsscsi” does not exist yet on the system.
Install the package through the local yum repo:
[root@ol6 ~]# yum install lsscsi
Loaded plugins: refresh-packagekit, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package lsscsi.x86_64 0:0.23-2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================
 Package                              Arch                                 Version                                   Repository                           Size
===============================================================================================================================================================
Installing:
 lsscsi                               x86_64                               0.23-2.el6                                local                                38 k

Transaction Summary
===============================================================================================================================================================
Install       1 Package(s)

Total download size: 38 k
Installed size: 75 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : lsscsi-0.23-2.el6.x86_64                                                                                                                    1/1
  Verifying  : lsscsi-0.23-2.el6.x86_64                                                                                                                    1/1

Installed:
  lsscsi.x86_64 0:0.23-2.el6

Complete!

(9)
Verify the package info:
[root@ol6 ~]# yum info lsscsi
Loaded plugins: refresh-packagekit, security
Installed Packages
Name        : lsscsi
Arch        : x86_64
Version     : 0.23
Release     : 2.el6
Size        : 75 k
Repo        : installed
From repo   : local
Summary     : List SCSI devices (or hosts) and associated information
URL         : http://sg.danny.cz/scsi/lsscsi.html
License     : GPLv2+
Description : Uses information provided by the sysfs pseudo file system in Linux kernel
            : 2.6 series to list SCSI devices or all SCSI hosts. Includes a "classic"
            : option to mimic the output of "cat /proc/scsi/scsi" that has been widely
            : used prior to the lk 2.6 series.
            :
            : Author:
            : --------
            :     Doug Gilbert <dgilbert(at)interlog(dot)com>