Weblogic Interview Prep (AutoRecovered)
Weblogic Interview Prep (AutoRecovered)
WebLogic is a J2EE application server developed by oracle for Linux, windows & other platform.
WebLogic supports oracle, DB2,MS SQL & other JDBC compliant databases.
installation steps
copy binary-->install java --> goto java bin run installation command--> java -jar binary name -silent -responseFile .rsp
file path -invPtrLoc .loc file path
copy binary-->install java --> run installation command--> ./binaryname.bin -jreLoc java bin path -silent -
responseFile .rsp file path -invPtrLoc .loc file path
./binaryname.bin -silent -responseFile .rsp file path -invPtrLoc .loc file path
4) cluster setup
first thing we need same OS/same HW configuration/same WebLogic JDK version/ same JDK/same domain
path/same middleware path--> after that
copy binary and JDK --> install JDK --> installation WebLogic on all nodes--> then confirm one server as admin server,
and create domain try to start and stop domain --> after that go to oracle_commomn/common/bin and run pack
command this command create domain jar file--> after that copy this jar file on all remaining node --> after that go to
oracle_commomn/common/bin and run unpack command --> then edit nodemanager.properties --> go to admin
server console crate manage servers try start all manage server and after starting stop all manage servers --> after
that go to cluster create new cluster go to server tab and all manage servers after adding all manage server start all
servers.
Unicast is an option by which a packet can be sent point to point, to a specific member but not to everyone. This
makes it much more like a private conversation between two specific members instead of a group chat or etc.
Multicast, on the other hand, is more like a broadcast UDP option by which every member in the group is notified
with the packet or announcement. The defined range for Multicast addresses are 224.0.0.1 to 239.255.255.255, so
the message that is announced is more like a common one and available for every member.
6) Horizontal and vertical cluster?
Horizontal clustering is when we are configuring the domain across multiple machines, with each machine
having atleast one Managed Server.
Vertical Clustering is when we are configuring the domain in the same machine which is having multiple
Managed Servers.
go to manager server general configuration tab-> advance-> WebLogic plug in option available there --> in drop down
list select yes option and save.
domain home/config/fmwconfig/component/ohs/ohs1-->take backup of mod_wl_ohs.conf atfer that edit this file -->
enter context root, setweblogic handler, IP and Port.
first, we need to create CSR and JKS using keytool command--> after that send CSR and JKS 3kb to vendor DigiCert or
entrust--> vendor provide bundle certificate to us --> from this bundle certificate extract 4 certificate
server/root/inter2/inter1 -->import all 4 certificate into 3kb JKS after that JKS size is 11KB-->copy that file on server --
>take backup of config.xml-->
go to manager server -> Configuration ->keystore tab -> select "custom identity java standard trust"
Custom Identity Keystore: Need to add JKS PATH after that enter password and confirm password.
SSL tab--> Private Key Alias: Need to add --> enter password and confirm password.
general Tab --> SSL Listen Port Enabled --> Restart Server
For view
first we need to create CSR and JKS using keytool command--> form .JKS Extract root.cert, need to import root.cert
into trust.JKS
Both JKS copy on server then go to manager server -> Configuration ->keystore tab -> select "Custom Identity and
Custom Trust"
Identity Keystore and Trust : Need to add JKS PATH after that enter password and confirm password
SSL tab--> Private Key Alias: Need to add --> enter password and confirm password
general Tab --> SSL Listen Port Enabled --> Restart Server
9) opatch ??
once your opatch version upgraded then we cannot degrade it that is the reason we take oracle home backup
/Oracle/middleware/oracle_home/opatch
opatch version
Bundle Patch An iterative, cumulative patch that is issued between patch sets. Bundle patches usually
include only fixes, but some products may include minor enhancements. Examples are the Database
Windows Bundles and SOA Bundle Patches.
Patch Set Updates (PSU) Patch Set Updates are used to patch Oracle WebLogic Server only. Patch Set
Updates are released on a quarterly basis, following the same schedule as the Critical Patch Updates (CPUs).
These come out the closest Tuesday to the 15th of the months of January, April, July and October. Patch Set
Update content is intended to address the top fifty critical bugs affecting the broad customer base.
10) JDK upgradation
bin -->setdominenv.sh
bin-->nmjavahome.sh
2) 12.2.1.4 current running setup just install latest WebLogic version 14.1.1.0 stop old setup --> go to 14.1.1.0
The default JDK for development domain is Sun Hotspot The default JDK for production domain is JRockit
You can use the demo certificates for SSL If you use the demo certificates for SSL a warning is
displayed
Server instances rotate their log files on startup Server instances rotate their log files when it reaches
5MB
Admin Server uses an automatically created Admin Server prompts for username and password
boot.properties during startup during startup
The default maximum capacity for JDBC Datasource is The default maximum capacity for JDBC Datasource is
15 25
11G 12C
Installer Platform specific installers are available From 12.1.2, there is only generic installer
available
JDK JDK 1.7 supported JDK 1.8 and above supported
Patching bsu/smart update to apply patches java-based utility Opatch is introduced
NMConfig Multiple domains in same m/c can share same Domain specific NM is created
NM process
TLS version It support TLS1.0,1.1 TLS 1.2,1.3
14) What are the different types of WebLogic Server JDBC Data Sources?
Generic Data Sources It provides database connectivity through a pool of JDBC connections.
Multi link Data Sources Multi Data Source is an abstraction around group of databases which provides
either load balancing or fail-over
Grid Link Data Sources Grid Link Data Source is a data source which provides connectivity between
WebLogic Server and an Oracle RAC (Real Application Cluster) Database.
Proxy data sources Data sources that provide the ability to switch between databases in a WebLogic Server
Multitenant environment.
Universal Connection Pool (UCP) data sourcesData sources provided as an option for users who wish to use
Oracle Universal Connection Pooling (UCP) to connect to Oracle Databases. UCP provides an alternative
connection pooling technology to Oracle WebLogic Server connection pooling.
17) What is the difference between Local transactions & Global transactions?
f Driver require some extra Component (like ODBC Driver OR Vendor specific
Native Libraries OR Middleware Server), such Type of Driver is called Thick
Driver.
The number of seconds to wait before shrinking a connection pool that has incrementally increased to meet demand.
Default value 900 seconds(15mins)
The number of inactive seconds on a reserved connection before WebLogic Server reclaims the connection and
releases it back into the connection pool. If you set the Inactive Connection Timeout feature to a positive value, the
WebLogic server reclaims the leaked connections. (600 SEC)
WebLogic 7001
WebLogic SSL 7002
Node manager 5556
OHS 7777
OHS SSL Port 4443
OHS Console Port 9999
HTTP Port 80
HTTPS Port 443
Telnet 23
SSH 22
FTP 21
T3 is the protocol used to transport information between WebLogic servers and other types of Java programs.
WebLogic keeps track of every Java virtual machine connected to the application. To carry traffic to the Java virtual
machine, WebLogic creates a single T3 connection.
YES, we can start manage server without admin server in MSI (Manage server Independent) mode.
Environment > Servers > Server_Name > Tuning > Advanced > Managed Server Independence Enabled check box.
https://docs.oracle.com/cd/E21764_01/web.1111/e13715/manage_servers.htm#WLSTG169
1 Configure Node Manager to start servers.
See "General Node Manager Configuration" in the Node Manager Administrator's Guide for Oracle WebLogic Server.
2 Start WLST.
3 Start Node Manager.
Usually, as part of configuring Node Manager, you create a Windows service or a daemon that automatically starts Node Manager when the
host computer starts. See "Running Node Manager as a Service" in the Node Manager Administrator's Guide for Oracle WebLogic Server.
If Node Manager is not already running, you can log on to the host computer and use WLST to start it:
wls:/offline> startNodeManager()
4
For more information about startNodeManager, see "startNodeManager" in WebLogic Scripting Tool Command Reference.
5 Connect WLST to a Node Manager by entering the nmConnect command.
wls:/offline>nmConnect('username','password','nmHost','nmPort',
6 'domainName','domainDir','nmType')
7
For example,
nmConnect('weblogic', 'welcome1', 'localhost', '5556',
8 'mydomain','c:/bea/user_projects/domains/mydomain','SSL')
9 Connecting to Node Manager ...
10 Successfully connected to Node Manager.
11 wls:/nm/mydomain>
12
For detailed information about nmConnect command arguments, see "nmConnect" in WebLogic Scripting Tool Command Reference.
24) if admin server is down then can we access our application URL or application is accessible or not
STUCK
We know that a STUCK thread is a thread which is processing a request for more than maximum time defined
for a thread to complete the request which is default 600 and can be configured from admin console. Based
on different technical circumstances like due to some intermittent issues with network, database,
application server etc a STUCK can be release after some time, but most of the time is certain thread
or threads declared as STUCK then there would be some problem either temporary or permanent which
need some fix.
HOGGER
“I hogging thread is a thread which is taking more than usual time to complete the request and can be
declared as STUCK”.
ACTIVE
Threads that are eligible to process incoming request are classified as ACTIVE threads. When thread demand
goes up, WebLogic will start promoting threads from Standby to Active state which will enable them to
process future client requests
STANDBY
Threads that are waiting to be marked eligible to process incoming requests are classified as STANDBY
Threads. These threads are kept in the Standby pool. Threads that are not needed to handle the present
workload are designated as standby and added to the standby pool. These threads are activated when more
threads are needed. These threads are created and visible from the JVM Thread Dump but not available yet
to process a client request
IDLE
These are the threads which don’t have any work assigned to it are classified as IDLE.
I am sure if you are going to read this post then you must aware about what is hogging thread. Ok, let me define it
again in a single line, “I hogging thread is a thread which is taking more than usual time to complete the request and
can be declared as STUCK”.
As we know a thread declared as STUCK if it runs over 600 secs (default configuration which you can increase or
decrease from admin console).
Now, How WebLogic determines a thread to declare as Hogging? ok, here is the logic which
I had learn from some of the Oracle internal portal note.
1. There is an internal WebLogic polar which runs every 2 secs (by default 2 secs and can be alter)
2. It checks for the number of requests completed in last two minutes
3. Then it check how much times each took to complete
4. Then it takes the average time of all completed request (completed in last 2 sec)
5. Then multiply average time with 7, and the value came consider as “usual time to complete the request”
6. Now weblogiccheck each current executed thread in last 2 secs and compare with above average time, if for
any of the thread it’s above this value then that thread will declare as Hogged thread.
For example –
Only the thing you can change with respect to hogging threads configuration is Polar time
(Stuck Thread Timer Interval parameter) which is 2 secs by default. You can change this polar value to some
different value like 4 secs if you want polar to run in every 4 secs instead of 2 secs.
28) What is the difference between the stage and the non-stage deployments?
Stage deployment can be understood as the process where the Admin gets a copy which is later on
distributed amongst the available instances.
#Domain_home/servers/AdminServer/upload
# Domain_home/servers/ManageServer/stage
Non-Stage deployment ->Deployed file not stored in particular directory & here admin server and manage
server directly access same physical copy ( it is saved in AdminServer)
#Domain_home/servers/AdminServer/upload
External stage mode: it requires some n/w drive as a share drive.
29) In how many ways can we provide credentials to start the WebLogic server?
Command-line:
Via boot.properties file:
Java Option:
30) What are the different ways used to deploy your applications in a WebLogic server?
Following are the ways to deploy your applications into a WebLogic server:
Via Console
Via Auto-deployment
Via CLI (Command Line Interface) - WebLogic.deployer
Via ANT / WLST
31) How do you turn off the auto-deployment feature in the WebLogic server?
Auto deployment mode feature of WebLogic server works for the development mode, where it checks every 3
seconds to see if there are any new applications available or any new changes available for the existing applications
and deploys them. To disable the automatic deployment, these are the available options:
1. Selecting the Production mode checkbox from the Administration Console for the necessary domain.
A WebLogic Server administration domain is the central domain configuration interface which is used to
create & delete the manage server, machine,cluster,datasurce,deployment.
It hosts business application and application component, web services & their associated resources.
Managed server maintain a read-only master copy of domain configuration document while manage server
startup it connect Domain’s administration server to sync its configuration documents.
34)What is the name of the default JVM which is used for a WebLogic server?
The Sun HotSpot JDK is the default JVM that is available for development whereas JRockit is the JVM that is used for
the production of WebLogic servers. Based on the OS that is being used, the choice of Certified JDK / JVM depends.
The process of grouping a certain set of servers to attain high availability and scalability is called Clustering.
Communication within a Cluster happens via a multicast IP by sending periodic messages called Heartbeat messages.
37) How does a server know that another server is UNAVAILABLE in a cluster?
There are two ways by which the WebLogic server makes a note of the participating server nodes’ availability:
1. If a participating server node fails to emit 3 consecutive heartbeat messages, then the other server nodes consider
that this server node is OFFLINE or UNAVAILABLE.
2. If there are any kind of socket failures corresponding to a specific server node, then WebLogic considers that the
server node where these socket failures are reported to be UNAVAILABLE.
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.
39) How can you differentiate between a Server hang issue and a Server crash issue?
A server crash can be understood as a situation where the JAVA process no longer exists. On the other hand, A server
hang issue is when the server doesn’t respond back with proper responses. In such a case, we can collect multiple
sets of dumps from the server and analyze the issue which is causing this lowered performance.
Memory leak
Dedlock
Database query taking a long time to return
Unimaginable load
Following could be the possible reasons for a server crash, though it is not limited to just these scenarios but the
reasons can span much more than these:
1.If it is a driver related issue, reach out to the respective driver teams
2.If it is related to the Native IO issue, kindly disable it and find an appropriate cause.
A server hang issue is relatively different from a server crash, where there could be possibly different sets of reasons
for it to happen - lack of resources, unimaginable load, other parameters that affect the system, etc.
Firstly, we can use the following command to see if you get a good response:
2.Based on the outcome of this command, you can probably check for the cause of the issue.
There can possibly the following possibilities for an OUT OF MEMORY issue:
There is a possibility for collecting the memory data after enabling GC – verbose. If the condition has aroused
because of HTTP session, then it will be automatically solved when the session gets time out. You should also
verify the code associated with the handling of jdbc connectivity. You should also optimize the size of the
heap by considering the load.
you may see the following error in your application server log when running applications on WebLogic with
the Sun JVM: java.lang.OutOfMemoryError: PermGen space.
Solution: To work around this issue, modify the setDomainEnv script to increase the minimum memory (-
Xms), maximum memory (-Xmx), and permanent generation (-XX:PermSize) values of
the USER_MEM_ARGS parameter.
Sun's implementation of the JVM is called the HotSpot and is also shipped in the JDK, JRE from Sun / Oracle. BEA
JRockit JVM is a custom implementation from BEA for reliability, performance for the server-side applications. For this
to be achieved, BEA JRockit JVM uses hot spot detection, code generation, advanced garbage collection, tight OS
integration.
If it is a multiprocessor machine, then you’ll have to use a parallel collector (enabled explicitly with -XX:
+UseParallelGC).
If you choose to keep shorter GC pauses at the cost of using additional CPU time, then you’ll have to use a concurrent
collector (enabled explicitly with the following -XX:+UseConcMarkSweepGC).
The performance of a WebLogic server can be done at 4 different levels, which are as follows:
JVM Tuning:
Monitoring GC
Tuning GC strategy
OS Tuning:
Application Tuning:
Pre-compile of JSPs
EJB pool size cache
A WebLogic cache server (also known as a Reverse Proxy) helps speed up the Web traffic.
The basic understanding is that the Web traffic can be graphic intensive and there is a definite need for caching the
repetitive pages.
48) Why do we need to clear the WebLogic Cache? How do you achieve it?
The need to clear the WebLogic Cache comes in when you go for a newer version deployment. That is when we need
to clear the WebLogic Cache.
Removing these Cache folders manually after the WebLogic server is brought down gracefully.
Use the stage mode to no_stage deployment, by doing this the Cache gets cleared automatically whenever an
application is undeployed.
To enable HTTP tunnelling in the WebLogic Server, the following has to be done:
Click on the Protocols tab -> General -> click to check the checkbox Enable tunnelling.
WebLogic makes use of the T3 protocols for both internal and external communications.
T3 protocol is used in WebLogic's own implementation of RMI (Remote method invocation). On the other hand, HTTP
protocol is used for all communications between the browser and a Web server as per the W3C standards.
51)What is your understanding of the various error codes within the WebLogic server?
The error codes within WebLogic Server range from BEA-000001 to BEA-2163006. The types of errors that these
mentions are classified as below:
INTERNAL_ERROR
ERROR
NOTIFICATION
WARNING
Thread dump is a texted dump of all active threads & monitors of java apps running in virtual machine.
1 )From Console Go to the Server Instance -> Monitoring -> Threads -> Dump Threads Stack.
2) Kill -3 PID
3) Analysis tool samurai, Java TDA, eclips, therd dump viewer
It generate heap.bin file using MAT tool (Memory analysis tool ) can analysis heap.bin file
Any memory related issue or application level issue or code issue can find out.
BSU OPACTH
It supports to 11G It supports to 12C and 14C
--install/remove/report/version Apply/napply/rollback/nrollback/lsinv/lspatches
This is located in MW_Home/utils/bsu.cmd This is located in MW_home/opatch.cmd
Before applying new Patch We need to remove old It override new patch to old patch
patch manually
57) Life cycle of thread
New
Active
Blocked/waiting
Timed waiting
Terminated
SHUTDOWN State
In the SHUTDOWN state, a WebLogic Server instance is configured but inactive.
STARTING State
During the STARTING state, a WebLogic Server instance transitions from SHUTDOWN to STANDBY, as a result of a
Start, Start in Admin, or Start in Standby command.
In the STARTING state, a server instance cannot accept any client or administrative requests.
STANDBY State
A server instance in STANDBY does not process any request—its regular Listen Port is closed. The Administration Port
is open, and accepts life cycle commands that transition the server instance to either the RUNNING or
the SHUTDOWN state. Other Administration requests are not accepted.
ADMIN State
In the ADMIN state, WebLogic Server is up and running, but available only for administration operations, allowing
you to perform server and application-level administration tasks. When a server instance is in the ADMIN state:
RESUMING State
A server instance transitions to the RESUMING state when you issue the Resume command. A server instance
transitions through the RESUMING state when you issue the Start command.
RUNNING State
In the RUNNING state, WebLogic Server is fully functional, offers its services to clients, and can operate as a full
member of a cluster.
SUSPENDING State
A server instance transitions to the SUSPENDING state when you issue the Suspend command. A server instance
transitions through the SUSPENDING state when you issue a Shutdown command.
FORCE_SUSPENDING State
A server instance transitions through the FORCE_SUSPENDING state when you issue the Force Suspend or Force
Shutdown command.
SHUTTING_DOWN State
A server instance transitions to the SHUTTING_DOWN state when you issue a Shutdown or Force Shutdown
command.
FAILED State
A FAILED server instance cannot satisfy administrative or client requests.
When a server instance enters the FAILED state, it attempts to return to a non-failed state. If it failed prior to reaching
the ADMIN state, the server instance shuts itself down with an exit code that is less than zero. For information about
server exit code
DB Server check
o Check for hung sessions
o Check for long running queries
o Check for CPU usage – If beyond a certain threshold need to take an action
o Stale Stats
53) JMS
What is web.xml?
Web.xml is an XML document that finds its applicability in the listing out of J2EE components and primarily
used for application purposes. It also helps in the configuration of applications in J2EE module format.
-Djava.io.tmpdir=<temp-dir-location>:
http://download.oracle.com/docs/cd/E12839_01/doc.1111/e14142/silent.htm
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/oem13c/oracle/agent13c/agent_inst/bin ./emctl status agent ./emctl start agent ./emctl stop agen
Used to fetch the ibm product details licence validity also fetch server cpu core ram all the things
-bigfix---agent need to run then it will generate the report on ILMT server.
ILMT VERSION –9.2.28
BIGFIX-10.0.7.54
Port defa--9081
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apache tomcat:
./apchtcl –k start
./apch –k stop
./apactcl –t -v
Extra—ssl
Mod_wl_
Error.log/acces.log
Start---starutp.sh
Stop—shutdow,sh
Tomcat: 9.0.73//10.0.17
Start stop
Catlina.out—log
Server.xml –port/ssl
Catlins.sh----xmx –xms
setenv
+++++++++++++++++++++++++++++++++++++++++++++++++
Was---8.5.24/---
His---9.5.5.14/15--
Nodeagent—nodema
Mange server-dmgr
Pp Was--./startServer.sh
./starNode.sh
Dmgbin------./startManger.sh
logs- system.out
statrt server
**********************************************
error.log
access.log
error code
14c:
Runtime Improvements
Oracle WebLogic Server 14c (14.1.1.0.0) builds on support from prior WebLogic Server versions to
improve the reliability, availability, scalability, and performance of WebLogic Server applications
with regard to the use of clustered environments, Oracle database features, and multi data center
architectures.
WebLogic Server supports TLS v1.3 with JDK 11, and JDK 8 Update 261 (JDK 8u261) or later
In Oracle WebLogic Server 14c (14.1.1.0.0), the default host name verifier has changed from the BEA host
name verifier to a wildcard host name verifier
PKCS12 is an extensible, standard, and widely-supported format for storing cryptographic keys. In JDK 11,
the JDK default keystore type has changed from JKS to PKCS12
Oracle WebLogic Server 14c (14.1.1.0.0) provides options to automatically create WebLogic cluster database
leasing tables
https://middlewareadmin-pavan.blogspot.com/2013/06/weblogic-material.html?utm_source=BP_recent