Академический Документы
Профессиональный Документы
Культура Документы
Exercises
Jason T. Moore
Jason_moore@us.ibm.com
Accelerated Value Program | Field Support Services
Lab Requirements
An interest in learning how to use WebSphere Application Server
Setup
This lab will utilize the following software packages. 7.0.0.11 was chosen for this lab
because at the time it was the supported release of WSAS for Lotus Connections 3.0.
The concepts covered in this lab will apply to any fixpack of WAS 7.0.
The following software packages will be used in this package. The first packages
marked with a * are available through your passport advantage download website. The
others are publicly available fixpacks found on FixCentral at www.ibm.com.
*C1G32ML.tar WebSphere Application Server Network Deployment V7.0
*C1G33ML.tar IBM HTTP Server and WebSphere Application Server Web Server Plugins V7.0
7.0.0.11-WS-UPDI-LinuxIA32.zip = WebSphere Update Installer
7.0.0-WS-WASSDK-LinuxX32-FP0000011.pak WebSphere JAVA SDK Fixpack
7.0.0-WS-IHS-LinuxX32-FP0000011.pak - IBM HTTP Server Fixpack
7.0.0-WS-PLG-LinuxX32-FP0000011.pak WebSphere Application Server Web Server Plugin Fixpack
7.0.0-WS-WAS-LinuxX32-FP0000011.pak WebSphere Application Server Fixpack
Page 2 of 28
Agenda
Page 3 of 28
Exercise Instructions
Network Deployment
5. Click Next, accept the terms and conditions, click next. You may be prompted
with a screen regarding the failure of the OS pre-requisite checking. Ignore this
and click next.
6. Now you will be prompted to install that sample applications. Normally you
wouldn't install these in a production environment, but for our purposes today you
will want these applications. Please check the box next to Install the sample
applications.
Page 4 of 28
7. Next you will be asked for the installation directory. Accept the default of
/opt/IBM/WebSphere/AppServer
Page 5 of 28
8. Now that we are passed all the easy stuff we finally get to an important screen.
Most of the time the Application Server environment will be selected. However,
in this case we are going to select Cell. This is so you can learn about the
features of Network Deployment. When selecting Cell the installer will do the
following steps: Install WAS Network Deployment, Create a Deployment
Manager Profile, Create an Application Server Profile, and federate the
Application Server Profile to the Deployment Manager.
Security during the installation process. In prior versions this step could only be
done during post installation configuration. The account you create in this step
can be changed or modified after installation. Please enter wasadmin as the
username and any password you like (password is perfectly acceptable in this
lab environment). Also you will need to set a password for the samples user to
interact with the sample applications. Choose any password you like then hit
next.
Page 6 of 28
Page 7 of 28
12. Once installation is complete you will see the following screen. Look for the
green Success message on the top left to ensure that the install completed
successfully.
Ensure that the Launch the First steps console check box is selected then
click Finish.
Page 8 of 28
13. Select Start the deployment manager from the First steps window.
Page 9 of 28
14. Once the deployment manager (dmgr) starts then you can proceed to launching
the nodeagent and the application server. The application server cannot be
started until the nodeagent is running. Open a terminal (icon on the desktop) and
execute
cd /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/
then execute
./startNode.sh
15. Now that the deployment manager and nodeagent are running we can use the
Integrated Solutions Console (a.k.a. ISC or WAS Admin Console) to start the
application server. Launch the ISC in a browser by going to
http://ibmlab.avp.ibm.com:9060/ibm/console
16. Since security is enabled the browser will be redirected to SSL. During the
installation of WAS a self signed dummy keyfile was created. Therefore, your
browser will throw a warning asking you to accept the SSL certificate. Please
accept the certificate and continue. Login using the credentials you entered
during the installation.
User ID: wasadmin
Password: <your password>
Page 10 of 28
17. Using the Integrated Solutions Console navigate to Servers -> Server Types
Application Servers. Place a checkmark in the box next to server1 then click
the Start button.
18. When using Lotus Domino you had a server console to monitor the server startup
messages. WebSphere does not have a console, but you can mimick the
Domino console by tailing the SystemOut.log. Using a terminal run the following
commands.
cd /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1
tail -f SystemOut.log
(Note*** If you installed WebSphere to a different path than the cd command will
need to be updated to point to your path)
19. You will now have a live look at the SystemOut log file. This is the main
WebSphere log file and will be useful to monitor during troubleshooting.
Page 11 of 28
20. Use the Top command to view the running WebSphere processes. Once Top
is started type a capital M to sort by memory usage. You should have three java
processes which represent the dmgr, nodeagent, and server1. As in this
screenshot:
Page 12 of 28
21. Now let's figure out which java belongs to which WebSphere process. This is
necessary for troubleshooting. You'll need to know which process is which when
you want to see how much CPU or Memory is being consumed or if you need to
kill the process. Open File Browser then browse to the logs directory for the
Deployment Manager ->
/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/logs/dmgr. Open
startServer.log and scroll to the bottom of the file. You should find some output
similar to this example:
[3/8/10 11:48:58:562 CST] 0000000a AdminTool
Dmgr01 profile
[3/8/10 11:48:58:562 CST] 0000000a AdminTool
server: dmgr
[3/8/10 11:49:02:281 CST] 0000000a AdminTool
initialization status.
[3/8/10 11:49:35:843 CST] 0000000a AdminTool
business; process id is 1876
Notice that the process id (PID) for the dmgr process is available in this log. Now
you can take this PID and compare it with the java processes in Top.
Now do the same thing for the nodeagent. The logs for these servers will be in
/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/. Server1 will not have a
startServer.log if you started via the dmgr console.
22. Verify that the servers are up and running through the use of WebSphere
command lines.
To check the nodeagent and server1 run this command from the AppSrv01 bin directory:
/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/serverStatus.sh -all -username
wasadmin -password password
To check the dmgr run this command from the Dmgr01 bin directory:
/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/serverStatus.sh -all -username
wasadmin -password password
Page 13 of 28
3. Set the following two options to match the credentials for your WebSphere
Administrator:
com.ibm.SOAP.loginUserid=wasadmin
com.ibm.SOAP.loginPassword=password
4. Save soap.client.props
5. Open a terminal and change to
/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin
6. Execute the following command to use the Properties File Encoder to encrypt
your password. This command is all on one line and is CASE sensitive:
./PropFilePasswordEncoder.sh <there is a space here>
/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/properties/soap.client.props <there is
a space here too> com.ibm.SOAP.loginPassword
7. Reopen
/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/properties/soap.client.props
in a text editor. You should now see that your password is encrypted like the
following the example:
com.ibm.SOAP.loginPassword={xor}Lz4sLCgwLTs/=
8. For further information reference the infocenter at
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.n
d.doc/info/ae/ae/tsec_protplaintxt.html
Page 14 of 28
9. Now you can run console commands like serverStatus.sh without entering
credentials. Try the command from the previous exercise. To check the
nodeagent and server1 run this command from the AppSrv01 bin directory
/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/serverStatus.sh -all
3. Note: If you have personal firewall software installed it may ask you to allow java
access to the network. Please grant it access. It is only making a local
connection.
4. When the installer launches click next then accept the terms and conditions.
5. You may be prompted with a screen regarding the failure of the OS pre-requisite
checking. Ignore this and click next.
6. Set the install location to /opt/IBM/HTTPServer
7. Accept the default ports of 80 and 8008.
8. Configure the Windows Service Definition. In this lab the password for Administrator is
password. Enter the password and click next.
Page 15 of 28
9. Next you will be asked to create an administration account for the IHS admin server. Use
ihsadmin and password.
10. Using the following properties, install the IBM HTTP Server Plug-in for WebSphere
Application
Ensure that the check box is checked
Web Server Definition: webserver1
Host Name: ibmlab.avp.ibm.com
11. Click Next and/or Finish till you complete the installation process
Task 4: Configure IBM HTTP Server with WebSphere Application Server
Starting with WebSphere Application Server 6.0 it is now possible to administer IBM HTTP
Server from the Deployment Manager console. This linkage can be setup manually in the
console or it can be done using a script that is created during the installation of the web server
plug-in. In this exercise we will use the plugin to create the web server definition and map the
existing applications.
your web server by clicking the check box next to webserver1 and clicking Start.
Page 16 of 28
If the webserver1 starts successfully you will see a green arrow in the Status
section.
6. Now that you have a definition for webserver1 and webserver1 has been mapped
to the existing applications, you can generate and propagate the Plug-in
configuration file. This file is used by the web server plugin to determine what
HTTP URIs will be passed on to WebSphere. Put a checkmark next to
webserver1 and click Generate Plug-in then repeat the process for Propagate
Plug-in.
7. Open /opt/IBM/HTTPServer/Plugins/config/webserver1/plugin-cfg.xml with a web
browser.
Notice that the plugin-cfg.xml contains URIs for the sample applications that are
installed. UriGroup Name="server1_Cluster_URIs"
Page 17 of 28
9. Let's explore what would happen if you remove the mapping for webserver1.
checkmark next to webserver1 and hit Generate Plug-in. Check for the
following output at the top of the screen:
PLGC0005I: Plug-in configuration file =
/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/ibmlabCell01/nodes
/ibmlabNode01/servers/webserver1/plugin-cfg.xml
PLGC0052I: Plug-in configuration file generation is complete for the Web server
ibmlabCell01.ibmlabNode01.webserver1.
Page 18 of 28
11. Next propagate your plugin config file to the web server. Place a checkmark next
to webserver1 then hit Propagate Plug-in. Check for the following output which
indicates success:
PLGC0062I: The plug-in configuration file is propagated from
/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/ibmlabCell01/nodes
/ibmlabNode01/servers/webserver1/plugin-cfg.xml to
/opt/IBM/HTTPServer/Plugins/config/webserver1/plugin-cfg.xml on the Web
server computer.
PLGC0048I: The propagation of the plug-in configuration file is complete for the
Web server ibmlabCell01.ibmlabNode01.webserver1.
12. Open /opt/IBM/HTTPServer/Plugins/config/webserver1/plugin-cfg.xml in a text
editor or web browser. Open the copy of plugin-cfg.xml in a separate browser or
text editor. Notice that the Wssamples has been removed from the URI Group.
Page 19 of 28
1. Stop all running IBM HTTP Server and WebSphere processes. Execute the
following commands in a command prompt.
1. /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/stopManager.sh
2. /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/stopServer.sh server1
3. /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/stopNode.sh
4. The icon for stopping the HTTP server can be found in the start menu under
IBM HTTP Server and it can also be stopped using Windows services.
2. Extract /installationmedia/7.0.0.11-WS-UPDI-LinuxIA32.zip
3. In /installationmedia/7.0.011-WS-UPDI-LinuxIA32/UpdateInstaller run install
4. Accept the terms and conditions. Click next until you get to the install location.
5. Complete the installation.
6. When the installation completes there will be a check box for Launch IBM
Update Installer for WebSphere Software on exit. Make sure that box is
checked then click Finish.
7. The Update Installer will relaunch. Click Next.
8. The Update Installer should automatically find the available software that can be
updated. You should see the following paths in the drop down dialog for
Directory Path:
/opt/IBM/HTTPServer
/opt/IBM/HTTPServer/Plugins
/opt/IBM/WebSphere/AppServer
9. Let's upgrade WebSphere first so select /opt/IBM/WebSphere/AppServer from the dialog
box. Hit next.
10. Select Install Maintenance Package. Click Next.
11. Now you will need to go copy the following files from /installationmedia/ to
/opt/IBM/WebSphere/UpdateInstaller/maintenance.
7.0.0-WS-IHS-LinuxX32-FP0000011.pak
WebSphere Application Server 101
IBM Software Accelerated Value Program
Page 20 of 28
7.0.0-WS-PLG-LinuxX32-FP0000011 .pak
7.0.0-WS-WASSDK-LinuxX32-FP0000011.pak
7.0.0-WS-WAS-LinuxX32-FP0000011 .pak
12. Accept the default of /opt/IBM/WebSphere/UpdateInstaller/maintenance for the
maintenance directory.
13. The Update Installer will automatically determine which packages apply to the software
you are upgrading. In the case of WebSphere Application Server the following packages
should be checked.
7.0.0-WS-WAS-LinuxX32-FP0000011.pak
7.0.0-WS-WASSDK-LinuxX32-FP0000011.pak
14. Click next to begin the installation. This process will take 10 15 minutes to complete.
15. When the installation finished make sure you see the green Success message in the top
left corner.
16. Click the Relaunch button to restart the Update Installer and we'll continue with updating
the IHS server and WAS Plugin.
17. This go round we will update the IBM HTTP Server. Select /opt/IBM/HTTPServer as the
Directory Path for Product Selection. Hit next.
18. Select Install Maintenance Package. Hit next.
19. Accept the default of /opt/IBM/WebSphere/UpdateInstaller/maintenance for the
maintenance directory. Hit next.
20. The Update Installer will automatically determine which packages apply to the software
you are upgrading. In the case of IBM HTTP Server the following packages should be
checked.
7.0.0-WS-IHS-LinuxX32-FP0000011.pak
7.0.0-WS-WASSDK-LinuxX32-FP0000011.pak
21. Hit next. If you get a warning about apache running then you'll need to stop IBM HTTP
Server. You can do stop IHS by running /opt/IBM/HTTPServer/apachectl stop and
/opt/IBM/HTTPServer/adminctl stop. Once you reach the Installation Summary screen
select next to begin the upgrade.
22. When the upgrade completes click Relaunch to continue with updating the WebSphere
Application Server Web Server Plug-in.
23. Select /opt/IBM/HTTPServer/Plugins for the path for Product Selection.
24. Select Install Maintenance Package. Hit next.
Page 21 of 28
Page 22 of 28
deployments. This property controls the minimum (or initial) and maximum size
of the JVM heap. Using the ISC navigate to server - Application Servers server1 - Java and Process Management - Process Definition - Java Virtual
Machine. Set the following values:
- Initial Heap Size: 128
- Maximum Heap Size: 512
While you are on this page take time to notice the following settings
Verbose garbage collection Many WebSphere customers run with this
enabled even in critical production applications. Verbose GC is an excellent
indicator of server health and is commonly used by IBM Support to diagnose
performance related PMRs. See http://www-01.ibm.com/support/docview.wss?
rs=180&uid=swg21114927
Generic JVM arguments - This field is commonly used to alter the behavior of
the JVM either by performance related to switches or to load third party modules.
Click Apply. The page will refresh then click Save at the top of the screen. This
second Save action is required to save the change to the Master Repository.
Page 23 of 28
3. Some applications require more Web Container threads than others. If you have
ever worked with a Lotus Domino Web Server then you may already be familiar
with this concept. In a Domino Web Server the default number of Web Container
threads is 40. WebSphere has a minimum of 10 and a maximum of 50 for the
default. In some cases IBM recommends setting the minimum and maximum to
be equal. This is done to increase performance. The overhead of creating 50
threads is moved to the startup sequence as opposed to having to create them
on the fly.
Edit the minimum number of Web Container threads to be 50 using the ISC. Go
to Application Servers - server1 - Thread Pools - WebContainer. Change
minimum from 10 to 50. Click apply then save. You would have to restart the
server to make this change take effect.
Page 24 of 28
1.
Page 25 of 28
Page 26 of 28
6.
Search for WebContainer until you come to the following output. If you were
experiencing a server hang then you would review all of the WebContainer
threads to see if you could find a hung thread or a commonality between several
hung threads. This thread is idle and waiting for work.
3XMTHREADINFO
"WebContainer : 1" (TID:0x14635900, sys_thread_t:0x14A42EF8, state:CW, native
ID:0x00001334) prio=5
4XESTACKTRACE
at java/lang/Object.wait(Native Method)
4XESTACKTRACE
at java/lang/Object.wait(Object.java:231(Compiled Code))
4XESTACKTRACE
at com/ibm/ws/util/BoundedBuffer.waitGet_(BoundedBuffer.java:191(Compiled
Code))
4XESTACKTRACE
at com/ibm/ws/util/BoundedBuffer.take(BoundedBuffer.java:555(Compiled Code))
4XESTACKTRACE
at com/ibm/ws/util/ThreadPool.getTask(ThreadPool.java:817(Compiled Code))
4XESTACKTRACE
at com/ibm/ws/util/ThreadPool$Worker.run(ThreadPool.java:1480)
We can't tell if this thread is hung unless we collect multiple javacores back to
back. This will be a common request from IBM Support. Generally you will run
three javacores with 2 minutes in between each one.
Page 27 of 28
Enabling Trace
Open the ISC at http://localhost:9060/admin
Expand the Troubleshooting section then click on Logs and Trace
Select server1
Select Diagnostic Trace
Make sure that Enable Log is checked then click Change Log Detail Levels
Expand com.ibm.ws.*
Find com.ibm.ws.security.* in this list, click the name and a menu should
appear. Select All Messages and Traces.
8. Scroll back to the top of the screen. The box at the top should now contain this
string
*=info: com.ibm.ws.security.*=all
9. Click apply at the bottom of the screen then save at the top of the screen.
10. Expand System Administration then select Nodes.
11. Synchronize ibmlabNode01
12. Now Expand Servers then select Application Servers. Stop and Start server1.
13. After you initiate the start process browse to
/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1. Notice that
trace.log has appeared.
14. The trace we enabled is very verbose and will generate a 2.5MB file just from
startup. In this exercise we won't go too deep into reading the trace, we'll leave
that for support engineers. One thing that may come in handy when reviewing a
trace.log is make sure that the correct trace was enabled. When the server
starts it will output the current trace string. You should see this line as the first
line following the log header in your file.
1.
2.
3.
4.
5.
6.
7.
Page 28 of 28