Posts

Showing posts from February 21, 2016

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...

Virtual Host

Virtual hosting allows you to define host names that servers or clusters respond to. When you use virtual hosting you use DNS to specify one or more host names that map to the IP address of a WebLogic Server instance or cluster, and you specify which Web Applications are served by the virtual host. When used in a cluster, load balancing allows the most efficient use of your hardware, even if one of the DNS host names processes more requests than the others. For example :- you can specify that a Web Application called books responds to requests for the virtual host name www.books.com, and that these requests are targeted to WebLogic Servers A,B and C, while a Web Application called cars responds to the virtual host namewww.autos.com and these requests are targeted to WebLogic Servers D and E.

WLST ( Weblogic Scripting Tool )

Go to your_domain/bin and run below command C:\Oracle\Middleware\user_projects\domains\base_domain\bin>java weblogic.WLST What if you are getting below error just after invoking WLST Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/WLST Caused by: java.lang.ClassNotFoundException: weblogic.WLST Run C:\Oracle\Middleware\user_projects\domains\base_domain\bin>setDomainEnv.cmd Now you would able to connect with java weblogic.WLST command Commands - Node Manager Commands for WLST Configuration  Command Enables you to… Use with WLST... nm Determine whether WLST is connected to Node Manager. Online nmConnect Connect WLST to Node Manager to establish a session. Online or Offline nmDisconnect Disconnect WLST from a Node Manager session. Online or Offline nmEnroll Enables the Node Manager on the current computer to manage servers in a specified WebLogic domain. Online nmGenBootStartupProps Generates the Node Manager property files,...

COMPARISON BETWEEN CLUSTER MULTICAST MESSAGING AND UNICAST MESSAGING MODE

When servers are in a cluster, these member servers communicate with each other by sending heartbeats and indicating that they are alive. For this communication between the servers, either unicast or multicast messaging is used. This is chosen from the admin console in  Cluster -> Configuration -> Messaging -> Messaging Mode. To use multicast messaging, hardware configuration and support for multicast packets is required. Unicast does not have this requirement, which is why using unicast in latest versions is recommended. When multicast messaging is used, it is a one-to-many communication, every server sends the notification/heartbeat/multicast packet to each other. This causes a heavy load on the application’s multicast buffer, so if the buffer is full, new multicast messages cannot be written to the buffer and the application is not notified when messages are dropped. So there is a possibility that the server instances miss the messages. This might lead in the clus...

Configure, Start & Stop Node Manager : Step by Step

Image
To configure Node Manager - Log in to weblogic Admin Console Click on Environments -> Machines tab on left hand side Click on new tab on right hand side Enter name of machine and select Machine OS as unix if you are on unix machine otherwise default, click ok Noe click on created machine Select type plain, enter listen address and port  To check status :- Start node manager, click on  machine name, click on Monitoring -> Node Manager Status click on node manager tab, Status should be Reachable. How to start Node Manager ? $WL_HOME\server\bin\startNodeManager.sh  (startNodeManager.cmd on Windows) $WL_HOME\server\bin  called NM_HOME, For Example - D:\Oracle\Middleware\wlserver_10.3\server\bin To Stop Node Manager  In Unix/Linux, kill the process -  kill -9 `ps -ef | grep -i nodemanager.javahome | grep -v grep | awk {'print $2'} | head -1` On window machine, close the window on which Node Manager started. ...

Horizontal Clustering for multiple physical machines

Cluster across multiple physical machines Horizontal clustering involves running multiple Java application servers that are run on two or more separate physical machines. Like shown below where all the managed servers are in a cluster - Machine-1 Admin Server MS-1 MS-2 Machine-2 MS-3 MS-4 How to do Horizontal Clustering ? Install weblogic server on both machines with same installation directories. Create domain on primary machine where you want your Admin server and copy domain to second machine. Step by Step - Install weblogic server on both machines with same installation directories.  Start domain wizard on primary & select option "create a new weblogic domain". Select default first option Enter a name for your domain Enter Admin Server credentials, username & password Select   your mode ( development or production ) and jdk . you want to use Select below two options Admin Server Name, listen address, port & enable ssl if  required Add t he num...

MSI mode in weblogic

When a Managed Server starts, it tries to contact the Administration Server to retrieve its configuration information. If a Managed Server cannot connect to the Administration Server during startup, it can retrieve its configuration by reading configuration and security files directly. A Managed Server that starts in this way is running in Managed Server Independence (MSI) mode. By default, MSI mode is enabled. In Managed Server Independence mode, a Managed Server looks in its root directory for the following files:       msi-config.xml—a replica of the domain’s config.xml       SerializedSystemIni.dat       boot.properties—an optional file that contains an encrypted version of your username configuration files for managed server in MSI mode If you enable replication of configuration data and if you have started the Managed Server at least once while the Administration Server was running, msi-config.xml and SerializedSystemIni.dat wil...

Deployment

Steps for java command line deployment 1)set the class path to execute java commands - setDomainEnvcmd 2)execute java command for deployment – java weblogicDeployer Java weblogicDeployer  –adminurl  t3://localhost:7001   –username  weblogic  –password  weblogic       –name  benefits  –source  path\benefitswar  –targets ms1,ms2  –deploy Modes of deployment: Staging mode:  The admin server copies the deployment unit files to the staging directories of target servers and they are deployed using the local copy This mode is useful when deploying  small or moderate size applications This is default staging mode for managed servers  No stage mode:    The deployment units are deployed using the same physical copy  which must accessible by the admin server and target servers This mode is useful when deploying large  applications to multiple targets This is default staging mode fo...

VI EDITOR COMMANDS

Vi editor is used to create new files. (or) To modify already existing files. It is classified into 3 models 1)command mode. 2)Input (or) Insert mode. 3)Ex command mode. The default mode is command mode. How to shift command mode to Insert mode: 1)A :: It places at end of the current line. 2)a :: It places at right of the cussor position. 3)I :: It places at begining of the cussor line. 4)i :: It places at left of the cussor position. 5)O ::Insert new line above this the cussor position. 6)o :: Insert new line bellow this the cussor position. 7)esc ::Is the key to shift from insert mode to command mode. 8): ::Is the command to shift from command mode to  Ex command mode. Command mode commands: w(mw) ::next word starting e(ne)::word ending b(nb)::word beginning $ ::places cussor at end of the current line. ^ :: places cussor at begining of the current line. # :: places cussor at begining of the page. M :: places cussor at middle of the page. L :: places cus...

Ant Script deployment in weblogic 10.3.6(11g)?

Step 1:Create build.xml file <project name="testapp" default="deploy"> <property name="wls.username" value="weblogic"/> <property name="wls.password" value="weblogic"/> <property name="wls.hostname" value="localhost"/> <property name="wls.port" value="7001"/> <property name="admin.server.name" value="AdminServer"/> <property name="deploy.targets" value="ms1,ms2"/> <property name="deploy.name1" value="jsf"/> <property name="deploy.name2" value="jstl"/> <property name="deploy.name3" value="bstr"/> <property name="deploy.name4" value="medrec"/> <property name="deploy.name5" value="physician"/> <property name="deploy.source.jsf" value="C:\bea\wlserve...