Wednesday, March 30, 2011

Starting Up With JBOSS..!! - FLASH COURSE

Hello Guys,

Its been very long (more than 2 year, I have touched warmth of JBoss feelings, today just for sake of my friend as I promised him to try something new in JBoss Application Server, I had to remember some nice moments with JBoss, I never thought that I would be working on this App Server so soon when I am living WebLogic World.. :)

So here in this post I would be just trying to bring new minds to get started with JBoss Application Server, as of less time constraint I would be just carrying out the steps to setup the JBoss Application Server (Simplest One..!!) and Deploy a Simple war file and test the application, this setup will be so simple and worth of trying.

So As a first step we need to download the JBoss Installation file, you will get this at : http://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.1.0.GA/ for 5.1.0 GA (General Availability)

Next Step is to Unzip and Place it in your favorite application server installation directory.
Note : Here we no need to install the JBoss Application Server, as this Application Server is distributed under GPL (Open Source Software Foundation), we get the Source Code version of the Application to get our hands on, it majorly contains the jar files and the xml configuration files, which drives the JBoss Application Server its way.

After copying just navigate to the D:\jboss-5.0.1.GA\bin through command prompt.

And execute : run.bat. and watch the window (Desktop Window ;))

You will see something as I tried to start the server :

D:\jboss-5.0.1.GA\bin>run.bat
===============================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: D:\jboss-5.0.1.GA

  JAVA: C:\Program Files\Java\jre1.6.0_17\bin\java

  JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

  CLASSPATH: ;D:\jboss-5.0.1.GA\bin\run.jar

===============================================================================

05:18:47,437 INFO  [ServerImpl] Starting JBoss (Microcontainer)...
05:18:47,453 INFO  [ServerImpl] Release ID: JBoss [Morpheus] 5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902231221)
05:18:47,453 INFO  [ServerImpl] Bootstrap URL: null
05:18:47,453 INFO  [ServerImpl] Home Dir: D:\jboss-5.0.1.GA
05:18:47,453 INFO  [ServerImpl] Home URL: file:/D:/jboss-5.0.1.GA/
05:18:47,453 INFO  [ServerImpl] Library URL: file:/D:/jboss-5.0.1.GA/lib/
05:18:47,468 INFO  [ServerImpl] Patch URL: null
05:18:47,468 INFO  [ServerImpl] Common Base URL: file:/D:/jboss-5.0.1.GA/common/
05:18:47,468 INFO  [ServerImpl] Common Library URL: file:/D:/jboss-5.0.1.GA/common/lib/
05:18:47,468 INFO  [ServerImpl] Server Name: default
05:18:47,484 INFO  [ServerImpl] Server Base Dir: D:\jboss-5.0.1.GA\server
05:18:47,484 INFO  [ServerImpl] Server Base URL: file:/D:/jboss-5.0.1.GA/server/
05:18:47,484 INFO  [ServerImpl] Server Config URL: file:/D:/jboss-5.0.1.GA/server/default/conf/
05:18:47,484 INFO  [ServerImpl] Server Home Dir: D:\jboss-5.0.1.GA\server\default
05:18:47,500 INFO  [ServerImpl] Server Home URL: file:/D:/jboss-5.0.1.GA/server/default/
05:18:47,500 INFO  [ServerImpl] Server Data Dir: D:\jboss-5.0.1.GA\server\default\data
05:18:47,500 INFO  [ServerImpl] Server Library URL: file:/D:/jboss-5.0.1.GA/server/default/lib/
05:18:47,500 INFO  [ServerImpl] Server Log Dir: D:\jboss-5.0.1.GA\server\default\log
05:18:47,515 INFO  [ServerImpl] Server Native Dir: D:\jboss-5.0.1.GA\server\default\tmp\native
05:18:47,515 INFO  [ServerImpl] Server Temp Dir: D:\jboss-5.0.1.GA\server\default\tmp
05:18:47,515 INFO  [ServerImpl] Server Temp Deploy Dir: D:\jboss-5.0.1.GA\server\default\tmp\deploy
05:18:48,812 INFO  [ServerImpl] Starting Microcontainer, bootstrapURL=file:/D:/jboss-5.0.1.GA/server/default/conf/bootstrap.xml
05:18:49,687 INFO  [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.CombinedVFSCache]
05:18:49,687 INFO  [VFSCacheFactory] Using VFSCache [CombinedVFSCache[real-cache: null]]
05:18:50,109 INFO  [CopyMechanism] VFS temp dir: D:\jboss-5.0.1.GA\server\default\tmp
05:18:50,109 INFO  [ZipEntryContext] VFS force nested jars copy-mode is enabled.
05:18:51,484 INFO  [ServerInfo] Java version: 1.6.0_17,Sun Microsystems Inc.
05:18:51,500 INFO  [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
05:18:51,500 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Client VM 14.3-b01,Sun Microsystems Inc.
05:18:51,500 INFO  [ServerInfo] OS-System: Windows XP 5.1,x86
05:18:51,578 INFO  [JMXKernel] Legacy JMX core initialized
05:18:53,375 INFO  [ProfileServiceImpl] Loading profile: default from: org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@bd5df(root=D:\jboss-5.0.1.GA\server, key=org.j
boss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
05:18:53,390 INFO  [ProfileImpl] Using repository:org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@bd5df(root=D:\jboss-5.0.1.GA\server, key=org.jboss.profileservice.s
pi.ProfileKey@143b82c3[domain=default,server=default,name=default])
05:18:53,390 INFO  [ProfileServiceImpl] Loaded profile: ProfileImpl@6e4ba6{key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default]}
05:18:55,718 INFO  [WebService] Using RMI server codebase: http://127.0.0.1:8083/
05:19:02,656 INFO  [NativeServerConfig] JBoss Web Services - Stack Native Core
05:19:02,671 INFO  [NativeServerConfig] 3.0.5.GA
05:19:12,046 INFO  [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:1090/jmxconnector
05:19:12,281 INFO  [MailService] Mail Service bound to java:/Mail
05:19:14,750 WARN  [JBossASSecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which sucks messages from one node to another has not had its
password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this.
05:19:14,796 WARN  [AnnotationCreator] No ClassLoader provided, using TCCL: org.jboss.managed.api.annotation.ManagementComponent
05:19:15,000 INFO  [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
05:19:15,000 INFO  [TransactionManagerService] Setting up property manager MBean and JMX layer
05:19:15,296 INFO  [TransactionManagerService] Initializing recovery manager
05:19:15,500 INFO  [TransactionManagerService] Recovery manager configured
05:19:15,500 INFO  [TransactionManagerService] Binding TransactionManager JNDI Reference
05:19:15,546 INFO  [TransactionManagerService] Starting transaction recovery manager
05:19:16,312 INFO  [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
05:19:16,312 INFO  [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
05:19:16,312 INFO  [StandardService] Starting service jboss.web
05:19:16,312 INFO  [StandardEngine] Starting Servlet Engine: JBoss Web/2.1.2.GA
05:19:16,390 INFO  [Catalina] Server startup in 189 ms
05:19:16,406 INFO  [TomcatDeployment] deploy, ctxPath=/invoker
05:19:17,843 INFO  [TomcatDeployment] deploy, ctxPath=/jbossws
05:19:17,906 INFO  [TomcatDeployment] deploy, ctxPath=/web-console
05:19:18,546 INFO  [RARDeployment] Required license terms exist, view vfszip:/D:/jboss-5.0.1.GA/server/default/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
05:19:18,578 INFO  [RARDeployment] Required license terms exist, view vfszip:/D:/jboss-5.0.1.GA/server/default/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml
05:19:18,593 INFO  [RARDeployment] Required license terms exist, view vfszip:/D:/jboss-5.0.1.GA/server/default/deploy/jms-ra.rar/META-INF/ra.xml
05:19:18,609 INFO  [RARDeployment] Required license terms exist, view vfszip:/D:/jboss-5.0.1.GA/server/default/deploy/mail-ra.rar/META-INF/ra.xml
05:19:18,640 INFO  [RARDeployment] Required license terms exist, view vfszip:/D:/jboss-5.0.1.GA/server/default/deploy/quartz-ra.rar/META-INF/ra.xml
05:19:18,843 INFO  [SimpleThreadPool] Job execution threads will use class loader of thread: main
05:19:18,859 INFO  [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
05:19:18,875 INFO  [RAMJobStore] RAMJobStore initialized.
05:19:18,875 INFO  [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
05:19:18,875 INFO  [StdSchedulerFactory] Quartz scheduler version: 1.5.2
05:19:18,875 INFO  [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
05:19:20,015 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
05:19:20,515 INFO  [ServerPeer] JBoss Messaging 1.4.1.GA server [0] started
05:19:20,656 INFO  [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
05:19:20,656 INFO  [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@c5d01d started
05:19:20,671 INFO  [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
05:19:20,671 INFO  [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@da1994 started
05:19:20,671 WARN  [ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non c
lustered. So connection factory will *not* support failover
05:19:20,671 WARN  [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is
non clustered. So connection factory will *not* support load balancing
05:19:20,671 INFO  [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
05:19:20,671 INFO  [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@8a5d2 started
05:19:20,734 INFO  [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
05:19:20,734 INFO  [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
05:19:20,859 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
05:19:20,890 INFO  [TomcatDeployment] deploy, ctxPath=/
05:19:20,953 INFO  [TomcatDeployment] deploy, ctxPath=/jmx-console
05:19:21,015 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
05:19:21,031 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
05:19:21,031 INFO  [ServerImpl] JBoss (Microcontainer) [5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902231221)] Started in 33s:516ms

So the server started in 33s and 516ms : So Accurate..!!

This all for command prompt screen : Now Jump in to the Console with following URL

http://localhost:8080/   and check what it says

You will see the various links for other consoles on this page for WEB-CONSOLE and JMX CONSOLE 
However you can directly open the web-console and jmx-console as below
Web Console : http://localhost:8080/web-console/ - You will see more of configuration information here

JMX Console : http://localhost:8080/jmx-console/ - JMX Operations and Configuration Operations are done here.














Now the server is started, try deploying a sample war file over the server :

As an example I am deploying a war file called Calendar.war in server, for Deploying the sequences of steps will be as below.

STEP : Copy the war file to D:\jboss-5.0.1.GA\server\default\deploy

Immediately you will see a log at standard out as 05:55:29,921 INFO  [TomcatDeployment] deploy, ctxPath=/Calendar

Try accessing the war file with context path given  as : http://localhost:8080/Calendar/

Now you are all set..!! you have setup JBoss Application Server and Deployed a war file

Guys, Please let me know if you have any doubt over this, and let me know if I have missed any of the steps.

Please comment.
Cheers,
Shailesh Dyade

Tuesday, March 29, 2011

Good Start for WebSphere Application Server

Guys here is the link for WebSphere Application Server 6.1 Administration/ Configuration Guide. - Red Book

WebSphere Application Server Configuration And Management Guide - 6.1

Good for Good Start. ;)

Thursday, January 6, 2011

One Fine Day WebLogic Wanted to Talk Through Apache WebServer.. :)

Hi There,

Today I have something interesting which is been worked out from last few days, as nowadays pulling time for blogging is getting difficult and so posts from me are reduced in number.

However I tried to pull some nice moments out of busy schedule to give you a good Tutorial on how to configure the Apache Web Server with WebLogic Server, though it looks really simple in this post but Apache WebServer configuration at Ubuntu has eaten my ample time to notice.

Well Here we start :

Installing WebLogic Server is Easy and Fast though to help some newbies I am attaching screen shots to understand it in better way ;)

Steps to Install WebLogic Server :

=> Download the required software from http://www.oracle.com if you have valid support contract.

=> Be prepared with all the information where you want to install the WebLogic Server and other architecture plans as you need to specify some of the values while installing WebLogic Server

=>This Post will tell you the installation and configuration story on Linux Operating System (32bit), so I have decided to use Ubuntu Operating System which is free and beautiful

=> Download the WebLogic Server .bin file from Oracle E-Delivery Site or OTN Site from the Downloads Section

=> Open a terminal at your Linux Operating System, Enter as root and execute below command.

"root@shailesh-Inspiron-N4010:/home/shailesh/Oracle#./Oracle WebLogic Server 11g R1(10.3.3).bin"
Extracting 0%........................

Follow the below screens as per the steps execution
The Installer Starts : Click On Next
Select the Middleware Home : Edit Path and Click on Next
Selecting The Software Update Information Preferences : Click On Yes

Select the type of Installation - Select The Components: Click On Next
Choose Product Installation Directory for Various WebLogic Supported Products : Click On Next
Confirmation Screen For Space Usage after the Product Install : Click On Next
Installation Starts : NO INTERVENTION REQUIRED

Installation Done, Click on Done to Start The Quick Start Window for Domain Creation and Others.

Quick Start Window : Click On Getting Started With WebLogic Server 10.3.3
Configuration Wizard Starts
Select Create A WebLogic Domain Go for Second Option if you already have domain created
Select Domain Source : Template Selection


Name of the Domain here is PRDMasterDOmain
User Name/Password Change





Select Mode of Domain Creation : Production Mode
Select Components to Add to the WebLogic Server Before Creating Domain
Specify Admin Server Details : IP Address And Port : Click Next
Just for Information : Click Next
Domain Creation is In Progress
Your home is Created Now : You can Live in there : Click Next
Start The WebLogic Server Domain : As Below
=> Command Instructions : Open The Terminal

shailesh@shailesh-Inspiron-N4010:~/Oracle/WebLogic/Domains$ ls -lrt
total 4
drwxr-x--- 11 shailesh shailesh 4096 2011-01-04 17:55 PRDMasterDomain
shailesh@shailesh-Inspiron-N4010:~/Oracle/WebLogic/Domains$
shailesh@shailesh-Inspiron-N4010:~/Oracle/WebLogic/Domains/PRDMasterDomain/bin$ ./startWebLogic.sh 

..........
..........
..........
## Enter Username and Password You have given during the installation

<4 Jan, 2011 5:57:24 PM IST> <Info> <Security> <BEA-090065> <Getting boot identity from user.>
Enter username to boot WebLogic server:weblogic
Enter password to boot WebLogic server:


<4 Jan, 2011 5:58:18 PM IST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 0:0:0:0:0:0:0:1:7001 for protocols iiop, t3, ldap, snmp, http.>
<4 Jan, 2011 5:58:18 PM IST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.>
<4 Jan, 2011 5:58:18 PM IST> <Notice> <WebLogicServer> <BEA-000329> <Started WebLogic Admin Server "AdminServer" for domain "PRDMasterDomain" running in Production Mode>
<4 Jan, 2011 5:58:19 PM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
<4 Jan, 2011 5:58:19 PM IST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>

Start The WebLogic Admin Server Console at any Browser
Login with the Username and Password and Here You Get the Consle
=> Here you have your WebLogic Server Installed... It was kind of easy, and here it comes the Apache Web Server Installation
=> Download the Software From http://httpd.apache.org/

And follow following steps to install the Apache Web Server in Your linux Environment.
+ Download the latest version of Apache Web Server : httpd-2.2.17.tar.gz
+ Gunzip and Untar it with commands gunzip and tar -xvf on the software.
+ Navigate to httpd-2.2.17 Directory and execute ./configure command with following arguments
./configure --prefix=/home/shailesh/WebServer/apache2 --enable-so --enable-rewrite --enable-auth-digest=shared

If Using Open SSL in the software use below command.
./configure --prefix=/home/shailesh/WebServer/apache2 --enable-so --enable-rewrite --enable-auth-digest=shared --enable-ssl

+ This command checks for the existing libraries and creates necessary directories for Apache Web Server Installation

+ After the execution stops, execute

./make = It compiles necessary libraries and source files of the Apache Web Server to prepare for installation on the prefix directory

+ Next Comes is
./make install = installs apache Web Server on prefix directory
root@shailesh-Inspiron-N4010:/home/shailesh/WebServer/apache2# ls -rlt
total 60
drwxr-xr-x  2 root root  4096 2010-10-15 00:13 htdocs
drwxr-xr-x 14 root root 12288 2010-10-15 00:15 manual
drwxr-xr-x  3 root root  4096 2011-01-06 21:42 lib
drwxr-xr-x  2 root root  4096 2011-01-06 21:42 modules
drwxr-xr-x  2 root root  4096 2011-01-06 21:42 bin
drwxr-xr-x  4 root root  4096 2011-01-06 21:42 conf
drwxr-xr-x  3 root root  4096 2011-01-06 21:42 error
drwxr-xr-x  3 root root  4096 2011-01-06 21:42 icons
drwxr-xr-x  2 root root  4096 2011-01-06 21:42 logs
drwxr-xr-x  2 root root  4096 2011-01-06 21:42 cgi-bin
drwxr-xr-x  2 root root  4096 2011-01-06 21:42 include
drwxr-xr-x  2 root root  4096 2011-01-06 21:42 build
drwxr-xr-x  4 root root  4096 2011-01-06 21:42 man
root@shailesh-Inspiron-N4010:/home/shailesh/WebServer/apache2#
+ To Start Apache Server, Navigate to bin directory and Execute
./apachectl start (You can provide start/restart/stop commands)


+ Try to access the http://<youripaddress>/  - If we get page saying It works !, then we are done with Apache Installation
Apache Test Page




+ Now to configure the WebLogic Server We have some pre-requisites as below.
-- We need a suitable plugin for the communication protocol to establish
-- We Need the server information from the WebLogic Server to configure at the   Web Server End.
-- We Need Specification like, How to Access the application and Performance tuning configuration which can be set at Web Server Side.

+ Download the WebLogic Server Plug-in from OTN Download site or you may get it in <WL_HOME>\server\plugin directory for appropriate Platform as it is platform dependent code.

+ For Apache Web Server Version 2.2 Download Plugin mod_wl_22.so file for Linux Opertating System and copy it in Apache Software Installation directory under modules (not necessary). (/home/shailesh/WebServer/apache2/modules.)

+ Now the Major Configuration Part :
+ Edit httpd.conf file from /home/shailesh/WebServer/apache2/conf/httpd.conf
+ Add a line to invoke the WebLogic Server Plug-in as below
LoadModule weblogic_module /usr/lib/apache2/modules/mod_wl_22.so

+ And Add below modules for WebLogic Server Configuration


<IfModule mod_weblogic.c>
WebLogicHost 127.0.0.1
WebLogicPort 7001
</IfModule>

+ If I want to access the console application from the Web Server Side, I would put one more module as below.
<Location /console>
SetHandler weblogic-handler
WebLogicHost 127.0.0.1
WebLogicPort 7001
DebugConfigInfo ON
Pathtrim /weblogic
</Location>

Note : For Any Changes You Do At httpd.conf file you have to restart the Apache Web Server.
Note : These Modules you can add anywhere in the file after invoking the Plug-in Module

+ Here we get to see the console accessed over the Web Server Configured for console App.
WebLogic Console Accessed Through Apache WebServer
+ In Similar way try deploying an application at WebLogic Server Side - Sample here is shown for Hello World Application and Add a module as below in httpd.conf file, then restart
<Location /helloworld/*>
SetHandler weblogic-handler
WebLogicHost 127.0.0.1
WebLogicPort 7001
DebugConfigInfo ON
Pathtrim /weblogic
</Location>


+ Try to access it over the Web Server you will see the page as below.


Well, Here I am ending this Tutorial, And I confirm that if you have performed all the steps in this tutorial then you are set up the communication between WebLogic and Web Server..!!

Any Questions / Feedback
mail me @ shailesh.dyade@gmail.com

Thanks to All..

Sunday, January 2, 2011

Happy New Year 2011 to All..!!

Hello All,

Great Day to Every One..!! and Happy New Year 2011.

Hope You have enjoyed the first day of new year, and had lot of fun..!

Well, This year I will give this blog a new direction by posting tutorials for basics and troubleshooting techniques and steps to configure Middleware Applications and Tools.

If you have any suggestions or feedback about this blog please contact me by clicking on contact me tab on the blog.

Thanks for your Support
Shailesh Dyade

Tuesday, December 7, 2010

Get the server "STATUS" when server is offline..!! -- PART - I

Hello All,

While I was away for some of the photography and some techno-graphy, I did some of the nice moves on the Photography side and Technology side..

You can catch my photography on my http://magical-shots.blogspot.com and here for Technology I work on..!!

These days I was working some of the SNMP features, many of you may know that we need SNMP to monitor the WebLogic Servers in various aspects as to monitor the WebLogic Server MBeans

Here we setup SNMP Traps for UNKNOWN Status of the server.

This scope is divided into 2 scopes of SNMP Functions
1. Domain Scoped SNMP Agent
2. Server Scoped SNMP Agent

In this Part we will work on Domain Scoped SNMP Agent.

In WebLogic Server Version 8.1 This feature of UNKNOWN Server Traps Generation was possible, but when new portal versions (9.2, 10.x and 11g) are introduced this feature faded to appear, and in new versions server doesn't generate any traps for UNKNOWN status of the server.

We believe that, whenever server enters into UNKNOWN Status, it will not be able to send any messages to Admin Server about its status as the status of the server will not be known to the Admin Server, and after all Kill -9 and a abrupt power failure of the server or many other circumstances result into pushing server into UNKNOWN Status.

For this feature, we have to apply the patch developed by Oracle (Patch ID : UE4C)

And then follow the following Steps to Setup a SNMP Traps for UNKNOWN Status of the Server.

I am using WebLogic Server Version 10.3.0.0

Step 1. Go to Servers, Check the status as Shutdown after starting the Admin Server





Step 2. Click on Diagnostics --> SNMP









Step 3. You can see a pre-existing domain scoped SNMP Agent in disabled state. Click on that and Enable the SNMP Agent by Click on the Check Box.



















Step 4. Save the Configuration.
























Step 5 . Configure the String Monitors.

Please Note : Don't Target any of the Servers.
















Step 6. Save the configuration.

Step 7. Create Trap Destination as in below Configurations.






















 Step 8. Save and Activate the Changes.

Step 9. Start the SNMP Trap Monitor as in below command after setting the WebLogic Environment.

"${JAVA_HOME}/bin/java" weblogic.diagnostics.snmp.cmdline.Manager SnmpTrapMonitor -p 1121
Step 10. Now try to start one of the Managed Servers and watch the traps from the server.

Here are SNMP traps for various states for WebLogic Servers you will see..

For Successful Server startup :

--- Snmp Trap Received ---
    Version        : v1
    Source         : UdpEntity:10.177.57.149:1101
    Community      : public
    Enterprise     : enterprises.140.625
    TrapOID        : enterprises.140.625.0.65
    RawTrapOID     : 1.3.6.1.4.1.140.625.0.65
    Trap Objects   : {
   { enterprises.140.625.100.5=Tue Dec 07 20:20:00 GMT+05:30 2010 }
   { enterprises.140.625.100.10=Managed-1 }
}
    Raw VarBinds   : {
   { enterprises.140.625.100.5=Tue Dec 07 20:20:00 GMT+05:30 2010 }
   { enterprises.140.625.100.10=Managed-1 }
}

For Successfull Server Shutdown :
--- Snmp Trap Received ---
    Version        : v1
    Source         : UdpEntity:10.177.57.149:1101
    Community      : public
    Enterprise     : enterprises.140.625
    TrapOID        : enterprises.140.625.0.70
    RawTrapOID     : 1.3.6.1.4.1.140.625.0.70
    Trap Objects   : {
   { enterprises.140.625.100.5=Tue Dec 07 20:18:33 GMT+05:30 2010 }
   { enterprises.140.625.100.10=Managed-1 }
}
    Raw VarBinds   : {
   { enterprises.140.625.100.5=Tue Dec 07 20:18:33 GMT+05:30 2010 }
   { enterprises.140.625.100.10=Managed-1 }
}
For Server Kill or Power Failure kind of instances..!! - Implemeneted Kill -30 on the WebLogic Java process as it assumes to be power failure.

--- Snmp Trap Received ---
    Version        : v1
    Source         : UdpEntity:10.177.57.149:1101
    Community      : public
    Enterprise     : enterprises.140.625
    TrapOID        : enterprises.140.625.0.75
    RawTrapOID     : 1.3.6.1.4.1.140.625.0.75
    Trap Objects   : {
   { enterprises.140.625.100.5=Tue Dec 07 20:22:40 GMT+05:30 2010 }
   { enterprises.140.625.100.10=AdminServer }
   { enterprises.140.625.100.55=jmx.monitor.string.matches }
   { enterprises.140.625.100.60=UNKNOWN }
   { enterprises.140.625.100.65=UNKNOWN }
   { enterprises.140.625.100.70=com.bea:Name=Managed-1,Type=ServerLifeCycleRuntime }
   { enterprises.140.625.100.75=ServerLifeCycleRuntime }
   { enterprises.140.625.100.80=State }
}
    Raw VarBinds   : {
   { enterprises.140.625.100.5=Tue Dec 07 20:22:40 GMT+05:30 2010 }
   { enterprises.140.625.100.10=AdminServer }
   { enterprises.140.625.100.55=jmx.monitor.string.matches }
   { enterprises.140.625.100.60=UNKNOWN }
   { enterprises.140.625.100.65=UNKNOWN }
   { enterprises.140.625.100.70=com.bea:Name=Managed-1,Type=ServerLifeCycleRuntime }
   { enterprises.140.625.100.75=ServerLifeCycleRuntime }
   { enterprises.140.625.100.80=State }
}

Please let me know if you are facing any difficulty in setting SNMP.

Thanks,

Your comments are much helpful.

Shailesh Dyade