Posts

Showing posts from 2010

Script for Bouncing a WebLogic instance

In the last post I was made deeper research on getting the process id of all WebLogic instances with a script. After looking to that script, My asked me 'Why don't you try for a script for bouncing a WebLogic instance?'. I thought that's really good idea, this makes WebLogic Admin life more easier, which is very much need for every WebLogic Admin. Let me get all the clues before putting the logic into the script. The bounce script will take the input as WebLogic instance name. Then the script should do search for the corresponding Java Process id of given WebLogic instance. That Java Process ID can be used for finding: 1. Thread dump 2. Domain directory 3. Shutdown instance (kill the process) Above 1, 3 are commonly used commands but 2nd one required when situation like this, on the same machine if there exists multiple WebLogic domain instances then how to find the WebLogic instance started from? Here, I need to find the origin directory of startManaged...

X11 Forwarding in SSH for Solaris and Linux

You might be wonder what is fun in this blog looking for X11 forwarding on Solaris 5.10!! You might be excited to see the beauty of colorful Oracle Fusion Middleware WebLogic 11g installation window when you executable binaries (wls1033_solaris32.bin), You might wish to see Oracle WebLogic domain configuration Wizard (config.sh), Oracle WebLogic Domain Template builder (config_builder.sh), BEA Smart Update (bsu.sh) windows or your Oracle Database 11g while you work on a remote UNIX machines. After spending few hours on the Internet found many blogs written on their experiences, few document on websites, which illustrated about SSH, X11 forwarding in UNIX. I understand that what I need to do? To achieve my objective X11 Forwarding using SSH window, I must have a X emulating software installed on my desktop. you guys have this on your desktop?? If not install Hummingbird Connectivity (Xming is alternative) My experimenting environment is Solaris 10, Oracle WebLogic, SSH ...

Configuring Plain NodeManger on Solaris

Today morning one of my buddy pinged me from my team, seeking help on an issue he is faceing in his newly  configured WL domain for his learnings. Understanding the Issue My buddy novice WLA is trying to start the WebLogic instance on a remote machine. He is working on Solaris 10 operating environment, WebLogic 9.2. I asked for Java version, He executed the following command: $ java -version I asked for jps command execution the system is refused and said that ' jps is bad cammand'. I understand that  JAVA_HOME is not set for his environment. asked for echo $PATH. It is showing Java Path. Ohh!! what is missing then?? $which java this resulted that JAVA_HOME is NOT set to weblogic installation JDK, it was pointed to JAVA_HOME come with the Solaris installation.  I understand that could be one of the reason of not starting the server instance. Update the .profile file with  JAVA_HOME as required to set JDK residing in W...

Best Practices for WebLogic Environment

Image
Here I am jotting out few interesting Best practices for Oracle WebLogic environments, which I have experienced/encountered hurdles while preparing a WebLogic Domain. To Win this Running race you must overcome these hurdles, the best solutions is remembering all of them now I am sharing with you guys here: 1. Dedicated User and group Oracle WebLogic installation on Solaris machine or Linux or a Windows machine, it is better to have a dedicated user and shared growup where you can install the Middleware components WebLogic, Coherence, WebCenter sites, Content Management etc. provide access to all  so that all other users need not to installing  for each new domain on the same machine. useradd [options] LOGIN Some of important options are: -d home directory -s starting program (shell) -p password -g (primary group assigned to the users) -G (Other groups the user belongs to) -m (Create the user's home directory My experiment: useradd -g wladev -s /bin/bash -p xxxxxx...

WebLogic Port mapping to Process ID

Hey dear WLA most of us come from Development environment to production environments. Hope the scienario thatI am going to discuss here is a common to everyone, who is working on development environment. Sometime or other you might felt I should have a handy script that could takes input as a WebLogic instance port which usually get from the applicaiton URL. The WebLogic port and list all the Process IDs which are associated with it on UNIX(here I got solution for Solaris) environment. Recently I found a Sun blog which is clearly discussed similar issue. I am re-compiling the same with customizing to our WebLogic Listen Port, WebLogic Server runs with a Java generated child Process ID. 'lsof' is the command you can execute and get this solved but most of the times it is a Sun third party downloads, that is not allowed in many Banking, Financial and Insurance Service organizations. And one more reason is small companies doesn't efford for third party tools. Then, Your cho...

Heap dump on a Unix machine

After exploring the Jay/Faisal's blog on 'jmap' java utility usage and Heap dump. It is really great work by Jay/Faisal. I just thought that similar kind of experiment we did long back on UNIX machines. I am glad to sharing that with you guys. Last year, we were struggling to overcome the OutOfMemoryError, which would effect the most of productive hours. In this assignment I need to figure out what process is causing the low memory in the environment is identified by searching a all log files in the machine. Assume that all the WebLogic instance log files are collected into common directory structure, each of them are stored respective instance named folder. Script 1: After identifying the impacted instances, I need to take the heap dump of that particular instance with corresponding process id. #============================================================== # File Name : CheckLogs.sh # Author : Pavan Devarakonda # Purpose : Script for searching all WebLogic in...

Clearing Cache for WebLogic instance

Image
Hey smart WLA,  Here I am with one more interesting story of WebLogic Administration "Clearing Cache". This is most often in development environments, where you need to clear the cache for new releases for Web-tier changes, XML loadings, JDBC connection changes, JMS issues, etc.,. Some of the great developers think like this "I can change minor things directly in the jsp files to test stuff" What is actually WebLogic Cache? Basically all the web-tier related files (.jsp .class, JSPCompiled files etc.,) get stored in ./wlnotdelete/app_yourapplicaiton directory. This is treated as cache whenever there is a restart of a WebLogic instance happen then the WebLogic server will look up for last serviced object status stored in the cache to service for any pending requests. Usually, when your EJB Classes need sessions, JMS object requires persistence, your web-tier may contain static contents then Cache will be used by WebLogic Application Server instance. Cache Cleari...

Copying to multiple remote machines

Here is another interesting story of WLA (of-course mine), When I visited US in 2007 there was lot of restrictions in work places. "Hey its production you know what happen if you touch it??" "Don't open this files", "Don't enter into that folders", it will be dangerous... I know that very well what is missing in the system, where it is required a change but my hands kept criss cross!! Days passed I got opportunity to come again on long term. Now, the whole new System is going shapeup with my hands. The system is awaiting for me since long days. :) All those sparkling colorful ideas running around my mind, got chance to flow onto the system to form various automated scripts, which are having little in size with greater capabilities. Whenever there is a application version release the archive files(.jar, .war, .ear) need to copied to all over the remote machines. In olden days we were using 'sftp' command and its related 'put', 'm...

Monitoring CPU Load Averages with Shell Script

Today I started re-inventing myself, started looking what all I did for me and my team to perform in better ways. Remembered those we used to open UNIX SSH windows to monitor How the CPU load average in each site. While doing this monitoring activity on site1, there might be possible that some other site reach to overload, which leads to uncontrol tendency to work. It was funny, my dear buddy named it as 'Barbar work!!' :) After little R & D on Google/Internet found few suitable solutions. I had chosen 'uptime' command running with remote SSH connection in a loop. Adding more value to this sending a mail on the event of crossing the threshold value. This threshold will be vary depending upon the application and CPU power. Trail and error make you to identify what could be the threshold. Defining these threshold values Venu GopalRao helped a lot. Once script started working he was amazed and appreciated as well. This script can be run forever with a specified ti...

Restricting the access from Apache HTTP Configuration

Image
There is one common problem that most of the Web Admins encounter when configuring the Apache Web Server as proxy plug-in. The Java archive files such as .jar/.war/.ear files or any content of the Server accessing will be shown to everyone when that URL is published. Some situations demands some of the images/pictures display by your site must be restricted access of copying. The best way restrict this files from unauthorized use is by Apache File directive. This File directive can be configured in httpd.conf file in the Apache configuration. By the way my friend Sarangapani already discussed about Apache installation & configuration , So I am not repeating again here. In the same configuration file we can also restrict the access from specific IP address or DomainNames. Explore more about this topic File Directive A detail description about valnerabilities about Apache plugin is given in a separate blog. The link is here click

Java parameters for WebLogic Server

There are many burning issues on going WebLogic based environments due to this Java parameters JAVA_OPTIONS, l USER_MEM_ARGS,  PRE_CLASSPATH,  POST_CLASSPATH.  Heap size in MEM The USER_MEM_ARGS can be defined for WebLogic as follows as minimum requirement : -Xms1024m The minimum size of JVM -Xmx1024m The maximum size of JVM keeping the same as minimum will avoid number of GCs. -XX:NewSize=512m The Young Generation (YG) space size -XX:MaxNewSize=512m The maximum sise for Young Generation space -XX:SurvivorRatio=6 There will be two (from, to) survivor spaces both will equal in space and one will be always empty for swapping which will be used after GC. -Xnoclassgc Perm space  -XX:PermSize=128m The permanant space for static classes they will be loaded only once. -XX:MaxPermSize=128m There could be chance of increase of classes as the application functionality increased widely. Troubleshoot OOM errors In production or Development en...