Wednesday 27 June 2012

Websphere Application Server FAQs Part


1)  What is the error HTTP 403 indicates and how to solve these issues?

a)   This is due to SSL certificate or some security settings in the server might have issues.
                                     HTTP Error 403 - Forbidden
Introduction

Your Web server thinks that the HTTP data stream sent by the client (e.g. your Web browser or our CheckUpDown robot) was correct, but access to the resource identified by the URL is forbidden for some reason.
This indicates a fundamental access problem, which may be difficult to resolve because the HTTP protocol allows the Web server to give this response without providing any reason at all. So the 403 error is equivalent to a blanket 'NO' by your Web server - with no further discussion allowed.
By far the most common reason for this error is that directory browsing is forbidden for the Web site. Most Web sites want you to navigate using the URLs in the Web pages for that site. They do not often allow you to browse the file directory structure of the site. For example try the following URL (then hit the 'Back' button in your browser to return to this page):

This URL should fail with a 403 error saying "Forbidden: You don't have permission to access /accounts/grpb/B1394343/ on this server". This is because our CheckUpDown Web site deliberately does not want you to browse directories - you have to navigate from one specific Web page to another using the hyperlinks in those Web pages. This is true for most Web sites on the Internet - their Web server has "Allow directory browsing" set OFF.


403 errors in the HTTP cycle

Any client (e.g. your Web browser or our CheckUpDown robot) goes through the following cycle:                      
  • Obtain an IP address from the IP name of your site (your site URL without the leading 'http://'). This lookup (conversion of IP name to IP address) is provided by domain name servers (DNSs).
  • Open an IP socket connection to that IP address.
  • Write an HTTP data stream through that socket.
  • Receive an HTTP data stream back from your Web server in response. This data stream contains status codes whose values are determined by the HTTP protocol. Parse this data stream for status codes and other useful information.
This error occurs in the final step above when the client receives an HTTP status code that it recognises as '403'.


Fixing 403 errors - general

You first need to confirm if you have encountered a "No directory browsing" problem. You can see this if the URL ends in a slash '/' rather than the name of a specific Web page (e.g. .htm or .html). If this is your problem, then you have no option but to access individual Web pages for that Web site directly.
It is possible that there should be some content in the directory, but there is none there yet. For example if your ISP offers a 'Home Page' then you need to provide some content - usually HTML files - for the Home Page directory that your ISP assigns to you. Until the content is there, anyone trying to access your Home Page could encounter a 403 error. The solution is to upload the missing content - directly yourself or by providing it to your ISP. Once the content is in the directory, it also needs to be authorized  for public access via the Internet. Your ISP should do this as a matter of course - if they do not, then they have missed a no-brainer step.
If your entire Web site is actually secured in some way (is not open at all to casual Internet users), then an


401 - Not authorized message could be expected. It is possible, but unlikely, that your Web server issues an 403 message instead.
Some Web servers may also issue an 403 error if they at one time hosted your site, but now no longer do so and can not or will not provide a redirection to a new URL. In this case it is not unusual for the 403 error to be returned instead of a more helpful error. So if you have recently changed any aspect of your Web site setup (e.g. switched ISPs), then a 403 message is a possibility. Obviously this message should disappear in time - typically within a week or two - as the Internet catches up with whatever change you have made.
If you think that the Web URL *should* be accessible to all and sundry on the Internet and you have not recently changed anything fundamental in your Web site setup, then an 403 message indicates a deeper problem. The first thing you can do is check your URL via a Web browser. This browser should be running on a computer to which you have never previously identified yourself in any way, and you should avoid authentication (passwords etc.) that you have used previously. Ideally all this should be done over a completely different Internet connection to any you have used before (e.g. a different ISP dial-up connection). In short, you are trying to get the same behavior a total stranger would get if they surfed the Internet to your Web page URL.
If this type of browser check indicates no authority problems, then it is possible that your Web server (or surrounding systems) have been configured to disallow certain patterns of HTTP traffic. In other words, HTTP communication from a well-known Web browser is allowed, but automated communication from other systems is rejected with an 403 error code. This is unusual, but may indicate a very defensive security policy around your Web server.


Fixing 403 errors - CheckUpDown

The first question is whether the Web page for your URL is freely available to everyone on the Internet. If this is not the case, then you may need to provide two items 2. Web Site User ID and 3. Web Site Password for your CheckUpDown account - but only if your site uses HTTP Basic Authentication. The Web Master or other IT support people at your site will know what security and authentication is used.
If however your Web page is open to all customers and there have been no fundamental changes recently to how your Web site is hosted and accessed, then an 403 message should only appear if your Web server objects to some aspect of the access we are trying to get to your Web site. Because it indicates a fundamental authority problem, we can only resolve this by negotiation with the personnel responsible for security on and around your Web site. These discussions unfortunately may take some time, but can often be amicably resolved. You can assist by endorsing our service to your security personnel. Please contact us (email preferred) if you see persistent 403 errors, so that we can agree the best way to resolve them.

2)  If the “page can’t display “error comes then what you will do in the production system?

a) There must be some network issue or server not receiving the request.
Need to check the server availability.

3)  What is the error HTTP 404 indicates and how to solve these issues?

a)  This error might be because of Application server non availability. Need to check the logs and server status then need to take appropriate action to resolve the issue.

4)  What is the difference between page not found and HTTP 404? How to solve these issues?

a)  The “Page not found” error is, the request is not reaching the server. HTTP 404 errors is request is reaching to server but whatever it is expecting it’s not found at expected location

5) What is meant by ear expander utility?

EAR Expander utility is used to expand the application binaries into any path, normally we will use this to expand it in other than the default path.
Once expanded we will update the same app binaries from WAS admin console to update WAS.
The EARExpander expands Ear files into the format desired by the application server runtime, as described in the application installation instructions. EARExpander can also collapse the expanded format back to a normal Ear (.jar or .zip) format.
Invoking the tool
The tool is located in the following directory:
product_installation_root/bin/EARExpander.bat
To view syntax, open a command line and invoke the tool without arguments. Here is a typical result. The line breaks have been changed for better formatting in this documentation.
C:\seaa0122.02\bin>EARExpander.bat IBM WebSphere Application Server,
Release 4.0 J2EE
J2EE Application Expansion Tool, Version 1.0
Copyright IBM Corp., 1997-2001
Required Argument Missing:ear
Usage: java com.ibm.websphere.install.commands.EARExpander
-ear -expandDir -operation [expansionFlags]
ExpansionFlags indicate whether you want every JAR file expanded, or just the contained WAR files within the EAR file. The default is all.
Expanding files
The following example command expands the file my.ear into the product_installation_root/bin/myEAR directory:
EARExpander -ear my.ear -expandDir product_installation_root/bin/myEAR
-operation expand
Collapsing files
Using the collapse -operation reverses the format to normal.
EARExpander -ear my.ear -expandDir product_installation_root/bin/myEAR
-operation collapse
Type each of the above commands on a single line, despite their appearance in this documentation.

6) What is meant by JAVA Script?

a) Java script is a scripting tool to developed web applications.

7) What is meant by Heap in Java process and what information will be available in heap file?

a)  Heap is used to collect the garbage for java applications; the Heap file contains the garbage collected from java process.

8) What are the available log file in the WAS 6.1?

a) In was there are list of logs available to monitor and troubleshoot. They are
Diagnostic Trace Service
View and modify the properties of the diagnostic trace service. Diagnostic trace provides detailed information about the execution of WebSphere Application Server components within this managed process. Changes on the Configuration panel will apply when the server is restarted. Changes on the Runtime panel will apply immediately.

JVM Logs

View and modify the settings for the Java Virtual Machine (JVM) System.out and System.err logs for this managed process. The JVM logs are created by redirecting the System.out and System.err streams of the JVM to independent log files. The System.out log is used to monitor the health of the running application server. The System.err log contains exception stack trace information that is useful when performing problem analysis. There is one set of JVM logs for each application server and all of its applications. JVM logs are also created for the deployment manager and each node manager. Changes on the Configuration panel will apply when the server is restarted. Changes on the Runtime panel will apply immediately.

Process Logs

View or modify settings for specifying the files to which standard out and standard error streams write. The process logs are created by redirecting the standard out and standard error streams of a process to independent log files. Native code writes to the process logs. These logs can also contain information relating to problems in native code or diagnostic information written by the JVM. There is one set of process logs for each application server and all of its applications. Process logs are also created for the deployment manager and each node manager. Changes on the Configuration panel will apply when the server is restarted. Changes on the Runtime panel will apply immediately.

IBM Service Logs

Configure the IBM service log, also known as the activity log. The IBM service log contains both the WebSphere Application Server messages that are written to the System.out stream and some special messages that contain extended service information that can be important when analyzing problems. There is one service log for all WebSphere Application Server Java virtual machines (JVMs) on a node, including all application servers. and their node agent (if present). A separate activity log is created for a deployment manager in its own logs directory. The IBM Service log is maintained in a binary format. Use the Log Analyzer or Showlog tool to view the IBM service log.

Change Log Detail Levels

Log levels allow you to control which events are processed by Java logging. Click Components to specify a log detail level for individual components, or Groups to specify a log detail level for a predefined group of components. Click a component or group name to select a log detail level. Log detail levels are cumulative; a level near the top of the list includes all levels below it.

9)  If a developer requests to tune an application then what you will do?


All the steps for Performance Tuning would approximately take 45 minutes.

JVM Heap Size

By default, the Java virtual machines for WebSphere Application Server and WebSphere Portal Server are assigned only 256 MB per process. This value should be increased.
To change this value, open the WebSphere Admin Console and go to
Servers -> Application Servers -> (all server names) -> Process Definition -> Java Virtual Machine
and set both initial heap size and max heap size to an adequate value:
on a machine with 4 GByte of real memory, set it to 1024 MByte, on a 8 GByte machine to 2048 MByte.
If a value greater than 1024 MByte is selected, it may be necessary to change the AIX parameter LDR_CONTRL. For details, please refer to the AIX documentation.

Session Timeout

Reducing the session timeout can help reduce memory consumption requirements.
To change this value, open the WebSphere Admin Console and go to
Servers -> Application Servers -> (all server names) -> Web Container -> Session Management -> Session Timeout
and set Timeout to 10 Minutes.

Class Garbage Collection

To change this value, open the WebSphere Admin Console and go to
Servers -> Application Servers -> (all server names) -> Process Definition -> Java Virtual Machine -> Generic JVM arguments
and add the parameter -Xnoclassgc.
Class Garbage Collection -Xnoclassgc Using the "-Xnoclassgc" parameter will allow for more class reuse, thus causing less garbage collections to occur.

Servlet Engine Thread Pool Size

To change this value, open the WebSphere Admin Console and go to
Servers -> Application Servers -> (all server names) -> Web Container -> Thread Pool
and add the parameters for Minimum size threads and Maximum size threads to 70.

Data Source Connection Pool Size

To change this value, open the WebSphere Admin Console and go to
Resources -> JDBC Providers -> (all providers) -> Data Sources -> (all data sources) -> Connection Pools
and set the parameters for Minumum connections and Maximum connections to 50.

Statement Cache Size

To change this value, open the WebSphere Admin Console and go to
Resources -> JDBC Providers -> (all providers) -> Data Sources -> (all data sources)
And set the parameter for Statement Cache Size to 500.

10) Tell about Resource analyser?

a)   Resource analyser is used to analyse the performance of the WAS resources. It is a monitoring tool comes with WAS.

11) If you need to configure a process in UNIX what are the steps?

a)   No Idea about this question.

12) How to find a text in VI editor in UNIX?

a)   Escape  / followed by text

13) Tell about “nanny process” in UNIX?

a)  Nanny process on Windows NT and Windows 2000 is the Windows service "IBM WS AdminServer".

14)  What is the basic command in UNIX to find network performance?

 a)   Netstat

15) Tell about data source?

a)   Installed applications use JDBC providers to interact with relational databases. The JDBC provider object supplies the specific JDBC driver implementation class for access to a specific vendor database. To create a pool of connections to that database, you associate a data source with the JDBC provider. Together, the JDBC provider and the data source objects are functionally equivalent to the J2EE Connector Architecture (JCA) connection factory, which provides connectivity with a non-relational database.
Data sources allow you to manage a pool of connections to a database
Data sources work as follows:
  1. When a client wants to use a connection, it looks up a data source by name from a JNDI server.
  2. The data source then returns a connection to the client.
  3. If the data source has no more connections, it may ask the database manager for more connections (as long as it has not exceeded the maximum number of connections).
  4. When the client has finished with the connection, it closes the connection.
  5. The data source then returns the connection to the available pool.
You can configure data sources for WebSphere® Application Server v6.x by using the Deployment page in the application deployment descriptor editor or using the administrative console. For WebSphere Application Server v5.11 test environments and servers you can configure data sources by using the Data Source page in the server editor.
How to configure datasource and jdbc providers--lab

0 comments:

Post a Comment