Wednesday 31 October 2012

WAS INTERVIEW PART-3 QUESTIONS AND ANSWERS


      WAS INTERVIEW PART-3 QUESTIONS AND ANSWERS

1)  What is the default admin console port number in websphere?

A)  WebSphere Application Server default ports

 •Web container port (HTTP_TRANSPORT) - 9080
•Web container secure port (HTTPS_TRANSPORT) -  9443
•Administrative console port (HTTP_TRANSPORT_ADMIN) -  9090
•Adminstrative console secure port (HTTPS_TRANSPORT_ADMIN) -  9043
•Name service or RMI connector port (BOOTSTRAP_ADDRESS) -  2809
•Simple Object Access Protocol (SOAP) port (SOAP_CONNECTOR_ADDRESS) -  8880
•Data replication service client port (DRS_CLIENT_ADDRESS) -  7873
•Java Message Service (JMS) queued port (JMSSERVER_QUEUED_ADDRESS) -  5558
•JMS security port (JMSSERVER_SECURITY_PORT) -  5557
•JMS direct port (JMSSERVER_DIRECT_ADDRESS) -  5559
•Secure Association Services (SAS) SSL server authentication port (SAS_SSL_SERVERAUTH_LISTENER_ADDRESS) -  9501
•Common Secure Interoperability Version 2 (CSIV2) server transport port (CSIV2_SSL_SERVERAUTH_LISTENER_ADDRESS) -  9503
•CSIV2 client transport port (CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS) -  9502



    WebSphere Deployment deployment manager default ports

 •Administrative console port (HTTP_TRANSPORT_ADMIN) - 9090
•Adminstrative console secure port (HTTPS_TRANSPORT_ADMIN) - 9043
•Name service or RMI connector port (BOOTSTRAP_ADDRESS) - 9809
•Simple Object Access Protocol (SOAP) port (SOAP_CONNECTOR_ADDRESS) - 8879
•Data replication service client port (DRS_CLIENT_ADDRESS) - 7989
•Cell discover port (CELL_DISCOVERY_ADDRESS) - 7277
•Secure Association Services (SAS) SSL server authentication port (SAS_SSL_SERVERAUTH_LISTENER_ADDRESS) - 9401
•Common Secure Interoperability Version 2 (CSIV2) transport port (CSIV2_SSL_SERVERAUTH_LISTENER_ADDRESS) - 9402
•CSIV2 transport port (CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS) - 9403
•Object Request Broker (ORB) listener port (ORB_LISTENER_ADDRESS) - 9100


  WebSphere Application Server node agent default ports

•Name service or RMI connector port (BOOTSTRAP_ADDRESS) - 2809
•Simple Object Access Protocol (SOAP) port (SOAP_CONNECTOR_ADDRESS) - 8878
•Data replication service client port (DRS_CLIENT_ADDRESS) - 7888
•Secure Association Services (SAS) SSL server authentication port (SAS_SSL_SERVERAUTH_LISTENER_ADDRESS) - 9901
•Common Secure Interoperability Version 2 (CSIV2) transport port (CSIV2_SSL_SERVERAUTH_LISTENER_ADDRESS) - 9101
•CSIV2 transport port (CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS) - 9201
•Object Request Broker (ORB) listener port (ORB_LISTENER_ADDRESS) - 9900
•Node discovery port (NODE_DISCOVERY_ADDRESS) - 7272
•Node multicast discovery port (NODE_MULTICAST_DISCOVERY_ADDRESS) - 5000


WebSphere Application Server JMS server default ports

•Java Message Service (JMS) queued port (JMSSERVER_QUEUED_ADDRESS) - 5558
•JMS security port (JMSSERVER_SECURITY_PORT) - 5557
•JMS direct port (JMSSERVER_DIRECT_ADDRESS) - 5559
•Simple Object Access Protocol (SOAP) port (SOAP_CONNECTOR_ADDRESS) - 8876



2)  Is it possible to a server to listen to multiple port numbers in WebSphere? Explain

A) ---->  yes.. There is a possibility to listen the multiple port numbers in Websphere.This is possible when we deployed the two applications on the single server.

---->  We must add the ports of that particular servers in virtual host.

---->  Environments---> virtual hosts---> default_host---->host aliases---> new --->add that ports in the virtual host.




3) What are the responsibilities of Web container, EJB container and JNDI?

A) ---->  The webserver plug-in examines the url, verifies the list of host name aliases from which it will accept traffic based on the virtual host information, and chooses a server to handle the request.

  WEB CONTAINER :

----->  A stream is created. A stream is a connection to the web container.The web container receives the request and based on the url, dispatches it to the proper servlet.

----> If the servlet class is not loaded, dynamic class loader loads the servlet. 


JNDI : (JAVA NAMING AND DIRECTORY INTERFACE) 

----> JNDI is used to look up of either databases or ejb connection by the servlet. JNDI directs the servlet depending on the servlet request.

----> To the corresponding database and gets a connection from its connection pool in the case of servlet wants the datasource

----> To the corresponding EJB container, which then instantiates the EJB when EJB is requested.

----> IF ejb container have to execute some sql operation , it has to go to the jndi to lookup the datasource.

----> The sql statement is executed and the retrieved data is sent back to the EJB or to the servlet.

----> Data beans are created and handed off to jsps in the case of EJBs

-----> The jsp generates the html, i e sent back to through the plug-in to the webserver

-----> The webserver sends the output page to the requested browser



4)  What happens to applications if node agent is not running?

A) ----> When DMGR goes Down then there is no impact to the end-users. If NA is goes Down then there is no problem in Distributed Environment/Clustered the servers will server the application when we maintaining fail over mechanism. (NA is nothing but communication between Dmgr and federated nodes). 

-----> Before starting the app server the applications NA must be up and running then only it serves the applications which are running on that app server.

----> If the application is deployed on multiple servers, the remaining  servers will serve the application request.



5) In WebSphere 6.0 and 6.1, If you got a problem before creating a log's directory, at that time where will you the check status of installation?

A) ----> After installing the websphere product. you can see the status of the installation either it is success or failure. 

----> you can see this status in WAS product home--->logs------> install------> see the log.txt
----> If your installation is not success. i e your product is not created... u can see the status of the installation in windows user account waslogs. you can see the status there 



6)  What is the difference between Vertical and Horizontal clustering? What is the use of Horizontal and Vertical clusters? Which performance better among these two?

A) ----> Clustering is mainly to provide Fail-over capability. i.e if one server is goes down automatically the other server which is having the same configuration i.e replica of failed server have to serve the application request. This is achieved through the clustering.

---->  In realtime we use the horizontal clustering. i e building the replica of servers on different nodes. it provides the fail over capability.


----> In Vertical clustering, we will build the replica of servers on one node which fails to provide the Fail over capability.

7) What happens if a profile is federated to DMGR at that time when it is stopped? What happens to the applications under the Servers in WebSphere 6.0 ?

A) ---->  There is no impact on running of applications on the servers when the DMGR is in running or  in stopped state. 

----> DMGR is just only for admin purpose only. NO applications are running on DMGR

8) what is the difference between system out.log file and trace.log file ?

A) ----> systemout.log and trace.log are almost the same but trace has more description about the JVM rather in other words we can say that trace has more information for troubleshooting the issue .

---->  keep in mind that enable trace only when required and later disable as it will fill up the filesystem and it will effect other application if unnoticed.

9) what are FFDC logs ? what is the use of that ?

A)  ----> FFDC is first failure data capture it is a log which the IBM asks when there is a PMR opened with them .

----> you can also analyse the ffdc log through log analyser.

10) If we get page cannot be displayed then how you are going to troubleshoot the issue ?

A)  ---->  It is a HTTP 404 error. If you get this error we need to check the logs for application Server status. The page expecting by the request is not finding that means request is reaching the server but it is not available at expected location.

---> logs means for application errors or status of your application we have to seen JVM logs (SystemOut.log,Systemerr.log)

----> First try to hit the web server if that is good then hit the application server directly if both of them work then there is an issue with plugin.sometimes the web server will be in hung state kill the web server processes which can be found 

---->  command ps -ef |grep . kill all the process and restart the web server.

----> Now try the above steps again and also check the status of the app server (JVM)



11) What are the different templates available to create a profile ?

A)  WAS V7 profile templates
----> cell
----> Default
----> Managed
----> dmgr
----> management
----> secureproxy


12)  What is the use of Service Integration Bus ?

A)  ---->  WAS 6.0, has a new feature called "Service Integration Bus" i.e. a new pure-Java JMS engine. 

----> SIB is a complete JMS v1.1 provider implementation. 

----> A bus is a group of one or more interconnected servers or server clusters that have been added as members of the bus. Applications connect to a bus at one of the messaging engines associated with its bus members.

----> The following capabilities are provided by a service integration bus: 

1. Application sharing message with other system.
2. A message-producing application
3. A message-consuming application


---->  A service integration bus supports asynchronous messaging; that is, sending messages asynchronously. 

----> Asynchronous messaging is possible regardless of whether the consuming application is running or not, or if the destination is available or not. 

----> Point-to-point and publish/subscribe messaging are also supported



13)  How do you check heap is used by JVM ?

A)  ----> You can use third party monitoring tools like Wily Introscope or ITCAM and also there is inbuild monitoring tool in admin console called TPV ( Tivoli Performance Viewer) under Monitoring and Tuning.


14)  How will you verify the version of WAS in WebSphere?

A)  ----> go to directory bin directory of web sphere install root
/opt/IBM/WebSphere/App Server/bin
and run the command 

./versionInfo.sh

You can get the version of web sphere application server installed.



14) What are the differences between web sphere 4.0,5.0 and 6.0.

A) ----->  Web Sphere Studio 3.5, comes up with Visual Age for Java.

     -----> WSAD 5.0 supports J2EE 1.3 java specifications. 

    ------> RAD 6.0 (RATIONAL APPLICATION DEVELOPER) supports J2EE 1.4 and integrated with Eclipse 3.0, UML Visual Editor, Tomcat Jakarta, Ant scripting, EJB universal test client and SOA tools.


15)  In IBM WSAD, server crashes sometime while running in debug mode .Is there any way to prevent it ?

A)  ----->  you need to increase the memory allocated to java process in WAS. In WASD deployment description there is a setting for java process memory allocation. Increase the Xml values in it and see 

                              (OR)

-----> You need to bump the heap size memory default is 0,0 Enable administrative console in the wsad in the server settings I believe its configuration tab or environment . And log on to the admin console on port 9060 when u start the server in normal mode HTTP://localhost:9060/admin. Then go to server/ server1/process definition/JVM Increase the initial heap and maximum heap size in there.. Give atleast (512MB,1.5Gb) And restart the server in debug mode. Its should work.



16)  When using the WebSphere, Which three updates would force you to restart the test environment?

A)  ---->  These are the situation when you need to restart the server in test mode.
      -----> 1) When you make any changes to the Class file(Bean , DAO etc)
      -----> 2) Change any properties that were declared in properties file related to the whole application.
     ------> This is because initially properties file that were declared for the application will be loaded only when  the server starts, and the server picks up thos key, values
     ------> 3) No need to restart if you make any change for jsp file. But you need to comeout of that particular page or refresh the page , so that it will recompile the modified jsp file and generate new contents
 
      -----> But you need to restart the server when you change the servlet file.
    ------> 4) If the database connection between the DB server and APpserver fails. Because
the connection pool and all will be declared in the properties file.




17)  If the app server crashes in the middle of application deployment , what could be the reason and what steps we have to follow?

A)  ----->   If the server resources are less while deployment, when application requests are hitting application server due to less resources the application server will crash. 

------> If the application server crash then that time we can get thread dump.


18)  What is the default port for SSH server?

A)   22


19) What is Process Definition  ?

A) ----> Process Definition specifies run-time characteristics of Application Server process.

     -----> It includes Characteristics such as JVM settings , standard in , error and ouput paths and User ID and Password under which a Server runs.


20) Tell me the flow of a request from client to the server and server to the client ?

A)  Browser->HTTP Server(s)->HTTP Server->App Server Domain (Web and EJB container)--->DB...and vice versa


21)  What is singleton? What is the purpose of singleton? How to get connection in websphere portal server?

A)  Singleton class is a class in which only one instance of the object exist at any point of time. So a Singleton class is basically used when we want to restrict instantiation of a class to only one object. "Application" class, print spooler, database connection are examples of a singleton class. In a singleton class the constructor is made private and a private static is declared that reference of same class. A static variable is used for instantiating the class. Singleton class are not cloneable.


22)   what is managed server ?

A)  After federating a node from Application Server profile to Manager Profile, the node becomes Managed Node, so the servers which are running under that particular node automatically becomes managed servers (previously those are unmanaged servers, because they belongs to unmanaged node i.e; before federation) this is nothing but managed server.

----->  The server which is running under a node which has a node agent is called as Managed Server


23)   Explain architecture of WAS ?

A)   WebSphere architecture consists of one or more computer systems which are called nodes. Nodes are available within WebSphere cell. A WebSphere cell can have one node. On this node all the needed software's installed. If a WebSphere cell contains more than one node, then all the software components are distributed among the nodes. The software components that are installed in one node can share in the distributed environment. This distribution enables for scalability, reliability. 


The following are the components

1)   A web server which provides the services of HTTP 

2)  A database server for data persistence

3)  WebSphere Application Server (WAS)




24)  WAS EDGE COMPONENTS  ?

A)  Caching Proxy
      Proxy Server
     Load Balancer
     Network Dispatcher Component
     Content Based Routing (CBR)
     Site Selector Component



25)   what is the difference between L1, L2, L3?

A)  l1- is basic level (monitoring, basic configuration)
     
     l2 -back up who are senior staff (trouble shooting)
     
     l3 –architechts (designing / architect/ requirement(ram/box))


26)   What is the difference between WAS and WL?

A)   1. In weblogic u cant do clustering accros the domain,but in Websphere u can.
      
      2. In weblogic all the configurations are stored in a single file called Config.xml ,but in Websphere its stored in a directory structure called CELL
     
      3. In weblogic u can start the managed server without a Adminserver(using MSI-config.xml),in websphere u can not start a node with out Dmgr.
      
     4. In websphere u can add webserver as a unmanaged node where as u cannnt do that in weblogic.


27)   How do enable GC? (GARBAGE COLLECTOR)

A)  In the Administrative Console, expand Servers and then click on Application Servers.

     ----->   Click on the server that is encountering the¬ "OutOfMemory" condition.
     
    ----->  On the Configuration tab, under Server¬ Infrastructure, expand Java and Process
Management, and click Process Definition.
    
    ----->   Under the Additional Properties section, click Java Virtual¬ Machine.
    
    ----->   Select the Verbose garbage collection check box.
    
    -----> Click Apply
    
    ----->  At the top of the Administrative Client, click Save to apply changes¬ to the master
configuration.
   
    ----->  Stop and restart the Application Server

  ----->  The verbose garbage collection output is written to either native_stderr.log or
native_stdout.log for the Application Server

 ----->  verbosegc – Tells you what is being done, whether heap size is at min or max.

Tuesday 30 October 2012

WAS INTERVIEW PART-2 QUESTIONS AND ANSWERS


          WAS INTERVIEW PART-2 QUESTIONS AND ANSWERS


1) what are the different components in Wily Introscope ?

A)      1) Collector
          2) MOM (Manager of Managers)
          3) Webview (thin client)
         4)  Console (Thick Client)




2)    In which log file garbage collector information will be recorded ? how to enable garbage collector ?

A)  ----> Nativestdout.log Nativestderr.log are GC logs 

    ---> get into the admin console ->applicationserver->select JVM->Java & Process Management->process definition-> Java Virtual Machine.

There u will have an option to enable GC logging.





3)   How can we check the performance of the application server without external monitoring tools?



A)  Through Websphere in build monitoring tool called Tivoli Performance Monitoring under Monitoring and tuning in Admin Console.
                              (or) 

Tivoli Performance Viewer (TPV): It enables the administrators and programmers to monitor the overall health of the WebSphere Application Server without leaving the Admin console.
From TPV, you can view current activity or log Performace Monitoring Infrastructure(PMI) for the following:
- System resources such as CPU utilization.
- WebSphere pools and queues such as DB connection pool.
- Customer Application data such as servlet response time.


4) How many plugins are required by http server ?

A) ONLY ONE 

5)  what is a collector tool ?

A)  ----> Collector is a tool which provides all log files. These log files contains failure info. 
      ----> If the bugs cant be cleared by administrator, then by using this tool we will send all log files to IBM people.

6)  How many JVMs will there for each server ?

A) ----> It depends on the enironment. There can be any number no limit.
    ----> Generally in Producation a JVM is put in two servers clustered horizontally to avoid single point of failure (SPOF)

7) what is Embedded HTTP Server ?

A) ----> The embedded HTTP Server receives requests for WebSphere assets from the WebSphere plug-in and passes them to an application server for processing.

   ---->   Any response from the application server is passed back to the WebSphere plug-in for display.

 ----->   The embedded HTTP server supports both HTTP and secure HTTP (HTTPS) protocols for connecting Web servers to application servers.

----> By default, the embedded HTTP server listens for requests on TCP/IP port 9080 but this is configurable.

For example: http://server-name:9080/servlet

You can also use the embedded HTTP server to test your WebSphere applications, but it should never be used as a production Web server.



8)   How to know whether the plug-in ic propagated or not ?

A) Check the plugin-cfg.xml file in webserver


9what are the different types of log files we have ? what is the use of each log file ?

A)  1)  SystemOut.log :  standard JVM output log
          ---> Indicates if the code running on the Application Server started and stopped successfully. 
          --->Destination and name are configurable. 
         ----> Can be used for user messages. 
2)      SystemErr.log : standard JVM error log 
         ----> Identifies exceptions thrown by the code running on the Application Server. 
         ----> Destination and name are configurable. 
3)     startServer.log and stopServer.log :
         ----> Describes the startup and shutdown of the Application Servers. 
4)  Activity.log: events that show a history of activities 
         ----> Use Log Analyzer to read output from this file. 
          
5)  
http_plugin.log : plug-in trace log 
       ----> Errors and data from the Web server plug-in. 
6)
trace.log :  output from diagnostic trace. 
       ----> Destination and name are configurable. 
       ----> All WebSphere Application Server log files are under the logs directory. where is the WebSphere Application Server installation directory (for Windows 2000 the default is: C:Program FilesWebSphereAppServer). 

----> SystemOut.log and SystemErr.log are the default names for the JVM logs. They contain server and user program information (sent by: System.out.xxx code in the program). The default location is 
logs


----> startServer.log and stopServer.log can also be found under the logs directory. These files contain information logged by the server as it starts up and shuts down. 

-----> The activity.log file contains information about normal events that are occurring to the system. For example, when a module is first accessed and loaded into the server container, or when a JSP is compiled, or when requests are directed from the HTTP server to the Application Server. Activities such as these are time stamped and recorded in the activity.log file. The activity.log file size can be set. 

-----> The default value is 1024K, or 1 megabyte. The minimum size is 8K and maximum is 1048576K (1 gigabyte). To do this, set the com.ibm.ws.ras.ActivityLogSize value in the logging.properties file in the properties directory.


10)   what are the parameters available in IHS servers response file ?

A) ---->   # In real life, you must concatenate these

   -----> # parameters onto one continuous line. They

----- ># may NOT be split as we do here

-----> -W maintenance.package=

-----> "/fixPaks/7.0.0-WS-IHS-LinuxX32-FP0000011.pak;"

----> -W product.location="/IBM/WebSphere/HTTPServer"

----> -OPT checkFilePermissions="true"

----> -OPT disableNonBlockingPrereqChecking="true"

----> -W update.type="install"


11)  How to deploy web/jar files in Weblogic or tomcat in unix/Linux environment ?

A)  In weblogic 9.0--> 1)copy the web / Jar Application paste in Auto deployment folder.it's called Hot deployment.
2) Otherwise go to Administrative console--> http://localhost:7001/console --> Deployment->Loc/Edit Click--> Install--> select source path
3) WLST --> Weblogic Scripting tool--> type command Deploy

java.Weblogic.Deployer http://localhost:7001 -user weblogic -password weblogic -deploy application name Managedserver1,Managed server2.



12)    In which log file garbage collector information will be recorded ? how to enable garbage collector ?

A)  ----> Nativestdout.log Nativestderr.log are GC logs 

    ---> get into the admin console ->applicationserver->select JVM->Java & Process Management->process definition-> Java Virtual Machine.

There u will have an option to enable GC logging.


13)   How can we check the performance of the application server without external monitoring tools?

A)  Through Websphere in build monitoring tool called Tivoli Performance Monitoring under Monitoring and tuning in Admin Console.
                              (or) 

Tivoli Performance Viewer (TPV): It enables the administrators and programmers to monitor the overall health of the WebSphere Application Server without leaving the Admin console.
From TPV, you can view current activity or log Performace Monitoring Infrastructure(PMI) for the following:
- System resources such as CPU utilization.
- WebSphere pools and queues such as DB connection pool.
- Customer Application data such as servlet response time.


14)   Can someone explain what it means by Federate A NODE ?

A)   ---> Federation is nothing but addition.

     ----> Federating the node means we have to add the node of the standalone application server to the DMGR profile.
                           (OR)


---->  Federating node means adding stand alone application or stand alone profile to deployment manager(DMGR), we can achieve this by using admin console or addnode command of stand alone profile.

CMD: ./addNode.sh 

----> Once this process is successfully done, one nodeagent server is created for app server, this nodeagent is responsible for communication between dmgr and application server.



15)   Solving OutOfMemoryError in WAS. How to Increase WebSphere JVM Memory with / without using IBM Console?

A)  --->  When I upload a big file through java application running on  Websphere Application Server , I got  OutOfMemoryError   , as given below 

---->   JVMDUMP013I Processed Dump Event "uncaught", detail "java/lang/OutOfMemoryError".  

---->   Also memory leak is  a common memory problem that also leads to OutOfMemory error. In Java ,  memory leaks can not happen as  it has automatic Garbage Collection (GC). GC  removes  unused objects that are not referenced anymore. But if an object is not used, but is still referenced, GC does not remove it, which leads to memory leaks in JVM .

----->  Due to the above memory leak or large objects error ,  the performance of the application server may decline 

----> WAS may be crashed with OutOfMemory error. please check the error  message  java.lang.OutOfMemoryError”  in the WAS  log file ( i.e. native_stderr.log) 

---->  One of Solution to the above error : 

---->   When I increase the JVM Heap Size ,  the problem got solved . Now let us see , how to increase JVM Heap Size in Websphere Application Server

----->  You can solve the problem in two ways 
            i) Using the IBM console 
          ii) By changing  the server.index file directly

---->  i). To tune the JVM Max Heap size using the IBM console  

----->   1. Open the WebSphere Application Server administrative console, 
                http://hostname:port/ibm/console, and log in.
        2. Expand Servers  -> Application servers  -> server1  -> Java and Process Management  -> Process Definition  -> Java Virtual Machine.
         3. Change the Max Heap Size to a larger value.
         4.  Click Apply and click Save .
                     Restart WebSphere Application Server.

-----> ii)  By changing  the server.xml file directly

              Open the server.xml file located in the following directory

/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config/cells/YourSrverNode01Cell/nodes/YourServerNode01/servers/server1

---->   Then  you have to reduce the  max heap size value using the IInd method ..(i.e. change server.xml file directly)

----> Tuning the max heap size
  Setting the JVM heap size directly relates to the number of server instances need to be  started on a specific node and the total RAM available on that machine. The total value of all server JVM heap sizes on a specific node must be less than half of the total RAM of that computer. To determine the max heap size , you can use the following equation 
max_heap_size  = Total_RAM / 2 / no_of_servers_instance
For example, to support two servers instance  on a machine with 4  GB of RAM:
max_heap_size = 4 GB / 2 / 2
        =2 GB /  2  =  1 GB 
The maximum heap size is 1 GB  for each server instance.

---->  Default maximum heap size is 250 MB

------>  Increasing the minimum heap size & maximum heap size can improve the start-up of application server. The number of garbage collection (GC)  occurrences are reduced and a 10% gain in performance is realized. 

16)  How to determine Max Heap Size is too large or too small  for your application.?  

A)   ---->  If  GC takes a so long time to clean up objects with large heap, you can reduce the maximum heap size. 

     -----> If  GC frequency is too high, the heap may be too small for the application and GC needs to run frequently, so you may increase the maximum heap size.