2012년 1월 27일 금요일

[WebSphere]Producing log data for WebSphere Application Server V6.1 and V7.0 silent installation failures

Producing log data for WebSphere Application Server V6.1 and V7.0 silent installation failures

Problem(Abstract)

The WebSphere® Application Server V6.1 installer is capable of installing the product in silent mode, which logs data about the installation into a temporary log file. Certain installation errors can cause the installer process to lose the temporary log file. This article explains the standard method of locating the log file, and also explains an alternative method of viewing the log file as the install process writes to it.

Cause

The WebSphere Application Server V6.1 and V7.0 installer is capable of installing the product in silent mode. Silent installation mode is invoked using the parameters: -silent -options responsefile.txt, where responsefile.txt references a text file containing a list of options that instruct the installer about how to handle the installation process.
The silent installation process does not normally produce data to the console (hence the name "silent"). Although this is by design, it can complicate the process of troubleshooting installation failures. If the installer fails while in silent mode, the installer will simply exit without printing an error on the console.

Standard location of logs
When this occurs, under most circumstances, you can navigate to the user's home directory, and look for a subdirectory named waslogs. (Alternatively, for installing IBM HTTP Server, WebSphere Plugin, or the UpdateInstaller utility, the subdirectory may be named ihslogs, plglogs, or updilogs.)

Review the modification dates of the files in the waslogs directory. If the log.txt file was not recently modified, then the log may have been moved to the targeted installation directory. In other words, you may find the log file in product_install_root/logs/install .

If you are able to successfully locate the logs using this method, then you probably do not need to read the rest of this article! The remainder of this article explains how to capture log files in a manner that helps troubleshoot unusual installation issues.


Alternate method of producing silent log data
The "standard location" described above is sufficient to help troubleshoot issues with silent installation. However, under some unusual and limited circumstances, it may be necessary to capture the log data in a different manner. This "alternate method" explains how to locate the log files as they are written.

The V6.1 installer writes a temporary log file to the following directory:

system_temp​/niflogs/log.txt​

Where system_temp is the operating system's designated temporary directory. (Typically, this directory is /tmp or C:\Documents and Settings\<current_user>\Local Settings\temp)

The V7.0 installer write a temporary log file to the following directory:

user_home​/waslogs/log.txt​

Where user_home is the current user's home directory. (Typically, this directory is represented using the tilde (~) character or $USERHOME variable on Unix-based operating systems. On Windows-based systems, this directory is represented by the %USERPROFILE% variable, and is typically set to C:\Documents and Settings\<current_user>)


Under unusual circumstances, the installer may delete this file when the process abnormally terminates, which means that any meaningful error data is lost. The log file might only exist for a few seconds.

The solution below describes methods of producing log data in a manner which can be preserved, either by "catching" the temporary log.txt file before it is deleted, or by invoking the installer in a manner which allows the installation data to be redirected to a different log file.

Resolving the problem

Usage of this solution
Note that, as stated earlier, this solution is typically only useful for unusual installation issues which require a view of the log file as it is written. If you simply need to locate the log file produced by a silent install, refer to the section above.

How to use the alternate method of capturing logs
The following are two methods for capturing installation log data. Choose one of the following methods for capturing data (both methods do not work at the same time).
    1. This method of log capture requires two terminal sessions; in other words, it is necessary to open two separate telnet sessions. (It is also acceptable to use two ssh sessions, or two terminal windows on the local system.)

    2. In the first terminal session, go to the directory which the temporary log file will be written to.

      For V6.1, this is the system's temporary directory. On most UNIX systems, the temporary directory is designated as /tmp.

      For V7.0, this is the user's home directory. On most UNIX systems, the temporary directory is designated using the tilde (~) character, so you can change to the user's home directory by using the command:

      cd ~
    3. For V6.1, under the system temporary directory, make a subdirectory named niflogs if it does not already exist. (If the temporary directory is named /tmp, then this step should produce a directory named /tmp/niflogs). In the remaining steps, the subdirectory named niflogs is referred to as the "temporary log directory".

      For V7.0, under the current user's home directory, make a subdirectory named waslogs. In the remaining steps, the subdirectory named waslogs is referred to as the "temporary log directory".

    4. Create a blank file named log.txt in the temporary log directory. A simple method of creating a blank file is by running the following command:

      touch log.txt​

    5. Run the following command to set up the capture of the log.txt file:

      tail -f log.txt >log.capture.txt​

      Note: ​The command prompt will not return control. This is expected. Allow this terminal session to remain this way.​

    6. Now switch to the second terminal session, and enter the remaining commands in the second terminal session.

    7. In the second terminal session, invoke the installer program. For example:

      ./install -silent -options ​responsefile.txt​

      Where ​responsefile.txt​refers to a response file set up for the purpose of running the installation in silent mode.​

    8. If the install program fails, then check the log.capture.txt file created in the temporary log directory. (This file would be located in the location set up in the preceding steps).
    9. Terminate the command in the first terminal session by issuing CTRL-C. You can now close both terminal sessions.
    10. Follow instructions to submit this file to IBM support for further analysis.
    Note: This method of capturing data into an alternate files can be accomplished in many different ways. It is possible to do this without resorting to using multiple terminal windows. However, this method is recommended to ensure that the necessary log is captured in a straightforward manner, without resorting to complex commands.

댓글 없음:

댓글 쓰기