This document guides you to create highly available Oracle Forms and Reports clusters on Azure VMs step by step, including:
You will get Forms and Reports running as the picture shows:
This sample does not cover high availability for Oracle Database, you can follow Oracle HA in Azure- Options to create Oracle Data Guard.
Azure Application Gateways are always deployed in a highly available fashion. You can scale up following Scaling Application Gateway v2.
See network and Availability Zone topology.
An Azure account with an active subscription. Create an account for free.
Azure provides a series of Oracle WebLogic base images, it'll save your effort for Oracle tools installation. This sample will setup Oracle Forms and Reports based on the Azure WebLogic base image, follow the steps to provision a machine with JDK and WebLogic installed:
WebLogic 12.2.1.4.0 Base Image and JDK8
, you will find the WebLogic offers, select WebLogic 12.2.1.4.0 Base Image and JDK8 on OL7.6 or WebLogic Server 12.2.1.4.0 and JDK8 on RHEL7.6, and click Create button.adminVM
weblogic
Secret123456
It will take 10min for the offer completed. After the deployment finishes, you will have a machine with JDK and WLS installed. Then you are able to install and configure Forms and Reports on the top of the machine.
You are required to have a database to configure the JRF domain for Forms and Reports. This sample uses Oracle Database. Follow this document to create an Oracle database
If you are following the document to create Oracle database, write down the credentials to create domain schema, username and password should be: sys/OraPasswd1
Though you have Oracle WebLogic instance running now, to create Oracle Forms and Reports, you still need to install Oracle Forms and Reports. To simplify the interface, let's provision a Windows machine and leverage XServer to install required tools with graphical user interface.
Follow the steps to provision Windows VM and set up XServer.
weblogic
Secret123456
Edit the security to allow access from your terminal.
wls-nsg
After the Windows server is completed, RDP to the server.
Download Oracle Fusion Middleware Infrastructure installer from https://www.oracle.com/webapps/redirect/signon?nexturl=https://download.oracle.com/otn/nt/middleware/12c/122140/fmw_12.2.1.4.0_infrastructure_Disk1_1of1.zip
Unzip the file and copy fmw_12.2.1.4.0_infrastructure.jar
to adminVM.
Make sure fmw_12.2.1.4.0_infrastructure.jar
is copied to /u01/oracle/fmw_12.2.1.4.0_infrastructure.jar, owner of the file is oracle
, you can set the ownership with command chown oracle:oracle /u01/oracle/fmw_12.2.1.4.0_infrastructure.jar
.
Now let's use the XServer to install Oracle Fusion Middleware Infrastructure on adminVM.
Steps to install Oracle Fusion Middleware Infrastructure on adminVM:
RDP to windowsXServer.
Click XLaunch from the desktop.
-1
, click Next.Open CMD
SSH to adminVM with command ssh weblogic@adminVM
Use root user: sudo su
Install dependencies
# dependencies for XServer access
sudo yum install -y libXtst
sudo yum install -y libSM
sudo yum install -y libXrender
# dependencies for Forms and Reports
sudo yum install -y compat-libcap1
sudo yum install -y compat-libstdc++-33
sudo yum install -y libstdc++-devel
sudo yum install -y gcc
sudo yum install -y gcc-c++
sudo yum install -y ksh
sudo yum install -y glibc-devel
sudo yum install -y libaio-devel
sudo yum install -y motif
Disable firewall. If you want to keep the firewall, you must open ports for Reports and Forms.
sudo systemctl stop firewalld
sudo systemctl disable firewalld
Create directory for user data
mkdir /u02
chown oracle:oracle /u02
Use oracle
user: sudo su - oracle
Get the private IP address of widnowsXServer, e.g. 10.0.0.8
Set env variable: export DISPLAY=<yourWindowsVMVNetInternalIpAddress>:0.0
, e.g. export DISPLAY=10.0.0.8:0.0
Set Java env:
oracleHome=/u01/app/wls/install/oracle/middleware/oracle_home
. $oracleHome/oracle_common/common/bin/setWlstEnv.sh
Install fmw_12.2.1.4.0_infrastructure.jar, if you run into ERROR: Temporary directory /tmp does not have enough free space., see Troubleshoot#4
java -jar fmw_12.2.1.4.0_infrastructure.jar
/u01/oracle/oraInventory
oracle
/u01/app/wls/install/oracle/middleware/oracle_home
rm fmw_12.2.1.4.0_infrastructure.jar
Following the steps to install Oracle Forms and Reports:
/u01/oracle/wget.sh
ssh weblogic@adminVM
.oracle
userexport DISPLAY=<yourWindowsVMVNetInternalIpAddress>:0.0
, e.g. export DISPLAY=10.0.0.8:0.0
--ask-password
with --password <your-sso-password>
bash wget.sh
unzip "*.zip"
, you will get fmw_12.2.1.4.0_fr_linux64.bin
and fmw_12.2.1.4.0_fr_linux64-2.zip
rm V983392-01_1of2.zip
rm V983392-01_2of2.zip
./fmw_12.2.1.4.0_fr_linux64.bin
export PS1="\$"
, run ./fmw_12.2.1.4.0_fr_linux64.bin
again./u01/oracle/oraInventory
oracle
/u01/app/wls/install/oracle/middleware/oracle_home
/u01/app/jdk/jdk1.8.0_291
./fmw_12.2.1.4.0_fr_linux64.bin
again.sudo yum install compat-libcap1
to install the compat-libcap1
package.Now you have Forms and Reports installed in the adminVM. Let's clone the machine for managed servers.
You have Oracle Forms and Reports installed in the adminVM, you are able to reuse the installation by cloning adminVM for managed servers.
Follow the steps to clone adminVM, for high availability, let's create the disk and machine in different zones as the table shows:
Index | Machine Name | Disk Name | Availability Zone |
---|---|---|---|
1 | mspVM1 | mspVM1_OS_Disk | Zone 1 |
2 | mspVM2 | mspVM2_OS_Disk | Zone 2 |
3 | mspVM3 | mspVM3_OS_Disk | Zone 3 |
Create a snapshot from adminVM OS disk. If you have snapshot of adminVM, skip the following two steps:
Keep the snapshot, you will use it for scaling.
Create VMs for Forms and Reports replicas based on the snapshot:
mspVM1
on the disk. Make sure you are selecting the right availability zone, see above table.root
user and change the hostname.
hostnamectl set-hostname hostname
. For example, set hostname mspVM1 with command hostnamectl set-hostname mspVM1
mspVM2
or another new machine, make sure you have set correct hostname.For the initial setup, make sure you have three machine ready to configure Forms and Reports: adminVM, mspVM1, mspVM2, and move on with next section.
For new replicas, make sure you have the new machine ready, and continue from Create Forms and Reports components.
You are required to create the schemas for the WebLogic domain.
The following steps leverage XServer and RCU to create schemas on the Oracle database created previously.
oracle
userexport DISPLAY=<yourWindowsVMVNetInternalIpAddress>:0.0
, e.g. export DISPLAY=10.0.0.8:0.0
bash /u01/app/wls/install/oracle/middleware/oracle_home/oracle_common/bin/rcu
DEV0402
.
Secret123456
We will use a secondary virtual IP address for the Admin Server, rather than using the primary IP address of adminVM, which makes the Admin Server more flexible for backup and failover. To enable the secondary IP address, you are required to make changes to:
Make sure you have at least one available private IP address that hasn't been used by other machine, this sample use 10.0.0.16
. You can find more information from this document.
10.0.0.16
Now you have added the IP address to the external network interface of adminVM, to connect adminVM with it, you still need to enable local ethernet connection on the machine.
You have to login to adminVM and configure the ethernet connection.
root
userifcfg-eth0:1
.secondaryIP="10.0.0.16"
cd /etc/sysconfig/network-scripts
ls ifcfg-*
touch ifcfg-eth0:1
vi ifcfg-eth0:1
cat <<EOF >ifcfg-eth0:1
DEVICE=eth0:1
BOOTPROTO=static
ONBOOT=yes
IPADDR=${secondaryIP}
NETMASK=255.255.255.0
EOF
/etc/init.d/network restart
ifconfig
, you should find there is a network interface listening to the IP address like:[root@adminVM1 network-scripts]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.4 netmask 255.255.255.0 broadcast 10.0.0.255
inet6 fe80::20d:3aff:fe8f:1fe7 prefixlen 64 scopeid 0x20<link>
ether 00:0d:3a:8f:1f:e7 txqueuelen 1000 (Ethernet)
RX packets 104754 bytes 69209518 (66.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 75892 bytes 19074850 (18.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.15 netmask 255.255.255.0 broadcast 10.0.0.255
ether 00:0d:3a:8f:1f:e7 txqueuelen 1000 (Ethernet)
Now, the machine and database are ready, let's move on to create a new domain for Forms and Reports.
Use the windowsXServer.
SSH to adminVM
Use oracle
user
Set env variable: export DISPLAY=<yourWindowsVMVNetInternalIpAddress>:0.0
, e.g. export DISPLAY=10.0.0.8:0.0
bash /u01/app/wls/install/oracle/middleware/oracle_home/oracle_common/common/bin/config.sh
Page1:
/u02/domains/wlsd
Page2:
Page3: Applciation Location
/u02/applications/wlsd
Page4: Administrator account
weblogic
Secret123456
, make sure the value is the same with schema password.Page5: Domain mode and JDK
Page6:
<the-rcu-schema-prefix>_STB
, this sample uses DEV0402_STB
Secret123456
Page9: Advanced Configuration
Page10: Administration Server
admin
Page11: Node Manager
weblogic
Secret123456
Page12: Managed Servers, add the following servers
Page13: CLusters
Page14: Server Templates
Page15: Dynamic Clusters
Page16: Assign Servers to Clusters
Page17: Coherence Cluster
Page18: Machines
<private-ip-of-mspVM1>
, 5556<private-ip-of-mspVM2>
, 5556Page19: Assign Servers to machine
Page20: virtual targets
Page21: Partitions
Page22: System Components
Page22: Assign System Component
Page20: Deployments Targeting
Page21: Services Targeting
The process should be completed without error.
Pack the domain and copy the domain configuration to managed machines.
rm /tmp/cluster.jar -f
cd /u01/app/wls/install/oracle/middleware/oracle_home/oracle_common/common/bin
bash pack.sh -domain=/u02/domains/wlsd -managed=true -template=/tmp/cluster.jar -template_name="ofrwlsd"
scp /tmp/cluster.jar weblogic@mspVM1:/tmp/cluster.jar
scp /tmp/cluster.jar weblogic@mspVM2:/tmp/cluster.jar
Exit oracle
user: exit
Use root user: sudo su
Create service for node manager and Admin Server
mkdir -p /u02/domains/wlsd/servers/admin/security
cat <<EOF >/u02/domains/wlsd/servers/admin/security/boot.properties
username=weblogic
password=Secret123456
EOF
cat <<EOF >/etc/systemd/system/wls_admin.service
[Unit]
Description=WebLogic Adminserver service
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
WorkingDirectory="/u02/domains/wlsd"
ExecStart="/u02/domains/wlsd/startWebLogic.sh"
ExecStop="/u02/domains/wlsd/bin/stopWebLogic.sh"
User=oracle
Group=oracle
KillMode=process
LimitNOFILE=65535
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/wls_nodemanager.service
[Unit]
Description=WebLogic nodemanager service
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
# Note that the following three parameters should be changed to the correct paths
# on your own system
WorkingDirectory="/u02/domains/wlsd"
ExecStart="/u02/domains/wlsd/bin/startNodeManager.sh"
ExecStop="/u02/domains/wlsd/bin/stopNodeManager.sh"
User=oracle
Group=oracle
KillMode=process
LimitNOFILE=65535
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
EOF
Start node manager and Admin Server, it takes about 10 min for Admin Server up.
sudo systemctl enable wls_nodemanager
sudo systemctl enable wls_admin
sudo systemctl daemon-reload
sudo systemctl start wls_nodemanager
sudo systemctl start wls_admin
Now you are able to access admin console with http://adminserver-ip:7001/console
, and Enterprise Manager with http://adminserver-ip:7001/em
.
Now, you have Forms and Reports configured in adminVM, let's apply the domain on mspVM1 and mspVM2.
You can also follow the steps to apply domain to a new machine for new replicas.
Configure domain on managed machine:
SSH to your machine, e.g login to mspVM1 with command ssh weblogic@mspVM1
Use root
user to set the ownership of domain package
sudo su
chown oracle:oracle /tmp/cluster.jar
Use oracle
user, sudo su - oracle
Unpack the domain
cd /u01/app/wls/install/oracle/middleware/oracle_home/oracle_common/common/bin
bash unpack.sh -domain=/u02/domains/wlsd -template=/tmp/cluster.jar
Make sure the node manager listen address is correct by cat /u02/domains/wlsd/nodemanager/nodemanager.properties
. The listen address should be private IP of the machine.
Exit oracle user with command exit
Use root user: sudo su
Create service for node manager
cat <<EOF >/etc/systemd/system/wls_nodemanager.service
[Unit]
Description=WebLogic nodemanager service
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
# Note that the following three parameters should be changed to the correct paths
# on your own system
WorkingDirectory="/u02/domains/wlsd"
ExecStart="/u02/domains/wlsd/bin/startNodeManager.sh"
ExecStop="/u02/domains/wlsd/bin/stopNodeManager.sh"
User=oracle
Group=oracle
KillMode=process
LimitNOFILE=65535
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
EOF
Start node manager
sudo systemctl enable wls_nodemanager
sudo systemctl daemon-reload
sudo systemctl start wls_nodemanager
For initial setup, apply step 1-8 to mspVM2, and continue from Create and start Reports components. For new replicas, apply step 1-8 to your new machines, and continue from Create and start Reports tools for new replicas.
Now, you have node manager running on adminVM, mspVM1, mspVM2, and Admin Server up in adminVM.
To successfully start Reports server, you must create and start the Reports components.
Let's create the ReportsToolsComponent using WLST.
ssh weblogic@adminvm
oracle
user: sudo su - oracle
Use WLST to create Reports tools instance.
cd /u01/app/wls/install/oracle/middleware/oracle_home/oracle_common/common/bin
./wlst.sh
# connect Admin Server, replace adminserver-ip with the real value.
connect("weblogic","Secret123456", "adminserver-ip:7001")
createReportsToolsInstance(instanceName='reptools1', machine='mspVM1')
createReportsToolsInstance(instanceName='reptools2', machine='mspVM2')
# exit WLST
exit()
Those commands should be finished without error. You have to resolve error before moving on.
Start Reports tools.
cd /u02/domains/wlsd/bin
# the commands require you to input password of node manager.
./startComponent.sh reptools1
./startComponent.sh reptools2
The Reports tools should start successfully.
Now, you have Reports tools components created and running, you are able to start the managed server and start the Reports In-process server.
Now you are able to start Reports in process server from browser.
http://<mspVM1-ip>:9002/reports/rwservlet/startserver
1|0
from the browser if the server is up.http://<mspVM2-ip>:9002/reports/rwservlet/startserver
1|0
from the browser if the server is up.Now, you have the Forms and Reports running on your managed machines. To start them automactically when the machine is rebooted, you have to configure them as Linux service.
Please note that, as Forms and Reports are running on managed nodes, no change needed for adminVM.
Orders to start Forms and Reports:
wls_nodemanager
to start node manager.WLS_FORMS1
on mspVM1 and WLS_FORMS2
on mspVM2, or WLS_FORMSN
on mspVMN for new replicas.WLS_REPORTS1
on mspVM1 and WLS_REPORTS2
on mspVM2, or WLS_REPORTSN
on mspVMN for new replicas.The following WLST script is to start WLS_FORMS1
, WLS_REPORTS1
on mspVM1.
Change the user name WLS_USER
, password WLS_PSWD
with your value, and ADMIN_SERVER_ADDRESS
with the virtual IP address created in Configure Virtual IP for Admin Server, here is 10.0.0.16.
To create the script on mspVM2 and new replicas, change FORMS_SERVER_NAME
, REPORTS_SERVER_NAME
and MSPVM_ADDRESS
with corresponding values.
Switch to oracle
with sudo su - oracle
and create script.
#weblogic admin account user name
WLS_USER=weblogic
#weblogic admin account password
WLS_PSWD=Secret123456
#virtual IP address of adminVM
ADMIN_SERVER_ADDRESS=10.0.0.16
#Froms server name
FORMS_SERVER_NAME=WLS_FORMS1
#Reports server name
REPORT_SERVER_NAME=WLS_REPORTS1
DOMAIN_HOME_PATH=/u02/domains/wlsd
INSTALL_PATH=/u01/app/wls/install
#private IP address of current machine
MSPVM_ADDRESS=10.0.0.6
cat <<EOF > $DOMAIN_HOME_PATH/startFormsReports.py
import os, sys
connect('${WLS_USER}','${WLS_PSWD}','${ADMIN_SERVER_ADDRESS}:7001')
domainRuntime()
cd("/ServerLifeCycleRuntimes/${FORMS_SERVER_NAME}")
status=cmo.getState()
if status != "RUNNING":
start('${FORMS_SERVER_NAME}','Server')
else:
print 'Forms ${FORMS_SERVER_NAME} is already running'
cd("/ServerLifeCycleRuntimes/${REPORT_SERVER_NAME}")
status=cmo.getState()
if status != "RUNNING":
start('${REPORT_SERVER_NAME}','Server')
else:
print 'Reports ${REPORT_SERVER_NAME} is already running'
disconnect()
EOF
cat <<EOF >$DOMAIN_HOME_PATH/startFormsReports.sh
#!/bin/sh
${INSTALL_PATH}/oracle/middleware/oracle_home/oracle_common/common/bin/wlst.sh $DOMAIN_HOME_PATH/startFormsReports.py > /dev/null 2>&1 &
echo Wait for Reports server ready
code="404"
counter=1
while [[ "\${code}" != "200" && \${couter} -lt 300 ]]
do
code=\$(curl -s -o /dev/null -w "%{http_code}" http://${MSPVM_ADDRESS}:9002/reports/)
echo "http code: \${code}, counter: \${counter}"
counter=\$((counter + 1))
sleep 2
done
echo Start Reports In-process server
curl http://${MSPVM_ADDRESS}:9002/reports/rwservlet/startserver > /dev/null 2>&1 &
echo Done!
EOF
The following WLST script is to stop WLS_FORMS1
, WLS_REPORTS1
on mspVM1.
Change the user name WLS_USER
, password WLS_PSWD
and ADMIN_SERVER_ADDRESS
with the virtual IP address created in Configure Virtual IP for Admin Server, here is 10.0.0.16.
To create the script on mspVM2 and new replicas, change FORMS_SERVER_NAME
and REPORTS_SERVER_NAME
with corresponding values.
WLS_USER=weblogic
WLS_PSWD=Secret123456
ADMIN_SERVER_ADDRESS=10.0.0.16
FORMS_SERVER_NAME=WLS_FORMS1
REPORT_SERVER_NAME=WLS_REPORTS1
DOMAIN_HOME_PATH=/u02/domains/wlsd
INSTALL_PATH=/u01/app/wls/install
cat <<EOF > $DOMAIN_HOME_PATH/stopFormsReports.py
import os, sys
connect('${WLS_USER}','${WLS_PSWD}','${ADMIN_SERVER_ADDRESS}:7001')
domainRuntime()
cd("/ServerLifeCycleRuntimes/${FORMS_SERVER_NAME}")
shutdown('${FORMS_SERVER_NAME}','Server')
cd("/ServerLifeCycleRuntimes/${REPORT_SERVER_NAME}")
shutdown('${REPORT_SERVER_NAME}','Server')
disconnect()
EOF
cat <<EOF >$DOMAIN_HOME_PATH/stopFormsReports.sh
#!/bin/sh
${INSTALL_PATH}/oracle/middleware/oracle_home/oracle_common/common/bin/wlst.sh $DOMAIN_HOME_PATH/stopFormsReports.py
sleep 2s
echo Done!
EOF
Now, switch to root
user with command exit
, create and enable the service.
DOMAIN_HOME_PATH=/u02/domains/wlsd
INSTALL_PATH=/u01/app/wls/install
cat <<EOF >/etc/systemd/system/ofmw.service
[Unit]
Description=Oracle Fusion Middleware Forms and Reports 12c
After=wls_nodemanager.service
Wants=wls_nodemanager.service
[Service]
Type=oneshot
RemainAfterExit=true
WorkingDirectory="/u02/domains/wlsd"
ExecStart="$DOMAIN_HOME_PATH/startFormsReports.sh"
ExecStop="$DOMAIN_HOME_PATH/stopFormsReports.sh"
User=oracle
Group=oracle
KillMode=process
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Change file permission:
DOMAIN_HOME_PATH=/u02/domains/wlsd
chmod 750 $DOMAIN_HOME_PATH/startFormsReports.py
chmod 750 $DOMAIN_HOME_PATH/startFormsReports.sh
chmod 750 $DOMAIN_HOME_PATH/stopFormsReports.py
chmod 750 $DOMAIN_HOME_PATH/stopFormsReports.sh
Enable the service:
sudo systemctl enable ofmw.service
sudo systemctl daemon-reload
sudo systemctl start ofmw.service
You are able to add Forms and Reports replicas by cloning machine and starting the corresponding components.
Clone adminVM following Clone machine for managed servers, let's name the new machine with mspVM3
.
Firstly, you are required to create and start replated components. This sample leverages WLST offline mode to update the existing domain with new machine, new managed servers and new component, which requires restart on Admin Server to cause changes working.
This is an example to update the existing domain to start Forms and Reports on mspVM3, replace the machine name and component name with yours.
Use WLST to add new replicas:
SSH to adminVM and switch to root user
Stop Admin Server:
sudo systemctl stop wls_admin
kill -9 `ps -ef | grep 'Dweblogic.Name=admin' | grep -v grep | awk '{print $2}'`
Switch to oracle
user: sudo su - oracle
Prepare Python script to create machine, managed servers and Forms component, modify the the value of Shell variables.
# Modify the value of variables with yours.
# Keep the index value the same with Azure Virtual Machine index
index=3
# Private IP address of the new machine
vmIP="10.0.0.8"
# Machine name
vmName="mspVM${index}"
# New Forms managed server name
formsSvrName="WLS_FORMS${index}"
# New Forms system component name
formsSysCompName="forms${index}"
# New Reports managed server name
reportsSvrName="WLS_REPORTS${index}"
cat <<EOF >create-forms3.py
import sys, traceback
vmIp="${vmIP}"
vmName="${vmName}"
formsSvrName="${formsSvrName}"
formsSysCompName="${formsSysCompName}"
reportsSvrName="${reportsSvrName}"
formsSvrGrp=["FORMS-MAN-SVR"]
reportsSvrGrp=["REPORTS-APP-SERVERS"]
readDomain('/u02/domains/wlsd')
print('\nCreate Machine ')
cd('/')
create(vmName,'Machine')
cd('Machine/'+vmName)
create(vmName,'NodeManager')
cd('NodeManager/'+vmName)
set('ListenAddress',vmIp)
print('\nCreate ' + formsSvrName)
cd('/')
create(formsSvrName, 'Server')
cd('/Servers/'+formsSvrName)
set('ListenAddress',vmIp)
set('ListenPort',int('9001'))
set('Machine',vmName)
cd('/')
assign('Server',formsSvrName,'Cluster','cluster_forms')
cd('/')
setServerGroups(formsSvrName, formsSvrGrp)
print('\nCreate '+ reportsSvrName)
cd('/')
create(reportsSvrName, 'Server')
cd('/Servers/'+ reportsSvrName)
set('ListenAddress',vmIp)
set('ListenPort',int('9002'))
set('Machine',vmName)
cd('/')
assign('Server',reportsSvrName,'Cluster','cluster_reports')
cd('/')
setServerGroups(reportsSvrName, reportsSvrGrp)
print('\nCreate FORMS SystemComponent '+formsSysCompName)
cd('/')
create(formsSysCompName, 'SystemComponent')
cd('/SystemComponent/'+formsSysCompName)
cmo.setComponentType('FORMS')
set('Machine', vmName)
updateDomain()
closeDomain()
EOF
Run the script with WLST offline mode, the script should be completed without errors.
/u01/app/wls/install/oracle/middleware/oracle_home/oracle_common/common/bin/wlst.sh create-forms3.py
Restart the domain and Admin Server to cause changes happen. It takes about 10 min for the Admin Server up.
sudo systemctl start wls_admin
Access http://adminserver-ip:7001/console from browser to make sure the Admin Server is up.
Now, you have finished updating the domain. Let's pack the domain and apply the domain to new machine.
Pack the domain on adminVM:
ssh weblogic@adminVM
sudo su - oracle
rm /tmp/cluster.jar -f
cd /u01/app/wls/install/oracle/middleware/oracle_home/oracle_common/common/bin
bash pack.sh -domain=/u02/domains/wlsd -managed=true -template=/tmp/cluster.jar -template_name="ofrwlsd"
Copy the domain package to mspVM3: scp /tmp/cluster.jar weblogic@mspVM3:/tmp/cluster.jar
Create domain on mspVM3 and start node manager following Create domain for managed servers
To enable Reports in process server, you are required to create and start Reports Tools Component. Follow the steps to enable Reports Tools component for new Reports replicas.
SSH to adminVM: ssh weblogic@adminVM
Use oracle user: sudo su - oracle
Prepare Python script to create Reports component, please modify value of adminServerIP
, wlsUsername
, wlsPassword
and index
.
# the virtual IP address created in [Configure Virtual IP for Admin Server](#configure-virtual-ip-for-admin-server)
adminServerIP=10.0.0.16
# Username of WebLogic admin account
wlsUsername="weblogic"
# Password of WebLogic admin account
wlsPassword="Secret123456"
# Keep the index value the same with Azure Virtual Machine index
index=3
repToolsName="reptools${index}"
repToolsTargetMachine="mspVM${index}"
cat <<EOF >create-reportstools.py
connect("${wlsUsername}","${wlsPassword}", "${adminServerIP}:7001")
createReportsToolsInstance(instanceName="${repToolsName}", machine="${repToolsTargetMachine}")
EOF
Run the script using WLST online mode, the script should be completed without errors.
/u01/app/wls/install/oracle/middleware/oracle_home/oracle_common/common/bin/wlst.sh create-reportstools.py
Start Reports system components on mspVM3, the commands should be completed without errors.
Replace reptools3
with your component name, should be reptools${index}
created in last step.
cd /u02/domains/wlsd/bin
# the command will ask for node manager password
./startComponent.sh reptools3
Forms and Reports system components on mspVM3 are ready, and node manager is up on mspVM3. Let's start the managed server from console portal.
Let's start Reports in process server from browser.
http://<mspVM3-ip>:9002/reports/rwservlet/startserver
1|0
from the browser if the server is up.Note: if you have setup Applcation Gateway for load balancing, add the private IP of your new machine to backend pool. then the Applicatin Gateway is able to managed the traffic to the new replicas.
This sample will use Azure Application Gateway as the top level load balancing of Forms cluster.
Follow the step to create the Application Gateway, you must enable Cookie-based affinity
for Forms applciation. Make sure you are using a correct backend port, here is 9001
.
9001
.Wait for the resources completed.
FORMS-HEALTH-PROBE
127.0.0.1
. Do not change the value./forms/frmservlet
After the health probe is completed without error, associate the http setting with the probe.
FORMS-HEALTH-PROBE
Check the backend health:
Then you should be able to access Forms using private IP of application gateway.
If you want to also manage the traffic to Reports cluster, you can add Path-based routing to /reports/rwservlet
in the rule.
The high availability of applications in the Forms and Reports environment is realized by clustering. Managed servers in the cluster work together. The information about transactions is distributed cluster-wide. If a cluster member fails, another server takes over the tasks of the failed server and executes them. In this way, the applications are kept running without interruption.
The Admin Server is a single point of failure: if the server fails, the Domain is no longer administrable:
– Configuration changes cannot be performed
– The administration console is not available
The managed servers are still running and can continue to work, even if the Admin Server is not available, you can find Oracle Fusion Middleware High Availability Guide for more information.
This section enables high availability on Administration Server based on the virtual IP address you created previously in Configure Virtual IP for Admin Server, now you can use one of the approaches to achieve that:
The following table lists some difference between two approaches:
Difference | Use a pre-defined backup machine | Use Azure Site Recovery |
---|---|---|
Share domain configuration | Yes. Use Azure NFS File share. |
No. |
Auxiliary Azure Services | Azure Automation Account for automation. | Azure Site Recovery for Azure VM Zone to Zone recovery. Azure Automation Account for automation. |
Additional infrastructure | Azure NFS File Share for shared domain configuration. Azure Virtual Machine, Azure Network Interface and Azure Disk for backup host. |
No. |
RTO | 3-9 min. Need not shutdown the primary machine: 3-5 min. Have to shutdown the primary machine: 8-9 min. |
8-20 min. Need not shutdown the primary machine: 8-12 min. Have to shutdown the primary machine: 15-20 min. |
Pros and Cons | Pros: 1. Save time to provision a new machine. Cons: 1. Domain configuration in NFS share may cause longer network latency and effect the performance of Admin Server. 2. Extra cost for the pre-defined machine. |
Pros: 1. No additional infrastructure. 2. Leverage ASR to backup and protect the running machine. Cons: 1. Takes longer to failover as it has to provison target resources. 2. Extra cost for ASR. |
To move on, make sure you have enabled secondary IP for Admin Server, see Configure Virtual IP for Admin Server.
To make sure the domain configuration is the same in both machines, this approach move the domain configuration to shared storage, this sample uses Azure File NFS share.
Let's create an Azure Storage Account and NFS share from Azure Portal, you must select Premium sku to enable NFS share.
stgwlsdomain
.After the deployment finishes, you have enable the private access from your WebLogic machines to the storage account.
Let's create the NFS share.
wlsdomain
After the NFS share deployment completes, you are able to mount it to adminVM.
This sample saves the domain configuration in /u02
. You will move all the data in this directory to NFS share. Before you move the data, you are required to back up the data in the directory and then create a mount point with directory /u02
. To avoid conflict between the mounted file system and the OS disk, let's delete the directory before mounting the NFS share.
SSH to adminVM with command ssh weblogic@adminVM
, switch to root
user sudo su -
Stop Admin server and node manager
sudo systemctl stop wls_nodemanager
sudo systemctl stop wls_admin
kill -9 `ps -ef | grep 'Dweblogic.Name=admin' | grep -v grep | awk '{print $2}'`
Bake up domain configuration and remove /u02
zip -r /u01/oracle/u02.zip /u02
rm /u02 -f -r
Mount NFS share. Install nfs-utils.
sudo yum update
sudo yum install -y nfs-utils
Edit /etc/fstab
and add a mount point. Replace the variable value with yours.
storageAccountName=stgwlsdomain
nfsShareName=wlsdomain
mkdir /u02
echo "${storageAccountName}.file.core.windows.net:/${storageAccountName}/wlsdomain /u02 nfs defaults 0 0" >> /etc/fstab
mount /u02
Move the domain configuration to NFS share
unzip -j /u01/oracle/u02.zip -d /u02
chown oracle:oracle /u02 -R
Now you have successfully moved domain configuration to NFS share. The next steps are created a backup machine from the snapshot of current adminVM.
Take a snapshot from adminVM OS disk. Note that do not use this snapshot to create managed machine for managed servers.
Create backup machine based on the snapshot:
hostnamectl set-hostname hostname
. For example, command to set hostname adminvmbak
: hostnamectl set-hostname adminvmbak
Now you have adminVM as the primary host and adminVMBak as backup host. Domain configuration are stored in NFS share, and share between both machines. Changes from Admin Server that runs on either machine are persisted to NFS share.
Before testing, let's start Admin Server by starting adminVM from Azure Portal. Make sure you are able to access Console portal or EM from browser.
Follow the steps to test failover manually:
ipconfig2
which was configured with virtual IP of Admin Server.ipconfig2
with static IP address, here is 10.0.0.16
.You should be able to access Admin Server and have the same domain configuration as that runs on adminVM.
You are able to automate assigning secondary IP using AssignIP-Workflow.ps1 in Automation Account. Follow Azure Automation Account to create Runbook and configure credentials. The script is using user managed identity, you must assign at least Contributor role to the user identity.
Azure Site Recovery will back up the disk of VM once you enable and protect the replica, you need not move the domain configuration to shared storage.
Follow the step to enable ASR:
Target settings, please note down the target resource group, you will use it in the automation script. | General settings | Source | Target |
---|---|---|---|
Subscription | Source subscription | Target subscription | |
VM resource group | Do not change | Append -asr to the end of source resource group name. |
|
Virtual network | Do not change | Do not change | |
Availability | Availability zone 1 | Availability zone 3 | |
Proximity placement group | Not applicable | Select new group |
It takes about 1 hour for the resources ready. Once the deployment completes, you are able to find the replica from Recovery service vault.
ASR allows you to test failover in a seperated vnet. You are able to test failover to validate VM resource, but the Admin Server fails to access managed servers in a seperate vnet.
Follow the steps to start failover.
shutdown virtual machine
if your adminVM is running.It takes about 15 min to complete the failover steps. You still need to assign the virtual IP address of Admin Server to the target machine:
ipconfig2
which was configured with virtual IP of Admin Server.ipconfig2
with static IP address, here is 10.0.0.16
.You have to commit the failover after Admin Server is up: select Protected items -> Replicated istems -> adminVM -> commit.
You are able to automate above steps with a custom recovery plan.
Before creating a custom plan, you're required to have an automation account in a different region:
Now you are ready to create a custom plan:
After the plan is completed, open the plan, you will find Customize button, hit that button and add a post action to group 1.
Steps to add post action to group 1:
Save the recovery plan. The plan is able to assign IP to target VM automatically.
Open the plan and click failover, the plan will provison and start target machine in the target resource group. You have to commit the failover after Admin Server is up: select the plan and click Commit.
Please note that, if you fail back from target machine to source machine, you have to assign IP maunaully, the plan will not trigger the post action for Re-protect.
Validate the Forms testing application.
Make sure the application is running in each managed server.
http://<mspvm1-ip>:9001/forms/frmservlet
http://<mspvm2-ip>:9001/forms/frmservlet
http://<mspvm3-ip>:9001/forms/frmservlet
http://<mspvm1-ip>:9002/reports/rwservlet
http://<mspvm2-ip>:9002/reports/rwservlet
http://<mspvm3-ip>:9002/reports/rwservlet
Make sure the application gateway is able to access Forms application.
http://app-gateway-ip/forms/frmservlet
Delete the resource group from Azure portal.
EM is slow
Enable caching of FMW Discovery data.
SSH WARNING: POSSIBLE DNS SPOOFING DETECTED!
You may run into this error when connecting a machine using SSH, see the details:
[oracle@adminVM1 bin]$ scp /tmp/cluster.jar weblogic@mspVM3:/tmp/cluster.jar
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: POSSIBLE DNS SPOOFING DETECTED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The ECDSA host key for mspvm3 has changed,
and the key for the corresponding IP address 10.0.0.10
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:VEn4PQNWtIJhA337odSkzhPS1rIZ6oz0Bco6+ZNuvsk.
Please contact your system administrator.
Add correct host key in /u02/oracle/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /u02/oracle/.ssh/known_hosts:2
ECDSA host key for mspvm3 has changed and you have requested strict checking.
Host key verification failed.
lost connection
Solution: remove ~/.ssh/knownhosts
Reports failure: REP-50125: org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 208 completed: No
Error details:
[2008/7/10 4:15:49:891] Info 56025 (RWServer:startServer): Reports Server is starting up
[2008/7/10 4:15:50:274] Exception 50125 (org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 208 completed: No
at com.sun.corba.se.internal.corba.ORB.getLocalHostName(ORB.java:924)
at com.sun.corba.se.internal.corba.ORB.checkApplicationPropertyDefaults(ORB.java:880)
at com.sun.corba.se.internal.corba.ORB.set_parameters(ORB.java:457)
at com.sun.corba.se.internal.POA.POAORB.set_parameters(POAORB.java:153)
at com.sun.corba.se.internal.Interceptors.PIORB.set_parameters(PIORB.java:333)
at org.omg.CORBA.ORB.init(ORB.java:337)
at oracle.reports.utility.Utility.createORB(Utility.java:1902)
at oracle.reports.server.RWServer.startServer(RWServer.java:764)
at oracle.reports.server.RWServer.jniMain(RWServer.java:243)
): Internal error org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 208 completed: No
[2008/7/10 4:15:50:282] Info 50002 (RWServer:shutdown): Server is shutting down
Root cause: incorret hostname and ip address.
Solution: double check entries in /etc/hosts. See Oracle support doc.
ERROR: Temporary directory /tmp does not have enough free space.
-bash-4.2$ ./fmw_12.2.1.4.0_fr_linux64.bin
ERROR: Temporary directory /tmp does not have enough free space. At least 3134 MB of free space are required.
Please input another directory or [Exit]:
Solution: specify a tmp folder
sudo su - oracle
# create a tmp folder
mkdir /u01/oracle/tmp
# export DISPLAY variable
export DISPLAY=<yourWindowsVMVNetInternalIpAddress>:0.0
# install again
./fmw_12.2.1.4.0_fr_linux64.bin -J-Djava.io.tmpdir=/u01/oracle/tmp
How to copy files to WLS machine?
You are able to use scp
command to copy files to WLS machine, if you want to enable WLS proccess to access those files, make sure the copied files are owned by oracle
.
The following example copys files from local machine to mspVM1:
scp mylibs.zip weblogic@<mspvm1-ip>:/home/weblogic/mylibs.zip
Now, SSH to mspVM1 and unzip the files to /u01/oracle/mylibs
.
ssh weblogic@<mspvm1-ip>
sudo su
unzip /home/weblogic/mylibs.zip -d /u01/oracle/mylibs
rm /home/weblogic/mylibs.zip
Go to /u01/oracle/mylibs
and valid the files. Set the file ownership:
chown oracle:oracle /home/oracle/mylibs -R
Now you are able to use oracle
user to move to files to any place that owns by oracle
.
The following example is to move files to /u02/domains/wlsd/lib/
mv -R /home/oracle/mylibs/* /u02/domains/wlsd/lib/
To check the owner of files:
ls -l /u02/domains/wlsd/lib/