Overview of the Enterprise application installation process in a
Network Deployment environment
Listed below is the sequence of steps for installing an enterprise
application archive (EAR) file using wsadmin or the
administrative console.
- Start the installation process.
- After the successful installation, you receive the following response.

wsadmin equivalent:
- It is important to save the changes before managing the application;
select Save to Master Configuration.
- During this operation you are prompted to Synchronize changes with
Nodes.

wsadmin equivalent:
- In a Network Deployment environment this synchronize process transfers
the binary files to the following locations in the selected
federated_Base_Nodes:
federated_Base_Node\config\cells\cell_name\application
federated_Base_Node\installedApps
- Start the application.
The above process works with a smaller-size application. When an
application EAR size is larger than ~40 MB, you might have trouble using
the automated wsadmin installation process.
Automated scripting Installation process
After installing an application using a scripting tool such as wsadmin, if
you try to start the application immediately after the installation,
you get the following message.
The message indicates that the installation process is complete.
However, this does not mean that binary distribution is completed between
nodes. No further commands can be processed until the distribution
completes. Consequently, if you issue another command (for example, start
the application), it fails because the application deployment on any given
node is indeterminate.
Time required for the binary distribution to complete varies based on
the size of the application, the number of configuration changes, and
network delay (remote nodes) . Similar problems occur when trying to
uninstall a large application.
Why does this occur?
During Node synchronization after an installation, the application is
received by the node in the /config directory. However, it
is expanded in /installedApps using a separate thread
that is spawned during the synchronization process. This means that the
synchronization might return while the expansion is still occurring. A
notification is issued after the copy into the /config directory
completes.
There is currently no notification issued on completion of the .ear
expansion. Waiting for the expansion to complete before the
synchronization complete notification is issued can cause timeout
problems.
In the above scenario, it does not help to confirm that the
Synchronization process is complete before the application starts.
In this wsadmin sync example we expect to get a true message
only after completing binary Distribution to all the selected
Federated_Base_Nodes directories.
Federated_Base_Node_Root\config\cells\cell_name\applications
Federated_Base_Node_Root\installedApps\cell_name\application.ear
But we will get the true message while files are still being
distributed to application directories.
Federated_Base_Node_Root\installedApps\cell_name\application.ear
Administrative console equivalent:
In a console save operation, if you select Synchronize
changes with Nodes, you might return to the Console Home page
while the binary Distribution is in process. This is equivalent to wsadmin
true output.
The same behavior is noticed from either a Full Resynchronize or a
Synchronize operation.
Here, it always shows the start of the sync process, but not the
end.
In summary, WebSphere is not monitoring the EARExpansion/Binary
Distribution process
(to
Base_Root\installedApps\cell_name\application.ear
directory).
How to overcome this situation
If you know the exact time required for copying files to
Base_Root\installedApps\cell_name\application.ear,
you could delay the next operation.
The following example illustrates the Jacl forceSync function, which
you can use to synchronize and wait before running the next command:
proc forceSync {} {
global AdminControl
if {[catch {$AdminControl queryNames type=NodeSync,*} result]} {
puts stdout "\$AdminControl queryNames type=NodeSync,* caught an
exception $result"
} else {
if {$result != {}} {
foreach nsync $result {
set syncResult false
while {$syncResult != "true"} {
puts stdout "Force NodeSync on $nsync"
if {[catch {$AdminControl invoke $nsync sync ""} syncResult]} {
puts stdout "\$AdminControl invoke $nsync sync \"\" caught an exception
$syncResult"
return
} else {
puts stdout "Sync Result on $nsync is $syncResult"
}
}
}
# wait for 1 minute to make sure sync done puts stdout "Time out for 1
minute to make sure sync is done"
after 60000
}
}
}
The time required varies, so it is not possible to predict. The result is
that you cannot get the correct status for application deployment. In the
worst case, if you uninstall and then reinstall, the
installedApps directory is inconsistent. Stopping and restarting
WebSphere Application Server also results in an unstable
installedApps directory. In other words, scripted deployment of
this application is currently impossible.
Workaround:
One possibility is disabling the expansion and using the EAR expander
tool. You could then have more control over the expansion and be able to
tell when it is done.
Using wsadmin
Sample install command using nodistributeApp
option.
nodistributeApp
Specifies that the application management component does not distribute
application binaries.This option does not require a value.The default
setting is distributeApp.
- Install the Application using following nodistributeApp option.
wsadmin>$AdminApp install
My_Root/installableApps/DefaultApplication.ear
{-node MyNode -cell
MyCell -server
MyServer -appname
MyApplication
-nodistributeApp}
- Complete the Save and Synchronize operations.
- Expand the ear file to the corresponding BaseNodes using EARExpander.
- Manage the application (Application Start/Stop).
Using the Administrative Console
If you use the console for application installation, deselect the
Distribute Application check box during Step1 of the installation
process.
|