Beruflich Dokumente
Kultur Dokumente
D85190
Edition 1.0
January 2014
D83175GC10
Activity Guide
Troubleshooting Workshop
Oracle WebLogic Server 12c:
Disclaimer
This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and
print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way.
Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display,
perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization
of Oracle.
The information contained in this document is subject to change without notice. If you find any problems in the document, please
report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.
Trademark Notice
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective
owners.
Author
Bill Bell
Editors
Raj Kumar, Anwesha Ray
Graphic Designer
Rajiv Chandrabhanu
Publishers
Nita Brozowski,Sujatha Nagendra, Michael Sebastian
Table of Contents
Practices for Lesson 1: Course Overview .....................................................................................................1-1
Practices for Lesson 1: Overview ...................................................................................................................1-2
Practices for Lesson 2: Troubleshooting: Overview ....................................................................................2-1
Practices for Lesson 2: Overview ...................................................................................................................2-2
Practice 2-1: Accessing and Setting Up the Practice Environment ................................................................2-3
Practice Solution: Accessing and Setting Up the Practice Environment ........................................................2-7
Practice 2-2: <OPTIONAL> Running RDA .....................................................................................................2-8
Practice Solution: <OPTIONAL> Running RDA .............................................................................................2-13
Tasks
1. Access host01.
a. From your gateway machine, double-click the VNC Viewer - host01 icon on the
desktop. You connect to host01 as the oracle user. The Username field is not
displayed. Enter oracle in the Password field (it is displayed as ******) and press
the Enter key.
b. Unless stated otherwise, you will be working within the VNC session of host01 for the
remainder of this practice.
2. Run the scripts to set up your domain.
a. Open a Terminal window.
Note: There is a launcher for a Terminal window in the panel at the top of the desktop.
d. On the welcome page, enter the Username of weblogic and the Password of
Welcome1. Then click the Login button.
Note: You can have Firefox remember the password if you want to.
e. In the Domain Structure, expand Environment and select Servers.
f. Click the Control tab.
g. Select the check boxes next to server1 and server2. Then click the Start button.
When asked whether you are sure, click Yes.
h. Wait a moment, and refresh the browser. Wait until both managed servers have the
state of RUNNING.
i. Use the administration console to view the servers, machines, and clusters defined in
Assumptions
You completed Practice 2-1: Accessing and Setting Up the Practice Environment and the
domain has been successfully created.
All instances of WebLogic Server are running.
Note: Notice the main index at the top left. The overview links are currently at the bottom
left. The main overview is in the display area. Ignore any messages in the Terminal
window.
c. The top part of the index has links that show the machines configuration.
Note:
The Oracle WebLogic Server Overview link has installation information such as the
version and patches applied.
The Domain link has links to domain scripts and configuration files.
The individual server links contain server information including log files, deployed
application deployment descriptors, diagnostic images, and thread dumps.
e. Select the link in the main index called server1 Server. Click some links in the
server1 Server frame (below the Main Index). Try some such as:
server1.state (under $SH/data/nodemanager) Note: This is the state of the
server as kept by Node Manager.
server1.log (under Log Files) Note: This is the latest server log.
JVM Runtime (WLST Collections > Server Runtime) Note: This is information
about the JVM under which this server is running.
f. Click around other areas as you have time and interest.
5. Clean up.
a. Close the web browser on host01.
b. Return to the host01 Terminal window.
c. Remove the rda_output directory.
$> cd /home/oracle
$> rm rf rda_output
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
Warning: This command permanently deletes a directory, all its subdirectories, and files.
Use with caution.
d. Close the Terminal window.
e. Exit the VNC Viewer.
Overview
In this practice you configure some archive policies. You also create a new system-level WLDF
Assumptions
You completed Practice 2-1: Accessing and Setting Up the Practice Environment and the
domain has been successfully created.
All instances of WebLogic Server are running.
Tasks
1. Access host02 and run the database setup script.
a. From your gateway machine, double-click the VNC Viewer - host02 icon on the
desktop. You connect to host02 as the oracle user. The Username field is not
displayed. Enter oracle in the Password field (it is displayed as ******) and press
the Enter key.
b. Open a Terminal window, navigate to the current practice directory and run the
database setup script, initdatabase.sh.
$> cd /practices/tshoot/practice03-01
$> ./initdatabase.sh
Note:
You run the script on host02 because that is where the database is running.
This script calls a SQL*Plus script that initializes the database. Note that this script
first drops the sequence and table it creates, so it can be run multiple times.
Therefore, the first time it runs you will see messages that the sequence and table
do not exist. Ignore those messages.
c. Close the Terminal window.
d. Exit the host02 VNC Viewer.
2. Access host01 and run the main setup script.
a. From your gateway machine, double-click the VNC Viewer - host01 icon on the
desktop. You connect to host01 as the oracle user. The Username field is not
displayed. Enter oracle in the Password field (it is displayed as ******) and press
the Enter key.
Note: You access the two Linux hosts from the gateway machine many times in these
practices. Rather than give specific directions each time, in this and subsequent
practices it will be assumed you know what to do if you are instructed to access
host01 or access host02.
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
b. Open a Terminal window, navigate to the current practice directory and run the setup
script, setup.sh.
$> cd /practices/tshoot/practice03-01
$> ./setup.sh
This script calls:
A WLST script to create a data source called datasource1
A WLST script to deploy a web application that uses the data source
A WLST script that sets up a JMS Server, a JMS module, and a JMS queue (for
WLDF notifications)
Note:
e. To save disk space, you decide to limit the size of this servers archive file to 50
megabytes. Set the Preferred Store Size to 50.
f. Save this change by clicking the Save button.
g. Activate the changes by clicking the Activate Changes button in the Change Center.
Note: You will make changes to the domain configuration many times in these
practices. In this and subsequent practices, it will be assumed you no longer need
specific directions when you are instructed to lock the configuration, save changes,
or activate changes.
h. Because you do not want to keep harvested diagnostic archive information forever, you
want old data to be retired. Scroll down and notice that the default is for Data
Retirement Enabled to be selected.
e. Access host01. Use the File Browser on host01 to navigate to the location where the
image was saved:
/u01/domains/tshoot/wlsadmin/servers/server1/logs/
diagnostic_images.
Tip: The File Browser can be found in the panel under Applications > System
Tools. Once it opens, click File System under the Places panel to start your
navigation.
11. View the notification and collected metrics by using the admin console.
a. Access the admin console. In the Domain Structure select Services > Messaging >
JMS Modules.
b. Select the module called jmsmodule1.
c. Select the resource (queue) wldfnotificationqueue.
d. Select the Monitoring tab.
e. Notice that there is a message in the queue (Messages Current). You could select the
queue and click the Show Messages button, but the message is not a text message,
so viewing it by using the admin console is not very interesting.
f. From the Domain Structure panel, select Diagnostics > Log Files.
Assumptions
You completed Practice 2-1: Accessing and Setting Up the Practice Environment and the
domain has been successfully created.
All instances of WebLogic Server are running.
Solution Tasks
1. Access host02 by using the VNC Viewer on the gateway machine. Run the database setup
Assumptions
You completed Practice 3-1: Harvesting Diagnostic Metrics (or have run the solution).
All instances of WebLogic Server are running.
Tasks
e. Select New View. Type over the default name of the new view with: Harvested
Diagnostics.
f. Ensure the new view is selected and click the Metric Browser tab.
g. In the Servers drop-down list, select server1.
h. Select Collected Metrics Only, and click the Go button.
i. In the Types list of available MBeans on this server, locate and select
JDBCConnectionPool.
j. Under Instances, select datasource1.
k. Under Metrics, drag the three metrics onto the right panel. As the first one is dragged
in, a new chart is created. Drag the other two onto the same chart.
l. Change the charts default name by clicking the menu down-arrow in the chart title bar.
Select Properties. Under Chart Title, enter JDBC Chart. Click OK.
hour(s) (or whatever time interval seems best based on when you did the
previous practice). Set Number of rows displayed per page to 1000.Click Apply.
Make note of the date and time of the collected JDBC attributes. (You may need to
scroll to find the ones of interest after the client was running.)
Return to the Monitoring Dashboard.
At the top-right of the chart, click the down arrow for the menu again, and select
Properties.
Under Time Range select Custom and enter the Start Time. Use the correct
format. For example: In the log file if the Date field was "10/11/13 18:50:41
820" you would enter it here as: "10/11/2013 6:50:41 PM" (do not include
Chapter 3 - Page 14
Practices for Lesson 3: WebLogic Server Diagnostic Framework: Overview
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
Oracle University and In Motion Servicios S.A. use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Overview
In this practice, you configure an application-scoped diagnostic monitor. Application-scoped
Assumptions
You completed practice 3-1: Harvesting Diagnostic Metrics.
All instances of WebLogic Server are running.
Tasks
1. Enable instrumentation on the server named server1.
Note: For instrumentation to be available for an application, instrumentation must be
enabled on the server to which the application is deployed.
a. Access the administration console, log in, and lock the configuration.
b. Navigate to your diagnostics module, server1-diagnostics.
Tip: In the Domain Structure: Diagnostics > Diagnostic Modules > server1-
diagnostics.
c. Click the Configuration > Instrumentation tabs.
d. Select the Enabled check box.
Note: It is here that you could add instrumentation to this system-scoped diagnostic
module. This practice does not have you do that, however, because you will instead
add instrumentation to an application-scoped diagnostic module.
e. Save and activate your changes.
f. Minimize the admin console for later.
2. Add a WLDF descriptor file to an application. Then redeploy the application.
a. Access host01.
b. Inspect the contents of the WLDF descriptor file provided under the current practice
directory:
META-INF/weblogic-diagnostics.xml
Tip: Open a Terminal window, navigate to the current practice directory, and use the
cat command.
$> cd /practices/tshoot/practice04-01
$> cat META-INF/weblogic-diagnostics.xml
c. In a Terminal window run the jar utility to add the WLDF descriptor file to the
contacts application.
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
$> cd /practices/tshoot/practice04-01
$> /u01/app/jdk/bin/jar uf
/u01/domains/tshoot/wlsadmin/apps/contacts.war
META-INF
Note:
Enter all commands on one line. Commands are sometimes displayed on more than
one line due to space limitations.
The jar utility option uf means to update the file specified.
The file, contacts.war, is updated with the last parameter, the META-INF
directory.
stcurr.*
Note: The class that gets the database connection is in the stcurr package.
l. Click Save.
m. Do not activate changes yet.
4. Configure the delegating monitor.
a. In the Diagnostic Monitors in this Module table, select the new monitor.
b. Under Actions, move the TraceElapsedTimeAction from the Available column to the
Chosen column.
Note: This action makes two event archive entries: one before and one after the
specified code location. It is only compatible with Around monitor types.
f. Return to the admin console. From the Domain Structure panel, select Diagnostics >
Log Files.
g. Locate and select the EventsDataArchive log file for the server1 server. Click View.
Note:
If you dont see any rows in the table, click the Customize this table link. Change
the Time Interval to ensure you are going back far enough to see the events
created. Click Apply.
If after doing that, you still dont see any rows, return to the task to deploy the latest
version of the application and do it again.
h. Browse the generated events. Notice the Date column. For each Before and After
e. To see the details of a request, click the string that identifies the request.
Note: Above the details table are the WLDF context ID and the total elapsed time of
the request in milliseconds. The details include the class and method, the number of
times the method was called in the request, the total milliseconds of the calls, the
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
average milliseconds of the calls, the application name, the application module, and
the method signature.
g. Close the admin console.
Assumptions
You completed practice 3-1: Harvesting Diagnostic Metrics.
All instances of WebLogic Server are running.
Solution Tasks
1. Access host01 by using the VNC Viewer on the gateway machine. Run the solution script.
a. Open a Terminal window, navigate to the practice directory and run the database setup
Overview
When instrumentation is enabled on a diagnostic module, all WLDF events and log entries
associated with a particular client request will be tagged with a unique context ID. These IDs
Assumptions
You completed practice 4-1: Configuring and Monitoring Diagnostic Events.
All instances of WebLogic Server are running.
Tasks
1. Generate debug messages in the server log file.
a. Access the admin console. Lock the configuration.
b. In the Domain Structure, select Environment > Servers. Select server1.
c. Click the Debug tab.
d. Locate the weblogic > servlet > internal debug scope.
e. Select the check box for the internal scope. Click the Enable button.
Note: That scope and its children are now enabled. A couple of other scopes (that do
not seem like children, but are) are also enabled. That is expected.
Tip: If you do not see any entries, click Customize this table again and change Time
Interval to Last 15 minute(s) (or longer).
g. Browse the log entries. Notice that you can trace a particular request through
extremely detailed JDBC operations, thanks to the context ID and the debug
messages.
h. Minimize the admin console to use later.
4. Configure dye injection monitoring based on a dye filter, which is a particular IP address.
Note: You will pretend that the user having trouble is accessing the contacts application
from the web browser on host01.
a. Find out the IP address of host01. Access host01. Open a Terminal window and enter
v. Do not close the admin console. Use the File menu of Firefox to open a New Tab or
New Window.
5. Test event filtering.
a. Retest the contacts application as before, by entering the application URL
(http://host01.example.com:7011/contacts) in the new tab or window of the
Firefox web browser of the gateway machine. Edit a couple of contacts.
b. Return to the admin console and once again view the EventsDataArchive for server1.
c. Click Customize this table and ensure that the Time Interval is long enough to
include the last testing you just did, but not so long as to include the previous testing.
d. You should not see any rows in the Events Log Entries table. That is because the IP
Overview
In this practice, you troubleshoot a HotSpot JVM by using Java Visual VM (JVisualVM) and
Java Mission Control.
Tasks
1. Run the setup script to deploy the new application.
a. Access host01. Open a Terminal window and run the setup script in the current
practice directory.
$> cd /practices/tshoot/practice05-01
$> ./setup.sh
Note:
The script deploys the new benefits application. This application:
Overuses the CPU
Hogs memory
Please ignore any messages about:
An insecure protocol being used to connect to the admin server.
WLContext.close() being called in a different thread.
2. Find the process ID of server1 by using the JVM Process Status tool.
a. In a Terminal window, navigate to the bin directory of the JVM and run the jps
command with the -v argument.
$> cd /u01/app/jdk/bin
$> ./jps -v
Note: The jps (JVM Process Status) command lists running JVMs. The -v option tells
the command to output arguments passed to the JVM.
b. Look through the output. The first thing listed in each entry is the process ID. Two of
the listings should be WebLogic Servers (after the PID it says: Server). Find the one
that is server1 (within the arguments passed to the JVM is an option that gives the
server name: -Dweblogic.Name=server1).
c. Make note of the PID of server1.
3. Run the JVisualVM tool to view CPU and memory usage before simulating users accessing
the new benefits application.
a. In a Terminal window, navigate to the bin directory of the JVM and run the
jvisualvm command.
$> cd /u01/app/jdk/bin
$> ./jvisualvm
Note: If an informational window is displayed about calibration, click OK. Then click
OK again.
b. When the graphical user interface comes up, under the Applications tab, expand
Local (if it is not already expanded). Find the WebLogic JVM that matches the PID of
server1 which you discovered earlier. Double-click this JVM.
d. Leave JVisualVM running. You can minimize it, if you want. Also, do not close the
Terminal window that started JVisualVM, because this will exit the program.
4. Run a Grinder script to simulate users accessing the new benefits application.
a. In a new Terminal window, from the current practice directory, run the script to call the
Grinder.
$> cd /practices/tshoot/practice05-01
$> ./rungrinder.sh
b. Do not close this Terminal window. You can minimize it, if you want.
5. Return to JVisualVM tool. View how the CPU and memory usage are affected by the
Grinder script. Use the tool to help figure out what is causing these effects.
Note: Notice the CPU usage spikes and the memory usage goes up dramatically.
b. Use JVisualVM to look into the CPU issue. Click the Sampler tab. Then click the CPU
button. Watch for a little while. Are there any methods in the application using a lot of
CPU?
Note: The results may not be exactly the same for you as shown, but the service()
method of BenefitsServlet is probably using a large percentage of the CPU. You
have not looked at the code of the benefits application, but based on the name of this
Servlet, the odds are that it is part of the benefits application.
c. Click the Stop button.
d. See if you can determine what is taking so much memory. Click the Memory button
under the Sampler tab. Watch for a little while.
g. Even though the message says that no restarts are necessary, you do need to restart
server1 for these flags to take effect. Use the admin console to force shutdown and
then restart server1.
Tip: Environment > Servers > Control. Select the check box in front of server1 and
click Shutdown > Force Shutdown Now. Click Yes. Select the check box again and
click Start. Click Yes.
h. Wait for the server to be running before continuing.
8. Investigate the same issues as before by using Java Mission Control.
a. Because you stopped and restarted server1, it will now have a different process ID.
Return to host01. In a Terminal window, navigate to the bin directory of the JVM and
use the jps command again to find the new process of server1. This time use grep to
d. Leave Java Mission Control (JMC) running. You can minimize it, if you want. Also, do
not close the Terminal window that started JMC, because this will exit the program.
e. Run the Grinder script again.
Tip: In a different Terminal window, from the current practice directory, run the script
rungrinder.sh again.
f. Leave the Grinder script window open and return to JMC. Watch for a while.
Overview
In this practice, you configure server overload conditions, monitor threads, create a thread
dump, and analyze a thread dump.
Assumptions
Tasks
1. Modify a servers overload configuration so that the server fails if too many threads are
stuck.
Note: The default is to never put a server into the FAILED state based on stuck threads.
a. Access the administration console and lock the configuration.
b. Locate and select server1.
c. Select the Configuration > Overload tabs.
d. Update the Stuck Thread Count to 5.
e. Also update the Max Stuck Thread Time to 30.
Note: The default is 600 seconds (10 minutes).
f. Save and activate the changes.
Note: Notice that the server needs to be restarted for the changes to take effect.
g. Shut down and restart server1. Wait for server1 to be running before continuing.
2. Run the setup script to deploy the latest version of the application.
a. Access host01. Open a Terminal window and run the setup script in the current
practice directory.
$> cd /practices/tshoot/practice06-01
$> ./setup.sh
Note:
The setup script undeploys the current version of the application with its deployment
plan.
The script also deletes the deployment plan file. If you run the script more than
once, a message displays that the file cannot be removed (because it is no
longer there).
The script deploys a new version of the application. This version of the application:
Introduces some threading issues
No longer has a deployment plan
No longer contains an application-scoped diagnostic module
The setup script also disables the system diagnostic module, by targeting it to
nothing.
e. Samurai reads the log file and puts any thread dumps into the Thread Dumps tab.
Select that tab. The information displayed starts out in Samurais Table View. Scroll to
the bottom to see the legend.
f. Each column in the table represents a thread dump. You are interested in one with
Blocked threads (red blocks). The thread dump of interest will be the last column (or
the only column). Select one of the Blocked threads by clicking its red block.
Note: The ACTIVE and BLOCKED notations have been highlighted in yellow in the
screenshot.
h. To return to the Table view, scroll up and click the Table link, or click the Table View
icon near the bottom of the screen.
Assumptions
You completed Practice 3-1: Harvesting Diagnostic Metrics.
All instances of WebLogic Server are running.
Solution Tasks
1. Access host01 and run the solution script.
a. Open a Terminal window, navigate to the current practice directory and run the solution
Overview
In this practice, you look at a Java stack trace to debug an application error. You analyze a
CLASSPATH error and correct it.
Tasks
1. Run the setup script to deploy the latest version of the contacts application.
a. Access host01. Open a Terminal Window and run the setup script in the current
practice directory.
$> cd /practices/tshoot/practice07-01
$> ./setup.sh
Note: This script copies the new version of the contacts application to the domains
apps directory and redeploys the application.
b. Minimize the VNC viewer for later.
2. Try the application to encounter an error.
a. From the gateway machine web browser, access the contacts application by entering
the URL:
http://host01.example.com:7011/contacts
b. Click the browse all contacts link.
c. Click the [edit] link next to one of the contacts.
d. Edit any field and click the Update button.
e. You should see Error 500--Internal Server Error.
3. Locate the error in the server1 log file.
a. Return to host01. Use a Terminal window or the File Browser to navigate to the server1
log file. Edit the file with the gedit editor.
Tip: Remember, the log file is here:
/u01/domains/tshoot/wlsadmin/servers/server1/logs/server1.log
b. Scroll to the bottom of the log file. Start looking from the bottom up for the last error
entry. It will look something like this:
####<Oct 29, 2013 12:25:12 PM UTC> <Error> <HTTP>
<host01.example.com> <server1>
...
Root cause of ServletException.
java.lang.NoClassDefFoundError: stcurr/utils/FieldValidator
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
at
stcurr.DispatchServlet.validate(DispatchServlet.java:182)
Note: The timestamp and other details may be different.
c. This Java stack trace shows an uncaught exception. The exception is
ServletException.
d. Look below that and you can see the root cause of that exception is another
exception, NoClassDefFoundError. Notice that the missing class (and its package)
is listed: stcurr/utils/FieldValidator (in Java format it is written as
stcurr.utils.FieldValidator). Also notice that the exact line number in the
class where the error occurred (DispatchServlet.java) is indicated. This lets the
g. Browse the contacts. Choose a contact to edit. Change the zip code to have too few
digits. Click Update. As you can see from the message, the validation code has been
found and is now working. Correct the zip code field and click the Update button again.
h. If you want to ensure it also works on server2, try the application again by using this
URL:
http://host02.example.com:7011/contacts
i. Once you have edited contacts, close the web browser.
Assumptions
You completed Practice 6-1: Investigating Server Problems.
All instances of WebLogic Server are running.
Solution Tasks
1. Access host01 and run the solution script.
a. Open a Terminal window, navigate to the current practice directory and run the solution
Overview
In this practice, you find and resolve a data source configuration problem, troubleshoot a
database connection leak, and configure a data sources connection timeout.
Assumptions
Tasks
1. Run the setup script.
a. Access host01. Open a Terminal Window and run the setup script in the current
practice directory.
$> cd /practices/tshoot/practice08-01
$> ./setup.sh
Note: This script copies the new version of the application to the domains apps
directory and redeploys the application. It deploys a diagnostic module to server1, if it
is not already there. It also makes some changes to the configuration of the data
source (actually it deletes the old data source and creates a replacement).
b. Minimize the VNC viewer for later.
2. Find a data source configuration error.
a. Use the admin console to shut down and restart server1.
b. After the server has started, wait a moment. Access the server1 server log file on
host01. Verify that a JDBC error message is logged periodically.
####<Oct 30, 2013 3:56:18 PM UTC> <Error> <JDBC>
<host01.example.com> <server1>
<[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default
(self-tuning)'>
<<WLS Kernel>> <> <> <1383148578819>
<BEA-001112> <Test "SELECT 1 FROM DIAL" set up for pool
"datasource1" failed with exception:
"java.sql.SQLSyntaxErrorException:
ORA-00942: table or view does not exist".>
Tip: Use the Find of gedit to search for: <Error> <JDBC>
Note: The timestamp and other details may be different.
c. What is the problem with the configuration?
d. Exit the editor.
3. Fix the data source configuration error.
a. Access the admin console again and lock the configuration.
b. Navigate to the data source name datasource1.
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
Number Available
k. Click Apply.
l. Verify that the number of active connections is the same as the capacity. As you can
see, this means that there are no connections available.
m. For example:
6. View data source diagnostic profiling data in the data source log file.
a. On host01, use a Terminal window or the File Browser to navigate to the log directory
Note: You conferred with the DBA and 10 is the value you were told to use.
c. Use the admin console to shut down and restart server1. Wait for it to get to the
RUNNING state.
d. Return to the host01 Terminal window in which the rungrinder.sh script was run.
Run it again.
e. Wait a moment and return to the admin console data source monitoring screen from
earlier. Refresh the web browser. Do you have the same problem? Are the current
number of active connections equal to the capacity, and no connections are available?
Note: Increasing the maximum number of connections did not help. There must be an
issue with the application. After talking with the development group, they admit there is
There is no solution for this practice. At the end of the practice the good version of the
application is redeployed, which is how the system starts before doing this practice. Any data
source configuration changes are not required for later practices.
Overview
In this practice, you find and resolve a problem with the communication between the admin
server and Node Manager, use the WLST nmEnroll() command, and configure Node
Manager to restart failed servers that it started.
Tasks
1. Run the setup script.
a. Access host01. Open a Terminal Window and run the setup script in the current
practice directory.
$> cd /practices/tshoot/practice09-01
$> ./setup.sh
Note: This changes something (what it does exactly is not given here as it might give
away the problem you are about to troubleshoot). This script shuts down server2. It
also kills and restarts the Node Manager on host02.
b. Minimize the VNC viewer for later.
2. Attempt to start server2 by using the admin console (which uses Node Manager).
a. Use the admin console to start server2 (through Node Manager).
b. What happens? What are the messages in the admin console?
Note: You should see a message that the Node Manager on machine2 is not
reachable.
c. In the admin console, navigate to machine2. Click Monitoring > Node Manager
Status. The information here is essentially what you already know, that the Node
Manager on machine2 is not reachable. It says the Node Manager is Inactive.
3. Access host02 and investigate the Node Manager problem.
a. You ran the setup script that killed and restarted the Node Manager on host02. Check
that Node Manager is really running on host02. Open a Terminal window on host02.
Use the ps command to look for the Node Manager process.
$> ps u oracle o pid,args | grep weblogic.NodeManager
Note:
The ps (process status) command here has two options: -u oracle (show
processes that belong to the oracle user) and -o pid,args (the output should
show the process ID and the arguments).
The output should show two processes. The first process output is lengthy. It is the
Java process that is Node Manager. The output contains a call to the JVM with the
class called weblogic.NodeManager (the name of the Java class that initiates the
Node Manager code). The second process is the grep process you ran.
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
This shows that Node Manager is running. You must search further to find the
problem.
b. Navigate to the utilities directory and call the script to kill Node Manager.
$> cd /practices/tshoot/utilities
$> ./killnodemanager
Note: You are killing Node Manager so you can start it in a Terminal window, to be
able to look at its output as it starts. (You could also look at the Node Manager log files,
but this is easier.)
c. Now navigate to the domains bin directory. Call the script to start Node Manager in
the Terminal window.
Note:
Enter the command on one line.
The prompt is not shown here (or in subsequent WLST commands) due to space
limitations.
The first parameter is the username, the second is the password, and the third is the
URL to the admin server (using the proprietary t3 protocol).
Using the Tab key to automatically fill in file names or commands does not work in
WLST. Sorry. Type carefully.
d. Run the nmEnroll() command.
nmEnroll('/u01/domains/tshoot/wlsadmin',
g. Watch the Node Manager Terminal window after you enter the kill command. You
should see in the Node Manager output that Node Manager notices that server2 has
failed and restarts it.
h. Return to the admin console and verify that server2 is back in the RUNNING state.
7. Clean up by closing windows, running Node Manager in the background (as it has been),
and starting servers.
a. Return to host02.
b. Open a Terminal window, navigate to the utilities directory, and call the script to kill
Node Manager.
$> cd /practices/tshoot/utilities
Overview
In this practice, you investigate the OHS cluster proxy by using the proxy log file and a special
proxy query parameter.
Assumptions
Tasks
1. Access host02 and run the database setup script.
a. Access host02. Open a Terminal window, navigate to the current practice directory and
run the database setup script, initdb.sh.
$> cd /practices/tshoot/practice10-01
$> ./initdb.sh
Note:
You run the script on host02 because that is where the database is running.
This script calls a SQL*Plus script that creates a new table in the database which a
new application requires.
b. Exit the host02 VNC Viewer.
2. Access host01 and run the setup script.
a. Access host01 and open a Terminal window.
b. Navigate to the current practice directory and run the setup script.
$> cd /practices/tshoot/practice10-01
$> ./setup.sh
This script:
Creates two new servers in cluster1: server3 and server4
Starts the new servers
Deploys a new application to the cluster that uses session replication
Copies a new version of the OHS configuration file to the correct location
Starts (or restarts) OHS and prints out its status, by using opmnctl. The status
output does not line up well, but it should indicate that OHS is Alive and running
HTTP on port 7777.
Note: Wait for all the scripts to finish before continuing.
3. Access the admin console to monitor sessions. From host01, run the Grinder script.
a. Access the admin console. Navigate to Deployments. Select the supplies
deployment. Click Monitoring > Web Applications.
b. Click Customize this table. Place only the following fields in the Chosen column, and
then click the Apply button:
Application
Server
Machine
State
Sessions
Sessions High
Total Sessions
Note: The order does not matter.
c. Minimize the admin console to use in a moment.
Note: The order of the servers and the number of sessions for each one may be
different in your admin console. The exact numbers do not matter. Also, if you run the
Grinder script more than once, the Total Sessions will increase.
g. Open a new web browser window or tab and enter the following URL:
http://host01.example.com:7777
/supplies/?__WebLogicBridgeConfig=true
Note:
Enter the URL all together, with no spaces.
There are two underscore characters (__) in the parameter name.
This URL asks the OHS proxy to display information about each server, as well as
configuration settings and communication statistics.
h. Using the display in the web browser, observe the status of the cluster members, from
the perspective of OHS.
Note:
Notice the server, 192.0.2.11:7013.
Based on the port, it is either server3 or server4. (If the port was 7011, it would
be either server1 or server2.)
Which machine is it? Make note of the IP address. (Your IP address may be
different.)
n. Close the log file.
o. To determine which machine, on the gateway machine, open a Terminal window. Print
out the contents of the hosts file to see how IP addresses are mapped to names.
$> cd /practices/tshoot/practice10-01
$> ./rungrinder.sh
h. Wait for the script to finish.
Note: The script may take quite a while to complete (over 10 minutes) because of the
increased timeout value. (This is an opportunity for you to take a break.)
i. Return to the web browser and once again enter the URL with the special query
parameter that asks the proxy to display information about each server, as well as
configuration settings and communication statistics.
Note: Is the value of READ_TIMEOUT exceptions now 0? With the larger timeout
value, it should be.
Assumptions
You completed Practice 7-1: Investigating Application Problems.
All instances of WebLogic Server are running.
Solution Tasks
1. Access host02 and run the database setup script.
a. Access host02. Open a Terminal window, navigate to the current practice directory and
Overview
In this practice, you configure HTTP session debugging, view session debug messages in a
server log, observe session replication failure, and investigate the cause of that failure.
Tasks
1. Access host01 and run the setup script.
a. Access host01 and open a Terminal window.
b. Navigate to the current practice directory and run the setup script.
$> cd /practices/tshoot/practice10-02
$> ./setup.sh
Note: This script deploys a different version of the supplies application.
2. Configure HTTP session debugging.
a. Access the admin console.
b. Lock the configuration.
c. Navigate to and edit server1. Click the Debug tab.
d. Select the check box for this debug attribute: weblogic > core > cluster >
DebugReplication.
e. Click the Enable button.
f. Select the check box for this debug attribute: weblogic > servlet > internal > session
> DebugHttpSessions.
g. Click the Enable button.
Note: Select the check box for the first attribute and click the Enable button. Then
select the check box for the other attribute and click the Enable button. It sometimes
does not work if you select both check boxes at once.
h. Do not activate the changes yet.
i. Enable the same debug attributes on the remaining managed servers.
j. After all servers have the same debug settings saved, activate your changes.
3. Monitor HTTP sessions by using the admin console.
a. In the admin console, navigate to and select the supplies deployment.
b. Click the Monitoring > Web Applications tabs.
c. Minimize the web browser.
d. Access host01.
e. In a Terminal window, navigate to the current practice directory and run the Grinder
script.
$> cd /practices/tshoot/practice10-02
$> ./rungrinder.sh
Note: This script simulates users accessing the supplies application.
f. Wait for the script to finish.
g. Return to the admin console.
h. Refresh the supplies > Monitoring > Web Applications screen.
Question: How many sessions were created? Is each server in the cluster involved?
i. Still on the supplies application, click the Monitoring > Sessions tabs.
e. You should find an error written by the <Cluster> subsystem. The error complains:
Failed to replicate a non-serializable object.
7. Analyze the serialization error.
a. Still in the log file, search backwards for:
NotSerializableException
b. When you find this exception, it should indicate the class that has the problem.
java.io.NotSerializableException: stcurr.supplies.model.Item
Note:
It appears that an instance of the Item class in the stcurr.supplies.model
Assumptions
You completed Practice 10-1: Investigating Proxy Problems.
All four instances of WebLogic Server are running. OHS is configured, up, and running.
Solution Tasks
1. Access host01. Navigate to the practices directory and run the cleanup script.
$> cd /practices/tshoot/practice10-02
Overview
In this practice, you configure the default auditing provider and configure auditing of domain
configuration changes.
Tasks
1. Access host01 and run the setup script.
a. Access host01 and open a Terminal window.
b. Navigate to the current practice directory and run the setup script.
$> cd /practices/tshoot/practice11-01
$> ./setup.sh
Note: This script creates two new users and adds them to the Administrators
group.
2. Set up the auditing provider.
a. Access the admin console. Lock the configuration.
b. Navigate to and select the security realm, myrealm.
c. Click the Providers > Auditing tabs.
d. Click the New button.
e. Enter the name change_auditor and click OK.
Note: The Type of DefaultAuditor is already selected.
f. Select the new auditing provider.
g. Click the Provider Specific tab.
h. Move the following Active Context Handler Entries from Available to Chosen:
com.bea.contextelement.jmx.AuditProtectedArgInfo
com.bea.contextelement.jmx.ObjectName
com.bea.contextelement.jmx.OldAttributeValue
com.bea.contextelement.jmx.Parameters
com.bea.contextelement.jmx.ShortName
com.bea.contextelement.jmx.Signature
Tip: Hover over an entry for a tool tip pop-up that displays the full name of the entry.
All of the JMX elements are together.
i. Choose Custom from the Severity drop-down list.
Note: With custom chosen, the check boxes determine which severity levels are
audited.
j. Select each of the check boxes to enable all severity levels.
k. Save and activate your changes.
Note: Notice that servers must be restarted.
l. Use the admin console to force shut down the managed servers.
m. Now use the admin console to force shut down the admin server.
n. Close the web browser.
o. Access host01. In a Terminal window, navigate to the practice utility scripts. Run the
script to start the admin server.
b. Use the File Browser or a Terminal window to navigate to the directory where the
admin server keeps its log files.
$> cd /u01/domains/tshoot/wlsadmin/servers/AdminServer/logs
c. Use the gedit editor to open the admin servers server log, and the audit log.
$> gedit AdminServer.log DefaultAuditRecorder.log
d. In the AdminServer.log file, use the Find tool to search for the name of the domain
resource that you created (or modified) earlier as one of the other administrators. In
this example, the user fred created a new managed server called fredserver1.
You should find some audit records of the resource being created and modified. For
example:
Note: This script disables domain configuration auditing and sets the auditing provider
severity level to ERROR, so less activity is audited.
b. If you want to, you can use the admin console to delete any unneeded domain
resources you created to test configuration auditing.
Overview
In this practice, you recover from the loss of the main admin-level users password by running
the AdminAccount utility.
Tasks
1. Shut down the domain.
a. Access the admin console.
b. Use the admin console to force shut down any managed servers that are running.
c. Now use the admin console to force shut down the admin server.
d. Close the web browser.
2. Back up the master (embedded) LDAP files.
a. Access host01. Use the File Browser. Navigate to the admin servers LDAP directory.
Tip: /u01/domains/tshoot/wlsadmin/servers/AdminServer/data/
b. Right-click on the ldap directory and select Copy.
c. Right-click in the data directory and select Paste.
d. Rename the ldap (copy) directory to ldap-backup.
Tip: Right-click on the directory and select Rename.
e. Do not close the File Browser.
3. Run the AdminAccount utility to create a new, temporary admin username and password
in the DefaultAuthenticatorInit.ldift file.
a. First, find the current DefaultAuthenticatorInit.ldift file. Use the File
Browser to navigate to:
/u01/domains/tshoot/wlsadmin/security
Note: Make note of the timestamp of the DefaultAuthenticatorInit.ldift file.
b. On host01, open a Terminal window.
c. Set the environment variables.
$> source /u01/app/fmw/wlserver/server/bin/setWLSEnv.sh
d. Run the AdminAccount utility.
$> java weblogic.security.utils.AdminAccount
tempadmin Password1
/u01/domains/tshoot/wlsadmin/security
Copyright 2014, Oracle and/or its affiliates. All rights reserved.
Note: The arguments passed to this Java class are the new username, the new
password, and the location of the DefaultAuthenticatorInit.ldift file.
e. Go back to the File Browser and reload the current location (View > Reload). Look at
the timestamp of the DefaultAuthenticatorInit.ldift file, which should have
just been updated.
f. Do not close the File Browser.
4. Remove the admin servers DefaultAuthenticatormyrealmInit.initialized file.
Remove the admin servers boot identity file.
a. Use the File Browser to navigate to:
/u01/domains/tshoot/wlsadmin/servers/AdminServer/data/ldap