Posts

Showing posts from 2016

Patch Weblogic with bsu utility

In Oracle Weblogic, we often gets security patches and other patches related to product. As Oracle Weblogic Admins it required to apply patches regularly, in this post will see how to apply patches from bsu utility in command prompt. Preparing to Install Oracle Weblogic Server Patch set  : - Patches can be applied on a per-domain basis or   installation –wide basis, its better to apply the patch     to installation wide. - user the same user   which was used to install the   weblogic to login to the servers.   - Stop all running instances of weblogic on the    domain hosted on the server. Installing the Oracle Weblogic Serer Patch Set : - Down load the required patch set from the oracle support.   -  copy the patchset to    {MW_HOME}/utils/bsu/cache_dir  or any local directory on the server  and make sure its permissions are correct to execute the patch. - set the WLS_Home    ( ...

WebLogic Troubleshooting

Getting error while restarting one of the Weblogic server instance ####<March 1, 2016 6:45:44 PM IST> <Error> <EmbeddedLDAP> <bng1web2prod> <itms> <[ACTIVE] ExecuteThread: '0' for queue: 'weblog ic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1189689344635> <000000> <Error opening the Transaction Log: ./servers/ itms/data/ldap/ldapfiles/EmbeddedLDAP.tran (Permission denied)> ####< March 1, 2016   6:45:44 PM IST> <Error> <EmbeddedLDAP> <bng1web2prod> <itms> <[ACTIVE] ExecuteThread: '0' for queue: 'weblog ic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1189689344637> <000000> <Error Instantiating 'dc=web2prod-Domain': nul l> ####< March 1, 2016   6:45:44 PM IST> <Critical> <EmbeddedLDAP> <bng1web2prod> <itms> <[ACTIVE] ExecuteTh...

SSL Configuration steps for Apache

First make sure that apache installations and SSL changes have done, Below steps to configure SSL certificates: Step 1 : Move to "extra" directory of apache. Ex: cd /APACHE_HOME/conf/extra Step 2 : Generate Private Key on the Server Running Apache + mod_ssl Ex: openssl genrsa -des3 -out  .key 4096 So your result will be :  .key Step 3 : Generate a Certificate Signing Request (CSR) Ex: openssl req -new -key  .key –out  .csr So your result will be :  .csr Step 4: Generate a Self-Signed SSL Certificate Ex: openssl x509 -req -days 365 -in  .csr –signkey  .key -out  .crt So your result will be :  .crt Step 5: Generate a CA file Ex: openssl req -new -x509 -days 365 -key in  .key -out in  .ca So your result will be :  .ca Step 6: Generate a DER file Ex: openssl x509 -in  .crt -out  .der.crt -outform DER So your result will be :  .der.crt Step 7: Removal of Passphrase (Optional if you want to remove passphrase) Ex:...

What is a Thread dump in unix/linux and windows:

A thread dump is a snapshot of all threads currently active in a Java Virtual Machine (JVM), showing their state and stack traces. It's invaluable for diagnosing performance issues, deadlocks, and bottlenecks. It shows the current state (e.g.,  RUNNABLE ,  WAITING ,  BLOCKED , etc.) and the stack trace for each thread. Thread dumps are crucial for diagnosing  performance issues ,  deadlocks ,  thread contention , or  application hangs . 🧵  Why Take a Thread Dump? To analyze CPU spikes or hangs. To identify deadlocks or blocked threads. To investigate thread pool behaviour To troubleshoot memory and performance issues. 📌 How to Take a Thread Dump Using  kill -3  command: Sends a  SIGQUIT  signal to the JVM process. Output goes to the standard output ( stdout ) or log file (e.g.,  catalina.out  for Tomcat). Using Process Explorer  (GUI method): Right-click Java process → Create Dump → Create Thread Dump Using too...

What is Proxy server ?Types of proxy server

Proxy Server: In general words proxy server is nothing but an mediator(ex: bus, if you want to go to your home by using bus you can reach your destination) the same way we are using proxy server in weblogic.  Proxy Server is an intermediary server between your web browser (client) which requests for some information/data and your server (web server/Application server) that process the data. Types of Proxy Server:   They are three different types of proxy servers. They are as follows      1)   Forward Proxy Servers : Forward Proxy Server is a server which forwards the request from the intranet clients (web browser) to the internet servers. These proxy servers are present in the same network of your client.      2)Open Proxy Server: An open proxy is a proxy server which is accessible by any Internet user. Any proxy server that doesn’t restrict its client base to its own set of clients and allows any other client to connect...

WebLogic server Life Cycle:

Starting state: During the starting state that instances ready the domain configuration data from its configuration directory. Whereas the Manager server will get their configuration data from Admin server. It is in this state that the instance the basic services such as the kernal and execute queues, the container service for logging and Node manager service. The server also deploy during this phase. Stand by:   In this state the server Instance will allow you to issue just to administrative requests. You can me the server state either running or shutdown state. Normally the server instance will automatically transition through the stand by state to next stage unless you start the instance with the start in stand by command. Note: All ports are closed in this stat. But you can quickly transition to a running state. Admin mode:  The admin mode permits only Administrative task, deploying applications with those applications being able to only request from user...

What is boot.properties file and how to create

Boot.properties is a file, it containing  weblogic server username and password . If your server is in production mode then only you have to create manually this boot.properties file. If your server is in Development then you no need to create this file because server it self create this file while creating Domain. A boot identity file contains the user credentials for starting and stopping an instance of WebLogic Server. An administration server or managed server can refer to this file for user credentials instead of prompting at the command line to provide them. To Create boot.properties: Go to below location Win :   C:\Oracle\Middleware\user_projects\domains\test_domain\servers\AdminServer\ Linux : Oracle\Middleware\user_projects\domains\test_domain\servers\AdminServer\ 1.First you have to create security folder under AdminServer 2.Create boot.properties file under security folder. 3.Open notepad and write the below two lines username=********** password=*****...

Differences b/w Development and Production Env

SSL: Development Mode: You can use the demonstration digital certificates and the demonstration keystores provided by the WebLogic Server security services. With these certificates, you can design your application to work within environments secured by SSL. Production Mode: You must not use the demonstration digital certificates and the demonstration keystores. If you do so, a warning message is displayed. Deploying applications: Development Mode: WebLogic Server instances can deploy and update applications that reside in the domain_name/autodeploy directory automatically. It is recommended that this method be used only in a single-server development environment. Production Mode: The auto-deployment feature is disabled; so, you must use the WebLogic Server administration console, the weblogic.Deployer tool, or the WebLogic Scripting Tool. Log file rotation: Development Mode: By default, when you start the WebLogic Server instance, the server automatically renames (rot...

Change Heap in SOA

If you want to change default Memory Settings in SOA and Customize them according to your Admin and Managed Servers. Increase Heap size memory in SOA Server follow below steps: Backup for setSOADomainEnv.sh (/user_projects/domain/<soa_domain_name>/bin/setSOADomainEnv.sh Update setSOADomainEnv.sh Find - Below Values in setSOADomainEnv.sh: DEFAULT_MEM_ARGS="-Xms512m -Xmx1024m" PORT_MEM_ARGS="-Xms768m -Xmx1536m" Replace With - Below Custom Values: # line to specify different Xmx and Xms values to soa_server. if [ "${SERVER_NAME}" = "soa_server1" ] ; then DEFAULT_MEM_ARGS="-Xms2048m -Xmx2048m" PORT_MEM_ARGS="-Xms2048m -Xmx2048m" elif [ "${SERVER_NAME}" = "" ] || [ "${SERVER_NAME}" = "AdminServer" ]; then DEFAULT_MEM_ARGS="-Xms512m -Xmx512m" PORT_MEM_ARGS="-Xms512m -Xmx512m" fi 3. Restart Admin and Managed Servers, Check new ...

Change JDK and configuration of new JDK in Weblogic Server

Install the New JDK Steps: Download the JDK: Obtain the desired JDK version (e.g., JRockit) from the official Oracle Technology Network (OTN). Transfer the Installer: Use FTP or another method to transfer the installer to your server. Set Permissions and Install: Make the installer executable chmod 755 jrockit-jdk1.6.0_29-R28.2.2-4.1.0-linux-x64.bin Run the installer: ./jrockit-jdk1.6.0_29-R28.2.2-4.1.0-linux-x64.bin Install the JDK to your desired location,  e.g.,  /u01/Oracle/jrockit-r28.2.2 2. Update WebLogic Configuration to Use the New JDK Steps: Shutdown WebLogic Servers: Ensure all managed servers in the WebLogic domain are stopped. Backup Configuration Files: Navigate to the domain's  bin  directory cd /u01/Oracle/Middleware/user_projects/domains/<domain_name>/bin cp setDomainEnv.sh setDomainEnv.sh.bak Open the file in a text editor. Locate and comment out existing  JAVA_HOME  and  JAVA_VENDOR  settings: Navigate to the WebLogic comm...

Oracle weblogic Patch

Image
A  patch  is a piece of software designed to update a computer program or its supporting data, to fix or improve it. This includes fixing security vulnerabilities and other bugs, with such  patches  usually called bugfixes or bug fixes, and improving the usability or performance. Weblogic patch: For every quarter oracle will release patches in 2015 oracle released 3 patches for weblogic ,find the below Jan - 12UV --- search for more info for this bug in oracle April - YUIS --- search for more info for this bug in oracle July - EJUW --- search for more info for this bug in oracle Applying the patch in the linux environment.For windows environment use .cmd instead of sh. Step :1 Check the weblogic version Go to the below location and execute setEnv /oracle/.../.../wlserver_10.3/server/bin After executing set env check  weblogic version  by using  java weblogic.version Step 2:  Go to the below location and copy patch file ...

Pack and unpack

WLS_HOME  is an environment variable maps to your “wlserver<version>” directory  Dir: opt/middleware/bea10.3/wlserver_10.3/ Execute Following command: $WL_HOME/common/bin dir  pack.sh  –managed=true –domain=<domain name> -template=<domain_name.jar> -template_name=”<description>” pack.sh  –managed=true –domain=mydomain -template=mydomain.jar -template_name=”mydomain template” Now copy the jar file into another machine  Unpacking : command under $WL_HOME/common/bin location unpack.sh –domain=<domain name> -template=<jar file name> unpack.sh –domain=mydomain  -template=mydomain.jar Default  template: pack -domain =path_of_domain -template =path_of_jara_file_to_create  -template_name =”template_name”[-template_author=”author”][-template_desc=”description”] [-managed=true|false][-log=log_file] [-log_priority=log_priority] unpack -template =path_of_jara_file -dom...

JVM Crash and Native OutOfMemory Exception

JVM Crash Investigation JVM Core Dump is the most important File to investigate the JVM Crash. By default the Core Dump will be generated. But Just in case if JVM is not able to generate the Core Dump then there may be the following reasons:  If there is not enough disk space or quota to write the file in your File System.    If JVM is not having to create or write a file in the directory.  If another file exists in the same directory with that is read-only or write-protected. Unix/Linux-specific: Use the limit or ulimit commands to determine if core dumps are disabled.   Example, on Linux, the command “ulimit -c unlimited” enables core dumps to be written, no matter what their size. Core dump sizes can be restricted if disk space limitations are a concern.  It may be possible to get a thread dump before the process exits. HotSpot supports the Java_Option -XX:+ShowMessageBoxOnError; the corresponding JRockit option is -Djrockit.waito...

To Create & Test a Virtual Host

Image
1.  Edit your hosts file and map your domain / DNS name to the server ip address.  Unix - /etc/hosts Window - C:\WINDOWS\system32\drivers\etc\hosts In Window entry should be like below - 127.0.0.1       localhost  lakshmiweblogicadmin.blogspot .com 2. Create a virtual host, Click on Virtual Hosts, New, Enter name for virtual host. 3. Click on name of virtual host and in "Virtual Hosts Names" field enter your domain name like here, lakshmiweblogicadmin.blogspot.com , if you more then one domain name mapped enter each separated by comma 4. Click on target tab and select managed or admin server wherever you want to target, 5 . Deploy your application on virtual host ( select deployment to deploy and target should be virtual host ) 6 . Create a channel Click on managed or admin server on which you you targeted to virtual host, select channels under protocols on right hand side Click on new Enter channel nam...