Академический Документы
Профессиональный Документы
Культура Документы
Web servers like that of Ap ache, N etscape and Microsoftare u tilized . The configu ration of a w eb server allow s
WebLogic is cap able of p rovid ing services to d ynam ic and static requ ests that are u su ally generated by servlets,
H TML and JSP.
7. What are the capabilities of WebLogic server?
There are variou s cap abilities associated w ith WebLogic server and they are
You shou ld first set the JAVA_H OME in the start script of the server.
Rem ove any kind of sw itches specific to Su n JVM from start scripts of server.
The first step involved in this process of creating pooling is to d ow nload 3 jar files w hich are the
com m ons-d bcp -1.2 jar, com m ons-pool-1.3.jar and com m ons-collections-3.1 jar.
The next step is to m ake an entry insid e server.xm l of tom cat factory.
18. How can you differentiate server crash and server hang?
With a server crash, there is no existence for the Java process and if it is a server hang, then the Java process stop s
resp ond ing.
19. What are the causes for server crash?
The m ajor reasons for the occu rrence of server crash are the native IO, JVM, su pported configu ration, JDBC
d river issu es and SSL native libraries.
20. How can you solve the issue of server crash?
A crash associated w ith JVM is capable of generating hs_err_pid file. You need to refer this file for find ing ou t the
root cau se for su ch a crash. In the case of native IO being the origin of thread , you need to d isable it. If the origin
of the problem is from the d river, need to contact the d river team .
21. How can Server Hang be solved?
Java WebLogic.Ad m in PIN G need s to be checked for find ing w hether you get a norm al and positive response.
You can find ou t the root cau se for hanging from this file. You ju st need to rectify the errors that are id entified
from this file.
22. Explain the reasons for server hang?
The m ajor reasons that lead to the server hang are m em ory leak, d ead lock, and long tim e for retu rning.
23. D efine memory leak ?
Mem ory leak is the cond ition that arises w hen the objects get retained in the heap even after they hav e no u se.
24. What causes the condition OUT OF MEMORY?
There are variou s reasons that can lead to this cond ition and they are
Insu fficient size of the heap com pared to the extra load .
Placing of the objects takes longer period of tim e like that of H TTP ses sions.
There is a possibility for collecting the m em ory d ata after enabling GC verbose. If the cond ition has arou sed
becau se of H TTP session, then it w ill be au tom atically solved w hen the session gets tim e ou t. You shou ld also
verify the cod e associated w ith th e hand ling of jd bc connectivity. You shou ld also optim ize the size of the heap
by consid ering the load .
26. When can high usage of CPU occur?
This is the cond ition that u su ally occu rs w hen a single thread or process m akes u se of a larger portion of the CPU
in an u nexpected m anner.
27. How can the issue associated w ith high CPU usage be solved?
In w ind ow s platform the issu e of CPU high u sage can easily be solved by m aking u se of pslist and also w ith the
process explorer to observe the fu nction perform ed by t he thread or the process.
28. Explain the term clustering?
Clu stering is the process of grou ping the servers together for accom plishing high percentage of scalability and
availability.
29. What is the purpose of clustering?
The m ajor goal of perform ing the process of clu stering is to m ake high scalability as w ell as availability of the
servers possible. This process also help s in balancing the load in a proper m anner and also accom plishes failover.
30. How can cluster communication occur?
The com m u nication throu gh clu ster is m ad e possible by the m u lticast IP as w ell as port by the process of send ing
period ic m essages w hich are norm ally called as heartbeat m essages.
31. What are the various types of WebLogic installations?
The WebLogic installation u su ally occu rs in three d ifferent m od es w hich are:
Graphical m od e
Console m od e
Silent m od e.
Stage d eploym ent is a kind of process in w hich the ad m in gets a physical copy w hich is d istribu ted to the other
instances.
38. What is non-stage deployment?
There is no copy in the ad m inistrator bu t each and every server need s to contact the sou rce d irectly for getting
the item to be d eployed .
39. How can port number be checked?
Port nu m ber can be checked by u sing netstat-na| grep connected .
40. How to find out the listening ports?
Listening p orts can be fou nd ou t by u sing netstat -na| grep listen.
41. How to check the version of Java?
Version of java can be checked by u sing [roo@h1vm / ]#java-version.
42. How is it informed w hen the server is added to the cluster?
The availability of the n ew server in the clu ster is broad casted by the WebLogic server clu ster.
43. How many WebLogic servers can be held inside a multi -processor machine?
There is no lim itation for the nu m ber of servers.
44. What is application tuning?
This process involves ejb pool size cache and jsp recom p ilation.
45. What is OS tuning?
This is the process of setting u p TCP/ IP param eters.
46. What is Core Server tuning?
This is the process involving the tu ning of w ork m anager, chu ck size, perform ance p acks, chu nk pool size and
connection backlog bu ffering.
47. What is JVM tuning?
This process involves m onitoring of the garbage collection and the tu ning of gc strategy.
48. What is a Machine?
Machine is the logical representation that of the physical m achine.
iReader
14)Can I set the deployment order for application modules? For standalone
modules?
The Load Ord er attribu te controls the d eploym ent ord er of stand alone m od u les and applications relative to other
m od u les and applications of the sam e type. For exam p le, stand alone EJBs w ith sm aller Load Ord er valu es are
d eployed before those w ith higher valu es. Mod u les that are d eployed as p art of an Enterprise Ap plication (EAR
file or d irectory) are d eployed in the ord er in w hich they are specified in the ap plication.xm l d eploym ent
d escriptor. What is the d ifference betw een the WL_H OME/ config/ exam ples/ applications fold er and the
WL_H OME/ config/ exam ples/ stage fold er? The applications fold er is intend ed for ap plications that are not yet
read y for a prod u ction environm ent. WebLogic Server d ynam ically d eploys the contents of the ap plications
fold er. The stage fold er (or a fold er that you create for the sam e pu rpose) is for storing copies of d eploym ent files
that are read y for d eploym ent in a prod u ction environm ent (d eploym ents that u se the stage or external_stage
d eploym ent m od es).
10
When a Server crahes, the JAVA p rocess no longer exists. When the Server is hu ng, it stop s
resp ond ing.
We can u se the w eblogic.ADMIN u tilty to ping the server. In case of a hang situ ation w e can take
m ultip le thread d ump s and analyze the cau se of hang.
2. What can be the various reasons for a server crash?
a) N ative IO
b) SSL N ative Libraries
c) JVM
d ) Su pp orted Configu ration
e) JDBC Driver issu e
3. How do you troubleshoot a crash?
JVM crash generates a hs_err_p id file. We need to look into the stack trace of the hs_err_pid file .
If the thread is from a native io, w e need to d isable native io.
if the stack trace is from the d river, w e need to get in tou ch with the d rive team .
Qu ite p ossibly its a problem w ith d river. Changing the typ e of d river can be a w orkarou nd .
If the thread show s it coming from an op timzed cod e, w e can tu rn of optimization.
If the stack is from native calls of app lication, its a bu g w ith the app lication and it has to b mod ified .
4. Ho do you troubleshoot Server Hang?
We can u se java w eblogic.Ad min PIN G to check if w e get a norm al resp onse.
We need to take mu ltip le thread d u mp s w ith kill -3 p id on u nix and CTLR Break on Wind ow s.
Analyze the thread d um p to find the root cau se.
5. What can be the reasons of Server hang?
11
Mem ory leak, d atabse qu ery taking a long time to retu rn, Dead lock.
6. What is memory leak?
Mem ory leak is w hen objects are not rom ved from the heap even w hen they are not required .
7. What are the various causes for OUT OF MEMORY?
a) Insu fficient heap size, not able to m atch the extra load .
b) Objects licing too long, like H TTP Sessions.
c) Mem ory leak in ap plication cod e.
d ) Full GC not happ ening d u e to JVM Bu g.
8. How to troubleshoot and overcome such issues?
Gather m em ory d ata by enabling GC verbose.
If its d u e to H ttp Session, tim ing out http session after certain interval m ight help .
Look into the cod e for jd bc connection hand ling.
Op timizing the heap size accord ing to the load .
9. When does High CPU Usage occur?
It occurs w hen one p rocess or one thread u tilizes u nexp ected ly high proportion of CPU.
10. How to troubleshoot it?
In Solaris environment, we need to take p stack and p rstack and see w hat the thread s are d oing.
In Wind ow s w e need to use p slist and process exp lorer.
11. What is Clustering and w hat is achieved through it?
Clu stering is the group ing together of servers for the p u rp ose of high availability and scalability.
Load balancing and Failover is achieved .
12. How does Cluster Communication Happen?
Members of the Clu ster com mu nicate over the Clu ster Multicast IP and Port by send ing p eriod ic heart
beat m essages.
13. What is the difference betw een the Sun JVM and BEA JRockit JVM?
The most w ell know JVM is the im plem entation from Su n. The Su n JVM is called HotSp ot. The Su n
JVM is ship p ed in the Java Develop ers Kit (JDK) and Java Ru ntim e Environm ent (JRE) from Su n.
12
The BEA JRockit JVM from BEA system s is op timized for reliability and p erform ance for server sid e
ap plications. To achieve this, BEA JRockit JVM u ses technologies su ch as cod e generation, hot sp ot
d etection, cod e op timization, ad vanced garbage collection algorithm s and tight op erating system
integration.
14. TUning JVM Parameters.
If you have a single p rocessor, single thread m achine then you should u se the serial collector (d efau lt
for some configurations, can be enabled exp licitly for w ith -XX:+UseSerialGC). For m ultiprocessor
m achines w here you r w orkload is basically CPU bou nd , u se the p arallel collector. This is enabled by
d efault if you u se the -server flag, or you can enable it exp licitly w ith -XX:+UseParallelGC. If you d
rather keep the GC pau ses shorter at the exp ense of u sing m ore total CPU time for GC, and you have
m ore than one CPU, you can u se the concurrent collector (-XX:+UseConcMarkSw eep GC). N ote that
the concu rrent collector tend s to require m ore RAM allocated to the JVM than the serial or p arallel
collectors for a given w orkload becau se som e m emory fragm entation can occu r.
15. How do you do performance tuning of WLS?
It can be categorized in 4 p arts.
a. Ap plication Tu ning.
jsp precom pilation, ejb p ool size cache..
b. OS Tu ning
Setting tcp ip p arameter.
tcp_tim e_wait_interval
tcp_conn_req_m ax_q
c. Core Server Tu ning.
tu ne w orkm anager, tu ne chu ck size and chu nck pool size, u sing p er form ance p acks, conenction
backlog bu ffering.
d . JVM Tu ning
tu ning gc strategy, m onitoring garbage collection..
16. What is the difference betw een D evelopment mode and Production mode of Weblogic Server?
Developm ent Mod e:
1. The d efault JDK for d evelopm ent d om ain is Su n H otsp ot.
2. You can u se the d em o certificates for SSL.
13
14
Login into the Ad min Console, click on the server on w hich you w ant to enable he Http Tu nneling
featu re
Click on the Protocols tab ? General ? check the Enable Tu nneling check box.
N ow you can comm u nicate w ith the JVMs (Server Instances) u sing protocols other than t3
18. What is the difference betw een T3 and HTTP protocol?
WebLogic u ses the T3 protocols for internal and external connections to the servers. The T3 protocol
often is u sed in WebLogics im plem entation of RMI. Proprietary of WebLogic Server.
H ttp protocols are u sed p rimarily for HTTP comm unication betw een the brow ser and the w eb server.
Stand ard follow s the W3C (World Wid e Web Consortiu m ).
N ote: All of these p rotocols are, by d efault, m ultiplexed over the sam e connection to t he servers
ad d ress and p ort. So you can access a w eb p age hosted by the server u sing a URL su ch as
http:/ / host:p ort/ p age.jsp. An external client can set u p an initial JN DI context to a server u sing the
URL t3:/ / host:p ort/ . All that has changed is the p rotocol over w hich the client m u st com mu nicate
w ith the server.
iReader
15
Scalability
The capacity of an application deployed on a WebLogic Server cluster can be increased dynamically to meet
demand. You can add server instances to a cluster without interruption of servicethe application continues to
run without impact to clients and end users.
16
High-Availability
In a WebLogic Server cluster, application processing can continue when a server instance fails. You cluster
application components by deploying them on multiple server instances in the clusterso, if a server instance on
which a component is running fails, another server instance on which that component is deployed can continue
application processing.
The choice to cluster WebLogic Server instances is transparent to application developers and clients. However,
understanding the technical infrastructure that enables clustering will help programmers and administrators
maximize the scalability and availability of their applications.
5.Different between stage and no stage deployment?
Stage Deployment:- Admin server Having the physical copy and it will distribute to remaining instances.
Staged deployment will copy your deployment units onto the deployment servers, place them into the
$WL_HOME/servers/SERVER_NAME/stage directory and deploy them from there.
In stage mode, the Administration Server copies the deployment files from their original location on the
Administration Server machine to the staging directories of each target server. For example, if you deploy a Java
EE Application to three servers in a cluster using stage mode, the Administration Server copies the deployment
files to directories on each of the three server machines. Each server then deploys the Java EE Application using its
local copy of the archive files.
When copying files to the staging directory, the Administration Server creates a subdirectory with the same name as
the deployment name. So if you deployed using the command:
java weblogic.Deployer -adminurl http://localhost:7001 -user weblogic
-password weblogic -name mytestear -stage -targets mycluster
-deploy c:\bea\wlserver_10.0\samples\server\medrecd\dist\physicianEar
a new directory, mytestear, would be created in the staging directory of each server in mycluster. If you do not
specify a deployment name, a default deployment name (and staging subdirectory) is used:
For exploded archive deployments, the deployment name and staging subdirectory are the name of the
directory you deployed (physicianEar in the example above).
For archived deployments, the default deployment name is the name of the archive file without the
extension. For example, if you deploy physicianEar.ear, the deployment name and staging subdirectory
are physicianEar.
The Administration Console uses stage mode as the default mode when deploying to more than one WebLogic
Server instance. weblogic.Deployer uses the target servers staging mode as the default, and Managed Servers use
stage mode by default.
Stage mode ensures that each server has a local copy of the deployment files on hand, even if a network outage
makes the Administration Server unreachable. However, if you are deploying very large applications to multiple
servers or to a cluster, the time required to copy files to target servers can be considerable. Consider nostage mode
to avoid the overhead of copying large files to multiple servers.
Syntax for Stage Mode
To use stage mode, specify -stage as an option to weblogic.Deployer, as in:
java weblogic.Deployer -adminurl http://localhost:7001 -user weblogic
-password weblogic -name mydeploymentname
17
18
The goal of tuning your heap size is to minimize the time that your JVM spends doing garbage collection while
maximizing the number of clients that WebLogic Server can handle at a given time. To ensure maximum performance
during benchmarking, you might set high heap size values to ensure that garbage collection does not occur during
the entire run of the benchmark.
You might see the following Java error if you are running out of heap space:
java.lang.OutOfMemoryError <<no stack trace available>>
java.lang.OutOfMemoryError <<no stack trace available>>
Exception in thread "main"
To modify heap space values, see Specifying Heap Size Values.
To configure WebLogic Server to detect automatically when you are running out of heap space and to address low
memory conditions in the server, see Automatically Logging Low Memory Conditions.
9.States of the Server?
Ans:-There are 9 states of server:
Shutdown
Starting
Standby
Resuming
Running
Suspending
Shutting down
Failed
Unknown
The series of states through which a WebLogic Server instance can transition is called the server life cycle.
19
Q.Use of Stub?
Ans:-
Clients that connect to a WebLogic Server cluster and look up a clustered object obtain a replica-aware stub for
the object. This stub contains the list of available server instances that host implementations of the object.
The stub also contains the load balancing logic for distributing the load among its host servers.
Q.What happens when a failure occurs and the stub cannot connect to a WebLogic Server instance?
Ans:-When the failure occurs, the stub removes the failed server instance from its list. If there are no servers
left in its list, the stubb uses DNS again to find a running server and obtain a current list of running instances.
Also, the stub periodically refreshes its list of available server instances in the cluster; this allows the stub to
take advantage of new servers as they are added to the cluster.
20