• No se han encontrado resultados

c. Vigilancia de virus respiratorios durante 2014

In document N S E 2 8 J u l i o d e (página 23-33)

II. Actualización semanal de eventos priorizados

II.2. c. Vigilancia de virus respiratorios durante 2014

Practices Overview

In this practice, you investigate some problems with Node Manager.

Oracle University and In Motion Servicios S.A. use only

Practice 9-1: Investigating Node Manager Problems

Scenario

Something has happened. A server, server2, is shut down, but when you try and restart it by using the admin console, the Node Manager on its machine is unreachable.

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.

Assumptions

You completed “Practice 7-1: Investigating Application Problems.” All instances of WebLogic Server are running.

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

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Troubleshooting Node Manager

Chapter 9 - Page 4

− 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 domain’s bin directory. Call the script to start Node Manager in the Terminal window.

$> cd /u01/domains/tshoot/wlsadmin/bin $> ./startNodeManager.sh

Note: The last of the output should include:

<Plain socket listener started on port 5556, host host02.example.com>

d. Scroll up through the output.

Note: You should see that Node Manager loaded files from the Node Manager

directory, /u01/domains/tshoot/wlsadmin/nodemanager. − The domains from nodemanager.domains

− Its configuration from nodemanager.properties

e. The configuration settings are also printed out. Look through them.

f. Look through all the output of Node Manager as it started. Do you see the problem?

Tip: The problem appears to be with the domains from which this Node Manager

expects communication.

g. In the Terminal window in which Node Manager is running, use the Terminal > Set

Title menu option. Change the title to Node Manager. h. Minimize the Node Manager Terminal window.

4. Fix the Node Manager issue.

a. The Node Manager of machine2 has the wrong domain directory in the

nodemanager.domains file for the wlsadmin domain. To verify this (or see it for the first time if you missed it in the Node Manager output), open a new Terminal window and navigate to the Node Manager home directory on host02. Print out the

nodemanager.domains file.

$> cd /u01/domains/tshoot/wlsadmin/nodemanager $> cat nodemanager.domains

wlsadmin=/u01/domains/wlsadmin

b. One way to enroll a Node Manager with a domain is with the WLST command

nmEnroll(). In that same Terminal window, start WLST.

$> /u01/app/fmw/oracle_common/common/bin/wlst.sh ...

c. Connect to the admin server. connect('weblogic', 'Welcome1',

't3://host01.example.com:7001')

Oracle University and In Motion Servicios S.A. use only

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', '/u01/domains/tshoot/wlsadmin/nodemanager')

Note:

− Enter the command on one line.

− The first parameter is the domain directory and the second parameter is the Node Manager home directory.

e. Exit WLST. exit()

f. Verify that the nodemanager.domains file has been correctly updated.

$> cat nodemanager.domains #

# <a timestamp>

wlsadmin=/u01/domains/tshoot/wlsadmin

5. Return to the admin console and try to start server2 again.

a. Use the admin console to start server2 (which uses Node Manager). b. Wait until the state of server2 is RUNNING.

6. Ensure that Node Manager automatically restarts server2 if it fails. Test this feature. a. In the admin console, navigate to server2.

b. Click Configuration > Health Monitoring.

c. What is the state of the attribute Auto Restart?

d. If Auto Restart is not enabled, lock the configuration and enable it. Save and activate

your changes.

e. Test that Node Manager will automatically restart server2 if it fails, by killing the server2 process. Return to host02. In a new Terminal window, run the ps command again.

$> ps –u oracle –o pid,args | grep server2

Note: Find the Java process that is server2. Within the output for this process you

should see -Dweblogic.Name=server2. The process ID is the first thing displayed. Make note of it.

f. Find the Terminal window in which the machine2 Node Manager is running. Resize windows and move them around so that you can see both the Node Manager window and the window in which you ran the ps command. In the ps command window, run the kill command with the process ID of server2.

$> kill -9 nnnn

Note:

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 9: Troubleshooting Node Manager

Chapter 9 - Page 6

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 $> ./killnodemanager.sh

c. Find the Terminal window in which Node Manager was running and close it. d. Start Node Manager again, in the background, by running the start Node Manager

script in the utilities directory.

$> ./startnodemanager.sh

Note: Wait for the message that Node Manager has started.

e. Close the Terminal window. f. Exit the VNC Viewer.

g. Access the admin console. Start any managed servers that are not running.

Oracle University and In Motion Servicios S.A. use only

Practice Solution: Investigating Node Manager Problems

In document N S E 2 8 J u l i o d e (página 23-33)

Documento similar