WEA Starting and Stopping on AIX

WEA Startup After AIX Reboot
WAS/WEA Stopping Procedure
 

A very useful axiom to remember when becoming acclaimated to the AIX world is "AIX is not Windows" (per Bruce Kohler)

WEA Startup After AIX Reboot

If you are using DSview to access your machine, you might have to align your mouse. See Aligning Your Mouse and Video for this procedure.

The following procedure assumes you have just rebooted a machine. Dependant upon the version of the build, you MIGHT not need to perform some of these operations to restart all components. Some of the following instructions require the usage of the AIX "ps" ("show process(s)") command, piped into an associated "grep" to search for a particular string. Usually when you invoke this command, the command itself spawns a process, so be sure to avoid the mistake of thinking the "grep" process is the process the step requires you confirm exists. Things that are required for a full running system follow.

Start Directory Server
Start DB2 Instance
Start Oracle Services
Start INS/ESS Java DB2 Process
Start HTTP Server
Start WAS
Start WAS Console
Start all WAS Apps
Starting the Intelligent Notification Server
Starting the Everyplace Synchronization Server
 

Start Directory Server

Assure the process "slapd" is running (i.e. "ps  -ef | grep slapd"). If not, invoke it from the AIX Command prompt (i.e. "/usr/ldap/bin/slapd"). Once this process is created, a subsequent "ps  -ef | grep slapd" should reflect "ldap #####     1   1  HH:MM:SS      -  HH:MM   /usr/bin/slapd" (where ##### is the process number, HH:MM... is Hours: Minutes:Seconds, and "/usr/bin/slapd" reflects the process name), and of course the "ps" command will reflect the "grep slapd" ran also.

An Example of "ps -ef  | grep slapd" :

    ldap 28872     1   3   May 12      - 29:31 /usr/bin/slapd
    root 79488 77924   1 17:14:31  pts/4  0:00 grep slapd
 

Start DB2 Instance

Dependant upon how the machine was brought down, the DB2 instance might or might not be running. Regardless, you should attempt to start it. Switch user to your db2instance (i.e. "su - wasinst", or "su  - db2inst1") and from the command prompt type "db2start". If it is already started, attempting to restart will simply state it is already active. Either perform the step Start INS and ESS Java DB2 Process while still in DB2 command mode or type "exit" to exit this mode.
 
 

Start Oracle Services

For Oracle database, you need to start the Oracle listener and server. Perform the following actions as required.

When starting Oracle® (e. g. the server manager or listener) and it fails with messages like "Symbol resolution failure", the problem is probably due to the fact that the asynchronous I/O feature of the operating sytem is not activated. This can be corrected by performing one of the following procedures as "root". You can temporarily (until reboot of the machine) or permanently (survives reboot) set the AIO .

Setting the Asynchronous I/O Permanently

1) From the AIX command prompt type "smitty aio".

2) Select "Change / Show Characteristics of Asynchronous I/O".

3) For the  "State to be configured at system start time" field, press the "Tab" key to change the value to "available", press the "Enter"
key, then reboot the machine when the "Command:  OK" appears.
 

Setting the Asynchronous I/O Temporarily

1) From the AIX command prompt type "smitty aio".

2) Select "Configure Defined Asynchronous I/O". This will turn on asynchronous I/O support only as long as the machine is not
rebooted (This feature will be turned off if the system is rebooted).
 

Start The Listener

To start the Listener, from the AIX command prompt type "su  -  oracle", then enter the following commands:
 

$  lsnrctl
LSNRCTL for IBM/AIX RISC System/6000: Version 8.1.7.0.0 - Production on 17-JAN-2003 17:29:26
blah blah blah

LSNRCTL> start
LSNRCTL> quit
 

Start The Oracle database Server (Oracle 817)

1) Log in as the user oracle (i.e. by entering the command "su - oracle "

2) To start the database, at the "$" prompt, enter the command "svrmgrl".

3) At the "SVRMGR>" prompt, type "connect internal".

4) Again, at the "SVRMGR>" prompt, type "startup".
 

Start The Oracle database Server (Oracle 9201)

1) Log in as the user oracle (i.e. by entering the command "su - oracle "

2) From the Oracle command prompt ("$"), type the following:

    sqlplus /nolog
    connect  /  as sysdba
    startup
    quit
 
 
 

Start INS and ESS Java DB2 Process (if ESS or INS use DB2)

From the AIX command prompt, assure the "db2jd  6789" process is running (i.e. "ps -ef | grep 6789"). If it is not running switch users to the appropriate database instance (i.e. "su - wasinst")  and execute the DB2 Java start command with the appropriate paramater (i.e. "db2jstrt  6789"). Ttype "exit" to exit the DB2 command mode.

An Example of "ps -ef  | grep  6789" :

 wasinst 39324     1   0   May 12      -  0:00 db2jd 6789
    root 79490 77924   0 17:15:30  pts/4  0:00 grep db2jd
 
 

Start HTTP Server

Assure the "httpd" process has started by executing the Apache Control program with the "start" parameter (i.e. "/usr/HTTPServer/bin/apachectl  start")
 
 

Start WAS

Note: if this is an Oracle installation, you must first source the ".profile" of the db2 instance user before starting the WebSphere Administration Server.

If the basic WebSphere Administration Server is running there should be 2 processes available, a "nanny" process and the Admin Server processes. You can assure they are running by issuing the command "ps -ef | grep admin.config" (both are quite verbose). If both are not running you must execute the WAS startup script "startupServer.sh" (i.e."/usr/WebSphere/AppServer/bin/startupServer.sh &"). You should wait several minutes before attempting to perform the next step.

An Example of "ps -ef  | grep admin.config":

    root 23614 28092   0   May 12      -  7:47 /usr/WebSphere/AppServer/java/jre/bin/java -Xmx128m -Xminf0.15 -Xmaxf0.25 -Xms17M -Djavax.rmi.CORBA.UtilClass=com.ibm.CORBA.iiop.Util -Dcom.ibm.CORBA.iiop.noLocalCopies=true -Dws.ext.dirs=/usr/WebSphere/AppServer/java/lib:/usr/WebSphere/AppServer/classes:/usr/WebSphere/AppServer/lib:/usr/WebSphere/AppServer/lib/ext:/home/wasinst//sqllib/java12/db2java.zip -classpath /usr/WebSphere/AppServer/properties:/usr/WebSphere/AppServer/lib/bootstrap.jar com.ibm.ws.bootstrap.WSLauncher com.ibm.ejs.sm.server.AdminServer -bootFile /usr/WebSphere/AppServer//bin/admin.config -nodeRestart
    root 28092  5118   0   May 12      -  0:08 /usr/WebSphere/AppServer/java/bin/java -classpath /usr/WebSphere/AppServer//lib/bootstrap.jar:/home/wasinst//sqllib/java12/db2java.zip:/usr/WebSphere/AppServer//properties -Dws.ext.dirs=/usr/WebSphere/AppServer/java/lib:/usr/WebSphere/AppServer/classes:/usr/WebSphere/AppServer/lib:/usr/WebSphere/AppServer/lib/ext:/usr/WebSphere/AppServer/web/help:/home/wasinst//sqllib/java12/db2java.zip -Djavax.rmi.CORBA.UtilClass=com.ibm.CORBA.iiop.Util -Dcom.ibm.CORBA.iiop.noLocalCopies=true -DDER_DRIVER_PATH= com.ibm.ws.bootstrap.WSLauncher com.ibm.ejs.sm.util.process.Nanny /usr/WebSphere/AppServer//bin/admin.config
    root 79486 77924   0 17:14:02  pts/4  0:00 grep admin.config

There should also be an entry in the "/usr/WebSphere/AppServer/logs/tracefile" reflecting "Server __adminServer open for e-bitness".
 
 

Start WAS Console

Once WAS has been started you must start the WAS Administration Console, which will be used to start any required application servers. The script "adminclient.sh" must be started to invoke the Admin Console (i.e."/usr/WebSphere/AppServer/bin/adminclient.sh &"). It takes a few minutes for the Admin Console to appear, and you will be queried for the WAS ID/PW (i.e. "wpsadmin").
 
 

Start all WAS Apps

From the Admin Console, scope down through "WebSphere Administrative Domain", "Nodes", select your node (i.e. "wea2aix2"), select "Application Servers", then one by one, select each application, right mouse click and select "Start".  For each WAS application server started, an additional java process will be started on your system. After all app servers are started, there will be at least 10 java processes running, all with VERY verbose process labels.
 
 

Starting the Intelligent Notification Server

To use the INS functions and portlets you must start the backend applications "startADM" and "startHA". These utilities are located in the "/usr/WebSphere/INS/bin" directory and are executed from the AIX command prompt. Both should be started piping their console output to a file (see following examples). The utility "startADM" requires one parameter, the name of the machine you are on (e.g. "./startADM  wea2aix2  2>&1  |  tee  /INS.startADM"). Then from a second AIX window run the "startHA" utility (e.g. "./startHA  2>&1  |  tee  /INS.startHA"). Once these utilities are started, each in their own window, that window becomes a logging console for the utility (a "ps -ef | grep startADM" and "ps -ef | grep startADM" should reflect these processes are running)

Every time you restart "startADM" and "startHA", you must stop and restart the INS Portlet_WPS_PA" WAS Enterprise Application, and then stop and start these two processes again.

Once these two processes have been started, you should then be able to use the browser of your choice, connect to URL "http://(yourmachinename).raleigh.ibm.com/wps/portal", login as "wpsadmin", select the "Intelligent Notification" tab, click on "Manage Servers", and click "Run All Servers". After several seconds all of the servers should be in the "Running" state.
 
 
 

Starting the Everyplace Synchronization Server

From an AIX window change directories to "/usr/WebSphere/IBMSyncServer/caf/bin" and start the ESS backend server. This should be started piping its console output to a file (e.g. "esscmd init    2>&1  |  tee  /ESS.esscmd.init"). You should then be able to use the browser of your choice, connect to URL "http://(yourmachinename).raleigh.ibm.com/wps/portal", login as "wpsadmin", select the "Everyplace Synchronization" tab, and see that your server is running (a "ps -ef | grep esscmd" should reflect this process is running).
 
 
 
 
 

WAS/WEA Stopping Procedure

This process assumes you want to stop the WEA component(s), and does not include stopping other systems (i.e. DB2, IBM Directory Server, and the IBM HTTP Server). Note that there is an application server called "WEA Server", which can be manually stopped and started. This section assumes that the WEA Server application server is just another application server.

Stopping WAS/WEA Gracefully
Manual Stop of WAS
Manual Stop of All App Servers And WAS
Stopping Remaining Servers
Stop Oracle Services
Stopping IBM Directory Server
Stopping DB2
Stopping IBM HTTP Server
 

Stopping WAS/WEA (DIS)Gracefully
 

Stopping WAS/WEA Gracefully

The proper way to stop WEA gracefully is to use the WAS Administration Console to stop any required application servers and WAS. The script "adminclient.sh" must be started to invoke the Admin Console (i.e."/usr/WebSphere/AppServer/bin/adminclient.sh  &"). The technique you use to shut down WEA/WAS will determine how WAS/WEA will restart. When you stop WAS and restart it, it will attempt to automatically restart all application servers that were running when you stopped WAS. However, if you stop all application servers then stop WAS, WAS will not attempt to restart your stopped application servers and you will need to manually start them if desired.

Once the WAS Console is started, scope down through "WebSphere Administrative Domain", "Nodes", select your node (i.e. "wea2aix2") and then perform Manual Stop of WAS or Manual Stop of All App Servers And WAS.
 

Manual Stop of WAS

To gracefully stop WAS and all running application servers at once, simply select your node, right mouse click, and select "Stop". In the "Confirm" popup, click "Yes".

Manual Stop of All App Servers And WAS

Manually Stop All Application Servers, from the WAS console scope down to and select "Application Servers", then one by one, select each application server, right mouse click and select "Stop". Once all application servers have been stopped, select the node (i.e. "wea2aix1"), right mouse click and select "Stop". In the "Confirm" popup, click "Yes".
 

Stopping Remaining Servers

If you have started any WEA components servers (i.e. INS's "startADM" etc, or ESS's "esscmd init"), you will need to stop these processes by typing Ctrl/c in the window you started them in (OR) from the AIX command prompt, manually stop all associated Java processes using the "kill -9" method (i.e. "kill  -9  12345). You can list all Java processes by using the command "ps -ef  | grep java". Note that you will be killing all Java processes, so if you have a java process running which you know is not associated with WEA/WAS, you might not want to stop that one.
 

Stop Oracle Services

For WEA Oracle database SIDs, you need to stop the Oracle DB (for UNIX). After assuring all connections are down (no applications are connected to the database) perform the following actions:

Oracle 817 and 9201

su  - oracle
sqlplus /nolog
connect / as sysdba
shutdown  immediate      (use "help shutdown" if you are not stupid)
quit

Stop Listener

su - oracle
lsnrctl
stop

Stopping IBM Directory Server

From the AIX command prompt, determine the "slapd" process (i.e. "ps  -ef  | grep slapd"), and then kill that process (i.e. "kill  -9  12345").
 

Stopping DB2

From the AIX command prompt, go to the directory "/usr/lpp/db2_07_01/instance", and type the command "./db2ishut".
 

Stopping IBM HTTP Server

Assure the "httpd" process has stopped by executing the Apache Control program with the "stop" parameter (i.e. "/usr/HTTPServer/bin/apachectl  stop")
 
 
 

Stopping WAS/WEA (DIS)Gracefully

If your WEA system has totally lost it's lunch, a "disgraceful" stop is probably in order. To perform this, from the AIX command prompt, manually stop all associaited Java processes using the "kill -9" method (i.e. "kill  -9  12345). You can list all Java processes by using the command "ps -ef  | grep java". Note that you will be killing all Java processes, so if you have a java process running which you know is not associated with WEA/WAS, you might not want to stop that one.

Or, (provided by Marcus Belvin, "ps -ef | grep WebSphere | awk '{print $2}' | xargs kill -9") Note, Steve aint tried this!