rh banner

Sunday, 4 January 2015

Weblogic Administration

Weblogic Administration

What is the default JVM used for Weblogic?

Sun Hotspot JDK default for Development installation, JRockit is for Production mode for WebLogic 11g and 12c. Operating environment also factor to select the Certified JDK JVM. If you want to change you need to specify it.

Explain deployment descriptors?

Deployment descriptors are associated with almost all the modules as well as applications. The deployment descriptors can be seen in the form of XML documents and they are capable of describing the contents that are part of directory or the jar file. J2EE specifications usually define the standard as well as the deployment descriptors which are portable for J2EE applications and modules.

How to make a managed server?

Backup the configuration by rename config.xml with config.xml_date
Configure the changes in the  startManagedWebLogic.sh /cmd  with weblogic home and java home and give the admin severs URL updated
Go to weblogic admins console and add a managed server and give the IP and port of the managed server. all the changes confirmed then start the server using startManagedWebLogic.sh script present in the domain bin.

How to configure JMS?

JMS (Java Message Service) is a standard API for accessing enterprise messaging systems. Specifically, WebLogic JMS:
Enables Java applications sharing a messaging system to exchange messages.
Simplifies application development by providing a standard interface for creating, sending, and receiving messages.
Using the Administration Console, you define configuration attributes to:
1. Create JMS servers and target a WebLogic Server instance or a Migratable Target where the JMS server will be deployed.
2. Create and/or customize values for JMS servers, connection factories, destinations (queues and topics), JMS templates, destination sort order (using destination keys), persistent stores (file or JDBC), paging stores, session pools, and connection consumers.
3. Define message and/or bytes thresholds and quotas, as well as a maximum allowable message size on your JMS servers, destinations, and templates.
Enable any desired WebLogic JMS features, such as:
Server clustering using multiple connection factories.
      High availability and load balancing for destinations across a cluster by using distributed destinations.
      Persistent messages and durable subscribers.
      Paging out message bodies during peak load periods to free up memory.
      Controlling message flow during peak load periods, including blocking message producers.
      Establishing a message expiration policy to ensure that expired messages are cleaned up immediately.
      Preventing message quota errors by temporarily blocking message producers from sending messages to a destination when it exceeds its specified maximum message quota.
      Concurrent message processing via session pools.

What are the Admin Default ports?

The non-SSL listen port for the Administration Server's default network configuration is 7001 by default.
The SSL listen port for the Administration Server's default network configuration is 7002 by default.
WebLogic Admin servers and Managed servers could communicate with Admin port which is separate network channel. So that other communications can be run on different networks.

What are Weblogic clusters?

A WebLogic Server cluster consists of multiple WebLogic Server server instances running simultaneously and working together to provide increased scalability and reliability. A cluster appears to clients to be a single WebLogic Server instance. The server instances that constitute a cluster can run on the same machine, or be located on different machines. You can increase a cluster's capacity by adding additional server instances to the cluster on an existing machine, or you can add machines to the cluster to host the incremental server instances. Each server instance in a cluster must run the same version of WebLogic Server.

What happens when a failure occurs and the stub cannot connect to a WebLogic Server instance?
When the failure occurs, the stub removes the failed server instance from its list. If there are no servers left in its list, the stub 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.

How do I restrict access to servlets and JSPs?

The Java Servlet API Specification v2.2 allows you to declaratively restrict access to specific Servlets and JSPs using the Web Application Deployment descriptor. Section 13.3.2 of the specification has an example deployment descriptor that uses declarative security. For more information, see Programming WebLogic HTTP Servlets.

What is config.xml ?

config.xml is the central configuration repository for a domain. every resource you have configured from admin console or by command line or by any other tool registered under this file. WLS 9.x onwards, this file contain references to other xml configuration files also those are under your domain/config folder ( further sub folder under it for respective resources ) since wls 9.x onwards concept of modules are introduced for sub resources like data source, jms etc otherwise prior to 9.x ( 8.x or older ) every configuration was stored under this single config.xml file.  

How do you troubleshoot a crash?

JVM crash generates a hs_err_pid file. We need to look into the stack trace of the hs_err_pid file .
If the thread is from a native io, we need to disable native io.
if the stack trace is from the driver, we need to get in touch with the drive team.
Quite possibly its a problem with driver. Changing the type of driver can be a workaround.
If the thread shows it coming from an optimzed code, we can turn of optimization.
If the stack is from native calls of application, its a bug with the application and it has to b modified.

What can be the various reasons for a server crash?

a) Native IO
b) SSL Native Libraries
c) JVM
d) Supported Configuration
e) JDBC Driver issue

How do you differentiate between a server hang and server crash issue?

When a Server crahes, the JAVA process no longer exists. When the Server is hung, it stops responding.
We can use the weblogic.ADMIN utilty to ping the server. In case of a hang situation we can take multiple thread dumps and analyze the cause of hang.

How to configure a DB connection pool?

Choose the DB type (Oracle, Sybase, Mysql, etc...).
Then choose the driver type for the DB.
Give the connection pool name.
Give the DB Service ID, schema name and password.
Then it will ask for testing the connection pool/DataSource.
After successful connection, it will ask you to create and deploy the connection pool target to server or cluster. After creating new connection pool always point the jdbcstore to the connection pool created. This is required because A JMS JDBC store will be used for persistent messaging.
After each JDBC connection, we have to restart the server if there is startup classes dependancy exists otherwise no restart required in WebLogic 9.x and higher versions.

How do I increase WebLogic Server memory?

Increase the allocation of Java heap memory for WebLogic Server. (Set the minimum and the maximum to the same size.) Start WebLogic Server with the -ms32m option to increase the allocation, as in this example:
$ java … -ms32m -mx32m …
This allocates 32 megabytes of Java heap memory to WebLogic Server, which improves performance and allows WebLogic Server to handle more simultaneous connections. You can increase this value if necessary.

Can I start a Managed Server if the Administration Server is unavailable?

By default, if a Managed Server is unable to connect to the specified Administration Server during startup, it can retrieve its configuration by reading a configuration file and other files directly. You cannot change the server’s configuration until the Administration Server is available. A Managed Server that starts in this way is running in Maindex index managed Server Independence mode.

How are notifications made when a server is added to a cluster?

The WebLogic Server cluster broadcasts the availability of a new server instance each time a new instance joins the cluster. Cluster-aware stubs also periodically update their list of available server instances.

What are the various causes for OUT OF MEMORY?

a) Insufficient heap size, not able to match the extra load.
b) Objects licing too long, like HTTP Sessions.
c) Memory leak in application code.
d) Full GC not happening due to JVM Bug.

How to troubleshoot and overcome such issues?

Gather memory data by enabling GC verbose.
If its due to Http Session, timing out http session after certain interval might help.
Look into the code for jdbc connection handling.
Optimizing the heap size according to the load.

What is HTTP tunneling? How can we configure it on Weblogic?

HTTP tunneling provides a way to simulate a stateful socket connection between WebLogic Server and a Java client when your only option is to use the HTTP protocol. It is generally used to tunnel through an HTTP port in a security firewall. HTTP is a stateless protocol, but WebLogic Server provides tunneling functionality to make the connection appear to be a regular T3Connection.
Steps to configure Http tunneling.
Login into the Admin Console, click on the server on which you want to enable he Http Tunneling feature
Click on the Protocols tab ? General ? check the “Enable Tunneling” check box.

How clients handle the DNS – requests to the failed servers?

Bandwidth gets wasted in the case of continues DNS requests to that of unavailable machine at the time of server failure. This problem usually occurs during the time of startup associated with the application that of client side. The servers that are unavailable are removed by searching DNS entries provided by WebLogic server. This removal prevents the clients from accessing failed servers. A third party load – balancers are made used for avoiding the unnecessary DNS requests. Some of the third party load – balancers are BigIP, resonate, local director and Alteon. The main function of these third party loads – balancers is to mask multiple addresses of DNS in to a single one.

When can high usage of CPU occur?

This is the condition that usually occurs when a single thread or process makes use of a larger portion of the CPU in an unexpected manner.

How can the issue associated with high CPU usage be solved?

In windows platform the issue of CPU high usage can easily be solved by making use of pslist and also with the process explorer to observe the function performed by the thread or the process.

No comments:

Post a Comment