SAM Technologies
[email protected] [email protected]
1.What is file name to install weblogic in Linux ? and How to install ?
The file Name is server103_linux32.bin In Windows server103_win32.cmd server103_win32.cmd From the VPN using the putty tool 2.What is domain in WL? How to create domain in WL? A WebLogic Serer administration domain is a logically related group of WebLogic Serer resources! "omains include a special WebLogic Serer instance called the !dministration erver# which is the central point from which you configure and manage al l resources in the domain! $sually# you configure a domain to include additional WebLogic Serer instances called "anaged ervers! %ou deploy Web applications# &'(s# Web serices# and other resources onto the )anaged Serers and use the Administration Serer for configuration and management purposes only!
The "omain *onfiguration Wi+ard is located below WL,-.)&/common/bin# where WL,-.)& is (&A,-.)&/weblogic01! Start it by running the config!cmd! The "omain *onfiguration Wi+ard is located below *23bea3wlserer,14!53common3bin# in 14!5 ersion How man# wa#s to create a domain
$sing domain configuration wi+ard $sing domain configuration template $sing weblogic!Admin command $sing WLST scripts Fortunately# Fortunately# many different ways to create and configure a dom ain are aailable! The most common way to create a domain is through the "omain *onfiguration Wi+ard and the most common way to configure the domain is by using the WebLogic *onsole $omain creation %rocedure in windows through gra%hical mode
The "omain *onfiguration Wi+ard is located below *23bea3wlserer,14!53common3bin# in 14!5 ersion .pen the command prompt goto *23bea3wlserer,14!53common3bin and run the script &onfig.cmd and press &nter &onfig.cmd 'mode(console the domain create in console prompt
$omain creation %rocedure in unix through &onsole mode When we Are creating new "omain in $ni6 find the below Steps you need to follow!
1! 7o to Weblogic Weblogic *ommon 89 bin "irectory For config!sh li:e below bash;5!44< cd /bea/weblogic=>/common/bin bash;5!44< !/config!sh ;mode?console ;log?/usr/babu/temp/dom,cre!log
By Bhramaiah
SAM Technologies
[email protected] [email protected]
Find (elow steps .ne (y .ne@ 2 BBBB8(&A WebLogic WebLogic *onfiguration Wi+ard BBBBBB9 *hoose between creating and e6tending a domain! (ased on your selection# the *onfiguration Wi+ard guides you through the steps to generate a new or e6tend an e6isting domain! ;91C*reate a new WebLogic domain C *reate a WebLogic domain in your proDects directory! directory! >C&6tend an e6isting WebLogic domain C &6tend an e6isting e6isting WebLogic WebLogic domain! $se this option to add applications and serices# or to oerride e6isting database access CE'"(* and messaging E')S settings! %ou can also incorporate additional functionality in your domain# for e6ample# by including CAGuaLogic Serice (us! &nter inde6 number to select .H &6itJNe6tJ9 1 BBBBBB (&A WebLogic *onfiguration Wi+ard BBBBBBB89 Select "omain Source2 BBBBBBB Select the source from which the domain will be created! %ou can create the domain by selecting from the reGuired components or by selecting from a list of e6isting domain templates! ;91C*hoose Weblogic Platform components C %ou can choose choose the Weblogic componentEs that you want want supported in your your domain! >C*hoose custom template C *hoose this option if you want want to use an an e6isting template! This could be a custom custom created template using the Template (uilder! &nter inde6 number to select .H &6itJPreiousJNe6tJ9 Ne6t BBBB; (&A WebLogic *onfiguration Wi+ard BBBBBBBBB9 Application Template Selection2 BBBBBBBBBB; Aailable Templates C,,,,,WebLogic Serer EHeGuired6 C,,,,,Wor:shop for WebLogic Platform >J C,,,,,WebLogic Integration 5J C,,,,,WebLogic Portal KJ C,,,,,WebLogic Portal 7roupSpace Framewor: J C,,,,,WebLogic Portal 7roupSpace Application MJ &nter number e6actly as it appears in brac:ets to toggle selection .H &6itJPreiousJNe6tJ9 Ne6t BBBBBB; (&A WebLogic *onfiguration Wi+ard BBBBBBB9
By Bhramaiah
SAM Technologies
[email protected] [email protected]
Find (elow steps .ne (y .ne@ 2 BBBB8(&A WebLogic WebLogic *onfiguration Wi+ard BBBBBB9 *hoose between creating and e6tending a domain! (ased on your selection# the *onfiguration Wi+ard guides you through the steps to generate a new or e6tend an e6isting domain! ;91C*reate a new WebLogic domain C *reate a WebLogic domain in your proDects directory! directory! >C&6tend an e6isting WebLogic domain C &6tend an e6isting e6isting WebLogic WebLogic domain! $se this option to add applications and serices# or to oerride e6isting database access CE'"(* and messaging E')S settings! %ou can also incorporate additional functionality in your domain# for e6ample# by including CAGuaLogic Serice (us! &nter inde6 number to select .H &6itJNe6tJ9 1 BBBBBB (&A WebLogic *onfiguration Wi+ard BBBBBBB89 Select "omain Source2 BBBBBBB Select the source from which the domain will be created! %ou can create the domain by selecting from the reGuired components or by selecting from a list of e6isting domain templates! ;91C*hoose Weblogic Platform components C %ou can choose choose the Weblogic componentEs that you want want supported in your your domain! >C*hoose custom template C *hoose this option if you want want to use an an e6isting template! This could be a custom custom created template using the Template (uilder! &nter inde6 number to select .H &6itJPreiousJNe6tJ9 Ne6t BBBB; (&A WebLogic *onfiguration Wi+ard BBBBBBBBB9 Application Template Selection2 BBBBBBBBBB; Aailable Templates C,,,,,WebLogic Serer EHeGuired6 C,,,,,Wor:shop for WebLogic Platform >J C,,,,,WebLogic Integration 5J C,,,,,WebLogic Portal KJ C,,,,,WebLogic Portal 7roupSpace Framewor: J C,,,,,WebLogic Portal 7roupSpace Application MJ &nter number e6actly as it appears in brac:ets to toggle selection .H &6itJPreiousJNe6tJ9 Ne6t BBBBBB; (&A WebLogic *onfiguration Wi+ard BBBBBBB9
By Bhramaiah
SAM Technologies
[email protected] [email protected]
*onfigure Administrator $sername and Password2 BBBBBBBBBBBBBBB; *reate a user to be assigned to the Administrator role! This user is the default administrator used to start deelopment mode serers! C Name C Value C ,C,,,,,,,,,,,,,,,,,,,,,,,,,C,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,C ,C,,,,,,,,,,,,,,,,,,,,,,,,,C,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,C 1C $ser name2 C weblogic C >C $ser password2 C C 5C *onfirm user password2 C C KC "escription2 C This user is the default administrator! administrator! C $se aboe alue or select another option2 1 8 )odify O$ser name > 8 )odify O$ser password 5 8 )odify O*onfirm user password K 8 )odify O"escription &nter option number to select .H &6itJPreiousJNe6tJ9 > BBBBBBB (&A WebLogic *onfiguration Wi+ard BBBBBBB;9 *onfigure Administrator $sername and Password2 BBBBBBBBBBBBBBB; *reate a user to be assigned to the Administrator role! This user is the default administrator used to start deelopment mode serers! O$ser password2 ? J &nter new $ser password2 .H &6itJHesetJAcceptJ9 BBBBB; (&A WebLogic *onfiguration Wi+ard BBBBBBB89 *onfigure Administrator $sername and Password2 BBBBBBBBBBBBBBB; *reate a user to be assigned to the Administrator role! This user is the default administrator used to start deelopment mode serers! C Name C Value C ,C,,,,,,,,,,,,,,,,,,,,,,,,,C,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,C ,C,,,,,,,,,,,,,,,,,,,,,,,,,C,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,C 1C $ser name2 C weblogic C >C $ser password2 C C 5C *onfirm user password2 C C KC "escription2 C This user is the default administrator! administrator! C $se aboe alue or select another option2 1 8 )odify O$ser name > 8 )odify O$ser password 5 8 )odify O*onfirm user password K 8 )odify O"escription 8 "iscard *hanges
By Bhramaiah
SAM Technologies
[email protected] [email protected]
&nter option number to select .H &6itJPreiousJNe6tJ9 5 BBBBBB(&A WebLogic *onfiguration Wi+ard BBBBBBB9 *onfigure Administrator $sername and Password2 BBBBBBBBBBBBBBB; *reate a user to be assigned to the Administrator role! This user is the default administrator used to start deelopment mode serers! O*onfirm user password2 ? J &nter new *onfirm user password2 .H &6itJHesetJAcceptJ9 BBBB8 (&A WebLogic *onfiguration Wi+ard BBBBBBBB89 *onfigure Administrator $sername and Password2 BBBBBBBBBBBBBBB; *reate a user to be assigned to the Administrator role! This user is the default administrator used to start deelopment mode serers! C Name C Value C ,C,,,,,,,,,,,,,,,,,,,,,,,,,C,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,C ,C,,,,,,,,,,,,,,,,,,,,,,,,,C,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,C 1C $ser name2 C weblogic C >C $ser password2 C C 5C *onfirm user password2 C C KC "escription2 C This user is the default administrator! administrator! C $se aboe alue or select another option2 1 8 )odify O$ser name > 8 )odify O$ser password 5 8 )odify O*onfirm user password K 8 )odify O"escription 8 "iscard *hanges &nter option number to select .H &6itJPreiousJNe6tJ9 Ne6t BB8 (&A WebLogic *onfiguration Wi+ard BBBBBBBB89 "omain )ode *onfiguration2 BBBBBBBB8 &nable "eelopment or Production )ode for this domain! ;91C"eelopment )ode >CProduction )ode &nter inde6 number to select .H &6itJPreiousJNe6tJ9 > BBBBBBB(&A WebLogic *onfiguration Wi+ard BBBBBBB;9 'aa S"Q Selection2 BBBBBB;
By Bhramaiah
SAM Technologies
[email protected]
;91CSun S"Q 1!!4,4M R /u15/weblogic/&P*/bea/Dd:14,4M >C.ther 'aa S"Q &nter inde6 number to select .H &6itJPreiousJNe6tJ9 1 BBBBB (&A WebLogic *onfiguration Wi+ard BBBBBB;9 *hoose *onfiguration .ption2 BBBBBBBBB; "o you want to modify any of the preconfigured settings or defaults in your template To :eep the default or template settings# and proceed d irectly to name and create your domain# leae No selected! 1C%es ;9>CNo &nter inde6 number to select .H &6itJPreiousJNe6tJ9 Ne6t BBBB(&A WebLogic *onfiguration Wi+ard BBBBB89 Select the target domain directory for this domain2 BBBBBBBBBBBBBBBBB OTarget Location ? &nter new alue or use default /u15/weblogic/&P*/bea/user,proDects/domainsJ &nter new Target Location .H &6itJPre iousJNe6tJ9 Ne6t BBBB; (&A WebLogic *onfiguration Wi+ard BBBBBBB9 &dit "omain Information2 BBBBBBBB C Name C Value C ,C,,,,,,,,C,,,,,,,,,,,,,C 1C Name2 C base,domain C &nter alue for OName .H &6itJPreiousJNe6tJ9 babu BBBBB8 (&A WebLogic *onfiguration Wi+ard BBBBBB;9 &dit "omain Information2 BBBBBBBB C Name C Value C ,C,,,,,,,,C,,,,,,,C 1C Name2 C babu C $se aboe alue or select another option2 1 8 )odify OName > 8 "iscard *hanges &nter option number to select .H &6itJPreiousJNe6tJ9 Ne6t
By Bhramaiah
SAM Technologies
[email protected]
BBBBB (&A WebLogic *onfiguration Wi+ard BBBBBB;9 "omain Validation FailedU2 BBBBBBBB8 A WebLogic domain already e6ists at that location! To replace the e6isting dom ain# delete it first! .therwise# please choose a different directory! &nter &6itJPreiousJ9 Preious BBBBBBB;(&A WebLogic *onfiguration Wi+ard BBBB89 &dit "omain Information2 BBBBBBBB C Name C Value C ,C,,,,,,,,C,,,,,,,C 1C Name2 C babu C &nter alue for OName .H &6itJPreiousJNe6tJ9 gbabu BBB8 (&A WebLogic *onfiguration Wi+ard BBBBBBB89 &dit "omain Information2 BBBBBBBB C Name C Value C ,C,,,,,,,,C,,,,,,,C 1C Name2 C gbabu C $se aboe alue or select another option2 1 8 )odify OName > 8 "iscard *hanges &nter option number to select .H &6itJPreiousJNe6tJ9 Ne6t BBBBB (&A WebLogic *onfiguration Wi+ard BBBBBB89 *reating "omain@ 4 > 4 144 ;;;;;;;;;;;;C;;;;;;;;;;;;C;;;;;;;;;;;;C;;;;;;;;;;;;J J "omain *reated SuccessfullyU To create a domain using the weblogic!Serer command2 1. .pen a command shell!
2. Set the *LASSPAT- to include the WebLogic Serer classes! The easiest way to set your *LASSPAT- is to run the setWLS&n!cmd EWindows or the setWLS&n!sh E$NIX script! The script is located in the WebLogic Serer installation at2 (&A,-ome/weblogic01/serer/bin 3. Hun the following command2 Daa weblogic!Serer
By Bhramaiah
SAM Technologies
[email protected]
When you are prompted for a username and password# enter any alues you choose! %ou will be prompted with2 Would you li:e the serer to create a default configuration and boot Ey/n Daa ;"weblogic!"omain?*hicago weblogic!Serer creates a domain called *hicago! 4. Answer %! %ou will be as:ed to confirm the password!
5. &nter the same password you entered in step 5! The serer starts and creates a default config!6ml file in the directory from which you ran the Daa weblogic!Serer command! The serer creates a (oot Identity file Ecalled boot!properties that contains the username and password you entered in step 5! When this file is present in the domainYs root directory# the serer does not prompt for a username and password during startup! 3.What is the use of boot. )ro%erties file and where it located? We are create a domain in "eelopment mode by default boot!properties file is created ! Location is 2 *23bea3user,proDects3domains3de,test3serers3AdminSerer3security3 boot!properties you will notice that you have to enter username and assword for each managed server during startu and shutdown. This in contrary to the administration server where you don!t need to enter username and assword at startu. " was wondering if there was an easy way of s#iing this manual ste for the managed servers as well.And yes$ there is an easy and elegant way to revent entering credentials every startu and shutdown. %ust follow these stes& 1 'reate a (oot.roerties file. 'reate a lain te)t file called (oot.roerties with the following content& username*scott assword*tiger 2 +lace the (oot.roerties file in the security directory. Save or coy this file in the security directory under the managed server root directory. This directory was not created at installation time$ so " had to create it myself. The server root directory is located at ,middleware-home/user-ro0ects/,domain/,managed-server i.e. &/Middleware/user-ro0ects/domains/(ase-domain/servers/(am-server1. 3 Start the managed server. The server will read the credentials from the (oot.roerties file and in case of lain te)t username and assword the server encryt the username and assword. otice the following lines in the o utut& ,Se 23$ 2 1&51&25 +M 'ST ,otice ,Security ,6A782 ,Security initiali9ing using security realm myrealm. ,Se 23$ 2 1&51&25 +M 'ST ,otice ,Security ,6A783 ,Storing (oot identity in the file& &/Middleware/user-ro0ects/domains/(ase-domain/servers/(am-server1/security/(oot.roertiesThe (oot.roerties file is still lain te)t with the username and assword values encryted. o no coy the encryted version (etween managed servers. ven when the credentials are the same$ the resulting file is different.
By Bhramaiah
SAM Technologies
[email protected]
*.what is config.xml in weblogic?
it is heart of the weblogic serer and its maintains the all the info about managed and admin serer details li:e Ipadd#portno!!!etc# and wheneer you update the admin console that info is updated in config!6ml and while restart the serer#serer will get details from config!6ml only!!!!it is also called as configuration repository config!6ml! The config!6ml file consists of a series of X)L elements! The "omain element is the top;leel element# and all elements in the "omain are children of the "omain element! The "omain element includes child elements# such as the Serer# *luster# and Application elements! These child elements may hae children themseles! What we can edit in the config!6ml file 1! We can replicate the serer instances! >! We can replicate the cluster instances! 5! We can replicate the machine configurations! What we should not touchEcannot change 1! security settings ;; realm details >! encrypted password data!!! What are the basic changes obsered compared to WebLogic 0!1 1! The configuration in the 0!1 is un;ordered as and when you configured new resource that will be appendded at the end! whereas in the WebLogic =!6 it is ery clear that follows the 6ml schema so we cannot place a tag line up or down# it follows strict rules defined in domain!6sd! >! The schema defination clearly mentioned that an element if selected to place in the config!6ml that could we need to chec: for parent element# data type Estring# boolean# number etc! Note2 "o not edit the config!6ml file while the Administration Serer is running! ! Ways to start Administration Sererin .racle WebLogic
By Bhramaiah
SAM Technologies
[email protected]
1!$sing startup script >! From Windows Start )enu Ewindows only 5! $sing ODaa weblogic!Serer command K! $sing WLST EWebLogic Scripting Tool and Node )anager ! $sing WLST without Node )anager Ways to start )anaged S ererin .racle WebLogic 1!$sing startup script >! $sing Administration *onsole 5! $sing WLST and Node )anager K! $sing ODaa weblogic!Serer command 1! Starting Administration Serer EstartWebLogic!cmd or !sh !/ startWebLogic!sh >! Starting )anaged Serer Estart)anagedWebLogic!sh or !cmd A! To Start WebLogic Administration Serer Instance 7o to domain for which you wish to start Administration Serer cd <(&A,-.)&/user,proDects/domains/domain,name9/bin startWebLogic!cmd Efor Windows startWebLogic!sh Efor $ni6 !/startWebLogic!sh confirm that WebLogic Adminstration Serer started properly by loo:ing at message OSerice started H$NNIN7 mode O! Log file in below picture shows that AdminSeer is listening on Port 441 and all IP addresses on specific machine!
Startup/Shutdown Log file can be found at <(&A,-.)&/ user,proDects/ domains/ domain,name9 /serers/SererName9 /logs / SererName9!log (! Start )anaged Serer Instance If you created )anaged Serer while creating domain then you can start )anaged Serer using start)anagedWebLogic command <(&A,-.)&/user,proDects/domains/domain,name9/bin start)anagedWebLogic!cmd managed,serer,name9 admin,url9 Efor Windows !/start)anagedWebLogic!sh managed,serer,name9 admin,url9 Efor $ni6 I created )anaged Serer )S1 with Admin Port as 445 start)anagedWebLogic!cmd ms1 http2//localhost2445 EWindows +. What is cluster in Web Logic erver? How to create cluster in Web Logic erver? How to configure &luster in webserver,)-/?tell me com%lete configuration? A WebLogic Serer cluster consists of multiple WebLogic Serer serer instances running simultaneously and wor:ing together to proide increased scalability and reliability! A cluster appears to clients to be a single WebLogic Serer instance! The serer instances that constitute a cluster can
By Bhramaiah
SAM Technologies
[email protected]
run on the same machine# or be located on different machines! %ou can increase a clusterZs capacity by adding additional serer instances to the cluster on an e6isting machine# or you can add machines to the cluster to host the incremental serer instances! &ach serer instance in a cluster must run the same ersion of WebLogic Serer!E.r 7roup of WebLogic )anaged Serer Instances that wor: together to proide high aailability and scalability for applications is called cluster! WebLogic Serers with in cluster can run on same machine or different machines! These are also called as managed Serer cluster! he ools for &reating and &onfiguring a WebLogic &luster The primary tools you hae aailable to create or configure a WebLogic cluster are the "omain *onfiguration Wi+ard and the Administration *onsole! Which tool you use depends on the type of clustering architecture you want to employ and the capabilities of these tools to support your efforts! The "omain *onfiguration Wi+ard is an e6cellent tool if you are creating a WebLogic cluster from scratch! This tool presents you with options on the type of WebLogic domain you want to create! .ne such option is a domain with an administration serer and one or more managed serers that are clustered! -oweer# this option creates the administration serer and the clustered WebLogic Serer instances on the same single serer machine! The Administration *onsole is a tool that you can use to configure a WebLogic cluster from e6isting managed serers in a domain! For e6ample# if your clustering architecture warrants the clustered serers to be on separate serer machines# the best approach would be to create the administration serer and managed serers independently on each of those machines using the "omain *onfiguration Wi+ard! After the managed serers are created and registered with the domainYs administration serer# you could use the Administration *onsole to graphically configure a cluster from the e6isting managed serers! uidelines for &onfiguring our WebLogic &luster (efore you start creating your WebLogic cluster# it is worth reiewing the following guidelines for creating a cluster2
%ou should try to use "NS names in a production enironment to specify the location of the managed serers that will comp rise a WebLogic cluster! The use of IP addresses can result in IP address translation errors if you are using a firewall to form a ")[! -oweer# if you do use IP addresses# they should be permanently assigned to the serer machine Estatic and not dynamically assigned! The WebLogic cluster must hae a uniGue IP address and listen port combination for each of its managed serer instances! The following are some e6amples2 If managed serer instances in a cluster share an IP address# as in the case of a non; o multihomed single serer# a uniGue listen port number is assigned to each serer instance in the cluster! &onfiguring a &luster sing the !dministration &onsole This section proides a step;by;step guide showing how you can configure a WebLogic cluster using the Administration *onsole! The assumptions for this e6ercise are that you already hae a WebLogic domain set up with two managed serers# and the networ: configuration for the WebLogic domain adheres to the clustering guidelines discussed in the preceding section! The name of the WebLogic domain# cluster and managed serers# and their networ: configurations can differ from those used in the e6ample because the steps to configu re the WebLogic cluster still remain the same! To learn how to set up and configure a WebLogic domain# see $nderstanding WebLogic "omains# *reating and &6tending WebLogic "omains# and *onfiguring the Networ: Hesources for a WebLogic "omain! •
•
&onfigure !%ache Webserver with Weblogic erver Step 1 )a:e sure the Apache serer runs on port 0404!E This is because sometimes IIS# or some antiirus s/w runs on that port!This can be done by modifying the httpd!conf present at "23Program Files3Apache 7roup3Apache>3conf )odify the Listen port to 0404
By Bhramaiah
SAM Technologies
[email protected]
Listen 0404 Step > *opy the mod,wl,>4!so from bea,home93wlserer,14!53serer3plugin3win35> to "23Program Files3Apache 7roup3Apache>3modules Step 5 Add these lines in the httpd!conf file Load)odule weblogic,module modules/mod,wl,>4!so Location /9 Set-andler weblogic;handler /Location9 If)odule mod,weblogic!c9 WebLogic*luster localhost2445#localhost244 "ebug .N WLLogFile c2/temp/wlpro6y!log WLTemp"ir c2/temp /If)odule9 Step K Hestart Apache and access the applicat ion deployed on the *luster using http2//localhost20404/%ourApp This will forward the reGuest to the Weblogic *luster %ou can chec: the headers sent and receied to WLS in w lpro6y!log file! *.What 4ind of %rox# ervers are using in #our %ro5ect ?what is the configuration file6s7? !%ache H) erver or &onfiguring unne 6 i)lanet7 Webserver with Weblogic Step 1! *reate a Webserer running on port 0401 using the Admin *onsole of Sun.ne!
Step >! *opy oer the plugin present in the following directory *23bea1453wlserer,14!53serer3plugin3win35>3pro6yM1!dll To the Sun .ne Installation "irectory *23Sun3WebSererM!13plugins3lib Step 5! Load the plugins by adding the following lines in magnus!conf present in *23Sun3WebSererM!13https;testserer3config magnus!conf Init fn?load;modules funcs?w l,pro6y#wl,init shlib?*2/Sun/WebSererM!1/plugins/lib/ pro6yM1!dll To forward reGuest to a Standalone Serer add the following lines to obD!conf file present in the following directory *23Sun3WebSererM!13https;testserer3config
By Bhramaiah
SAM Technologies
[email protected]
obD!conf
Serice fn?wl,pro6y WebLogic-ost?localhost WebLogicPort?441 WLLogFile?*2/Sun/ WebSererM!1/https;testserer/logs/pro6y!log "ebug?ALL "ebug*onfigInfo?.N To forward reGuest to a *Luster we need to add the following in the bD!conf file
Serice fn?wl,pro6y WebLogic*luster?localhost2441#localhost2445 WLLogFile?*2/ Sun/WebSererM!1/https;testserer/logs/pro6y!log "ebug?ALL "ebug*onfigInfo?.N To configure SSL (etween Sun.ne Webserer and Weblogic Serer# add the following in the obD!conf file
Serice fn?wl,pro6y WebLogic-ost?localhost WebLogicPort?441 WLLogFile?*2/ Sun/WebSererM!1/https;testserer/logs/pro6y!log "ebug?ALL "ebug*onfigInfo?.N SecurePro6y?.N Trusted*AFile?*2/Sun/WebSererM!1/https;testserer/root*A!pem HeGuireSSL-ost)atch?false where root*A!pem is the root certificate of Weblogic Serer! Step K! Start the test serer using startsr!bat present in *23Sun3WebSererM!13https;testserer Step ! Acess the Weblogic *onsole using the following url http2//localhost20401/console/ :. Thread "ump2
1. What is Thread dump 2. When we will ta:e Thread dump EScenarios 3. -ow )any ways ta:e Thread "umps 4. Thread "ump 7enerating Procedure 5. What can I Analysis with Thread "ump :. -ow can I analysis thread dump ;. Actions ta:en for Issue resoling 8. Heferences What is Thread dump Thread "ump is a te6tual dump of all actie threads and monitors of 'aa apps running in a Virtual )achine! When we will ta:e Thread dump EScenarios
By Bhramaiah
SAM Technologies
[email protected]
1. Scenario 12 when serer is hang Position# i!e! that time serer will not respond to coming 1.
reGuests! >! Scenario >2 While seer is ta:ing more time to restart
1. Scenario 52 When we are 7etting e6ception li:e ODaa!lang!.ut.f)emory&6ception Scenario K2 Process running out of File descriptors! Serer cannot accept further reGuests because soc:ets cannot be created ! Scenario 2 Infinite Looping in the code -ow many ways ta:e Thread "umps )any types we hae to ta:e a Thread dumps! As per your fle6ibility you can choose one Procedure! For analy+ing ta:e dumps some Interals Eli:e eery 14mins# 14mins etc!! 7enerating "ump Tal:ing Procedures 1! Ta:e Thread dump from *onsole by $sing of below command <:ill ;5 PI" EFor 7etting PI"# $se this *ommand ps 8ef C grep ODaa -ere The .utput of the Thread "ump will be generated in the Serer ST".$T! ENote2 If a process is not responding to :ill ;5 PI"9 then itZs a 'V) bug! .n Windows machine2 cltr \ brea: >! 7eneration Thread "ump ia Admin *onsole
1. login to Admin *onsoleEwith Admin $sername/Password 2. *lic: on Serer# after choose your serer 3. 7oto )onitoring TA( 4. 7oto Threads TA(# after clic: on O"ump Thread Stac: (utton 5. Now you can iew the all the Threads in Same page :. *opy and paste in a t6t file! 5! We can *ollect Thread "ump $sing OWebLogic!Admin which is deprecated# but still aailable or may be aailable in near future as well As i thin: because it is one of the best debugging utility for Admins! java WebLogic.Admin -url t3://hostname: port -username Weblogic -password Weblogic TH!A"#"$%&
This Thread "umps will be generated in Serers ST".$T file K! 7etting Thread "umps by using 'stac: $tility a.jstac' (m )pid* Eto connect to a lie Daa process b. jstac' (m +server#id,)remote server & or hostname*
Eto connect to a remote debug serer
By Bhramaiah
SAM Technologies
[email protected]
E;m )eans print both Daa and natie frames Emi6ed mode ! (y $sing WLST Script# can contain e6tension of E!py connectE]weblogicZ#ZweblogicZ#Zt52//hostname2port^ cd ESerersZ lsE cd E]AdminSererZ lsE thread"umpE &6ecute this Script in console! What can I Analysis with Thread "umps We need to analy+e the thread dumps for analy+ing running threads and their states to identifying! -ow can I analysis thread dumps For analy+e thread dumps we hae lots of tools to understand easily thread states
1. 1! samurai tool 2 EVisit2 http2//yusu:e!homeip!net/samurai/en/inde6!html In this tool you can identify all the Thread states by "eadloc:s and waiting state threads!
identifying colors! We need to ta:e care about
)ore "etails2 < Daa ;Dar samurai!Dar After running we will get a Screen li:e below 7oto Thread dump tab When Samurai detects a thread dump in your log# a tab named OThread "ump will appear! %ou can Dust clic: OThread dumps tab to see the analysis result! Samurai colors idle threads in gray# bloc:ed threds in red and running threds in green! There are three result iews and S amurai shows OTable iew by default! In many case you are Dust interested in the table iew and the seGuence iew! $se the table iew to decide which thread needs be inspected# the seGuence iew to understand the threadZs behaior! %ou should ta:ecare especially threds always in red! Actions ta:en for Issue resoling
1. *lassic "ead Loc:s 2 Loo: for the threads waiting for monitor entry For &6ample 2 !0ecuteThread: 124 5or 6ueue: 1de5ault78 daemon prio9 tid9;<==c5> nid9;?c waiting 5or monitor entr@ +0d5>..0d5>=2d> at weblogic.common.internal.esourceAllocator.releaseesourceAllocator.java:B??C at weblogic.jdbc.common.internal.Donnection!nv.destro@Donnection!nv.java:2C
By Bhramaiah
SAM Technologies
[email protected]
Heason2 The aboe thread is waiting to acGuire loc: on Hesource Allocator obDect! The ne6t step is to identify the thread that is holding the Hesource Allocator obDect !0ecuteThread: 14 5or 6ueue: 1##weblogic#admin#rmi#6ueue78 daemon prio9 tid9;<=b2B> nid9;BB waiting 5or monitor entr@ +0d<>..0d<>=2d> at weblogic.jdbc.common.internal.Donnection!nv.get&repEtmtDacheHitsDonnection!nv.java:=B
Heason2 This thread is holding loc: on source Allocator obDect# but is waiting for *onnection &n obDect! This is a classic deadloc:! >! Threads in waitE state2 A sample dump2 O&6ecuteThread2 ]14^ for Gueue2 ]S&HV,&'(,_$&$&Z daemon prio? tid? 4`44M4f4 nid?4`54 in .bDect!waitE 05544444!!05541==0J at Daa!lang!.bDect!waitENatie )ethod ; waiting on 46c5bf109 Ea weblogic!eDb>4!pool!StatelessSessionPool at weblogic!eDb>4!pool!StatelessSessionPool!waitFor(eanEStatelessSessionPool!Daa2>>> Heason2 The aboe thread would come out of waitE under two conditions E"epending on application logic 1 .ne of the thread aailable in the e6ecute Gueue pool would call notifyE on this obDect when an instance is aailable! EIf the waitE is indefinite! This can cause the thread to hang for eer if serer neer does a notifyE to this obDect! > If the timeout e6ceeds# the thread would throw an e6ception and bac: to e6ecute Gueue thread pool! How to set hea% si8e in weblogic? There are two ways to increase the heap si+e in weblogic!
If you are using the nodemanager then Login to the weblogic Administration console# then clic: on Serers ;;9 SererName ;;9 7eneral ;;9 Hemote Start .ptions and loo: for the 'aa Arguments -ere you can add ;1>Xm6 ;1>Xms to the Daa arguments! If you want to increase the heap si+e then alter these alues from 1> to 14>K depending on your reGuirements! If you do not hae a nodemanager configured! Login the operating system # $nder
Xm6 ;1>Xms to the Daa options! These changes will reGuire a restart of the 'V)!
By Bhramaiah
SAM Technologies
[email protected]
9.What is %erfomance tuning?how do #ou tune the %erfomance ste% b# ste% %rocess ?!ns Level to our !%%lication Level?
Ans2 Performance tuning WebLogic Serer and your WebLogic Serer application is a comple6 and iteratie process! uning allows #ou to ad5ust resources to achieve #our %erformance ob5ectives.
The following sections proide a tuning roadmap and tuning tips for you can use to improe system performance! 1. nderstand our )erformance b5ectives 2. "easure our )erformance "etrics 2.1. "onitor $is: and &) tili8ation 2.2. "onitor $ata ransfers !cross the ;etwor: 3. Locate
une our !%%lication
une #our $<
une WebLogic erver )erformance )arameters
une our >"
une the %erating #stem
uning the WebLogic )ersistent tore
@. te%s on How to -ecover or -eset Lost Weblogic !dmin )assword Steps on how to recoer or reset lost Weblogic admin Eadministrator password
If you lost your Weblogic admin password# follow the steps below to recoer/reset! 1! )a:e sure Weblogic instance is down! >! Set your enironment ariables using set"omain&n!sh! 5! cd to security directory in your instance! Eeg2
By Bhramaiah
SAM Technologies
[email protected]
cd WL,-.)&/user,proDects/domains/base,domain/serers/AdminSerer/data/ldap rm "efaultAuthenticatormyrealmInit!initiali+ed ! Startup weblogic serer using the newly created admin credential! Eenter the info in boot!properties 0! Logon to /console with the newly created admin istrator! =! $nder ]Security HealmsZ# change the password f or the old admin! 14!what are $ifference between local and global transactions A transaction is atomic unit of Wor:!The tas:s which are made into the transaction act as a unit w hich can be e6ecuted successfully all#or if at least one tas: fails to its promise #then the effect of all the tas:s are to be rollbac:ed!Thus transaction is committed or rolled bac:ed! Transactions can be diided into two categories! 1!Local Transactions2These transactions are confined to obDects which reside inside one particular 'V)!Local transactions in Daa can be implemented using the 'TA api! >!7lobal Transactions2These transactions may encapsulate obDects which are distributed o n arious 'V)Zs!7lobal transactions are implemented throught TW.;P-AS&;*.))IT design implementation! 11.$iffernences between Weblogic erver 9.x and @.x
S no Weblogic Serer 0!6 Supports '"Q 1!K he director# structure Ax B li:e the config.xml locationC cache and staging folder %athsC managed or admin server %aths
Weblogic Serer =!6 Supports '"Q 1! The directory structure more Structuri+ed way of folders rearranged
We need configure *onnection pools then "ata source
First need to create a "ynamic "ata Source # inside u can find a *onnection pool tab
-ere We donZt hae any Loc: &dit future in console! "onZt hae Side by Side "eployment feature Where we are Hedeploying application we need un;install preious ersion # then deploy the new ersion application This Will not support two Phase deployment Via console we hae "ifferent )odule "eployment li:e 1!Applications >!&'( )odules 5!WebApplication )odules K!*onnector )odule WLST was introduced but this will be aailable from 0!1 SPM 1 -ere *reation users Holes .nly way to create from console
-ere We hae Loc: and edit feature in console
This will not Support for S_L Serer >44
ture We hae this future here No need to un 8install simply update option!
This Will support two Phase "eployment -ere No module deployment all type of )odules In Single Screen in console
from 0!1 SPM -ere full "eeloped with )(ean utility -ere we can upload those users and roles! this 6ml must be e6pressed in eXtensible Access *ontrol )ar:up Language EXA*)L >!4! This Will support S_L Serer >44
By Bhramaiah
SAM Technologies
[email protected]
WebLogic "iagnostic Framewor: feature we donZt hae in this ersion
Here we have this feature. With this feature we can do !%%lication'sco%ed monitorC Htt%ession$ebugC enables #ou to ins%ect an H) session ob5ect.
Not support for ')S *lient;Side Store;and; Forward
u%%orting &lient'ide tore'and'Dorward
erver dosent come u% if de%lo#ment fails
erver boots in !$"=; mode if de%lo#ment failes
&onsole is an a%%let and uses >&/ >& >)D and ;etui %age flows Here t hread are three t#%es Weblogic.admin.H) Weblogic.admin.-"= Weblogic.:ernal.default
&onsole is %ortal and uses >L 6>) 2.07 Here onl# one t#%e of thread is there Weblogc.:ernal.default
12. !%%lication $e%lo#ment taging modes in Weblogic erver ?
The deployment staging mode determines how deployment files are made aailable to target serers that must deploy an application or standalone module! WebLogic erver %rovides three different o%tions for staging filesB 1. tage mode
2. ;ostage mode 3. Axternal tage mode The following table describes the behaior and best practices for using the different deployment staging modes! Staging )ode Stage
NoStage
(ehaior The Administration Serer first copies the deployment unit source files to the staging directories of target serers! The target serers then deploy using their local copy of the deployment files! The Administration Serer does not copy deployment unit files! Instead# all serers deploy using the same physical copy of the deployment files# which must be directly accessible by the Administration Serer and target serers! With nostage deployments of e6ploded archie directories# WebLogic Serer automatically detects changes to a deploymentZs 'SPs or Serlets and refreshes the deployment!
When to $se 1! "eploying small or moderate; si+ed applications to multiple WebLogic Serer instances! >! "eploying small or moderate; si+ed applications to a cluster!
1! "eploying to a single;serer domain! >! "eploying to a cluster on a multi;homed machine! 5! "eploying ery large applications to multiple targets or to a cluster where deployment files are aailable on a shared directory! K! "eploying e6ploded archie directories that you want to periodically redeploy after changing content! ! "eployments that reGuire dynamic update of selected "eployment "escriptors ia the Administration *onsole!
By Bhramaiah
SAM Technologies
&6ternal Stage
[email protected]
The Administration Serer does not copy deployment files! Instead# the Administrator must ensure that deployment files are distributed to the correct staging directory location before deployment With e6ternal stage deployments# the Administration Serer reGuires a copy of the deployment files for alidation purposes! *opies of the deployment files that reside in target serersZ staging directories are not alidated before deployment!
1! "eployments where you want to manually control the distribution of deployment files to target serers! >! "eploying to domains where third;party applications or scripts manage the copying of deployment files to the correct staging directories! 5! "eployments that do not reGuire dynamic update of selected "eployment "escriptors ia the Administration *onsole Enot supported in e6ternal,stage mode! K! "eployments that do not reGuire partial redeployment of application components!
13. &hange weblogic server $evelo%ment "ode to )roduction "ode All serers in a domain run either in deelopment mode or production mode! In general# production mode reGuires you to configure additional security features! For information on the differences between the two modes# refer to O*reating a WebLogic "omain in Dreating WebLogic "omains $sing the Don5iguration WiGard !
To configure all serers in a domain to run in production mode2
1. If you hae not already done so# in the *hange *enter of the Administration *onsole# clic: Loc: &dit Esee $se the *hange *enter! In the left pane of the *onsole# under "omain Structure# select the domain name!
2. 3. Select *onfiguration 9 7eneral and select the Production )ode chec: bo6!
4. *lic: Sae# and then# to actiate these changes# in the *hange *enter# clic: Actiate *hanges! 5. Shut down any serers that are currently running! See Start and stop serers! :. Ino:e the domainZs startWebLogic script! See Starting an Administration S erer with a ;.
Startup Script! The Administration Serer starts in the new mode! If the domain contains )anaged Serers# start the )anaged Serers!
1*. $ifferences between develo%ment domain and %roduction $omain "uring domain creation you can specify the start up mode for your domain either as deelopment mode of production mode! )ost of you who wor: with WebLogic Serer for the past few releases should :now that there are few differences between a deelopment domain and production domain!
"eelopment )ode The default '"Q for deelopment domain is Sun -otspot %ou can use the demo certificates for SSL Auto deployment is enabled Serer instances rotate their log files on startup Admin Serer uses an automatically created boot!properties during startup The default ma6imum capacity for '"(* "atasource is 1 The debugFlag which is used to start the WebLogic Wor:shop "ebugger is enabled
By Bhramaiah
SAM Technologies
[email protected]
Production )ode The default '"Q for production domain is 'Hoc:it If you use the demo certificates for SSL a warning is displayed Auto deployment is disabled Serer instances rotate their log files when it reaches )( Admin Serer prompts for username and password during startup The default ma6imum capacity for '"(* "atasource is > The debugFlag which is used to start the WebLogic Wor:shop "ebugger is disabled In addition to the aboe WebLogic Serer 14gH5 adds a few more default configurations depending on whether the domain is started in deelopment or production mode!
1E. L &ertificate =nstallation BB WebLogic ervers 9 F @ =nstall #our L $igital &ertificate in WebLogic
1. First# download the your,domain,com!pb certificate file from your "igi*ert Account Efrom the O)y *ertificates tab# clic: the order number# then the blue download lin:! 2. Hun the following command to install the certificate file to your :eystore2 :eytool ;import ;trustcacerts ;alias serer ;file your,domain,com!pb ;:eystore your,domain!D:s %ou should get a confirmation stating that the O*ertificate reply was installed in :eystoreIf it as:s if you want to trust the certificate! *hoose y or yes! The installation of this file loads all the necessary certificates to your :eystore! Now you Dust need to configure your serer to use it! &onfiguring the 4e#store for use in WebLogic 1. .n your WebLogic serer# e6pand the OSerers node and choose the serer you w ill be configuring! 2. Ne6t# go to *onfiguration89Qeystores and SSL!Seeral default :eystores or preiously installed :eystores may be displayed under OQeystore *onfiguration! 3. To enable your new :eystore# clic: the O*hange@ lin: under OQeystore *onfiguration!
4. *hoose O*ustom Identity and 'aa Standard Trust as your :eystore configuration type# then clic: *ontinue!
5. $nder O*ustom Identity Qeystore File Name enter the full path to the your,domain!D:s file on :.
your serer! For O*ustom Identity Qeystore Type select j's!
;. The O*ustom Identity Qeystore PassPhrase should be the password you specified when the
8.
:eystore was created!5 @ou have 5orgotten that password @ou will need to begin the process o5 creating @our 'e@store 5rom the beginning. %ou will again be as:ed to enter your :eystore password and confirm!
. *lic: *ontinue# and then Finish! 1. %ou will now need to go bac: under the OSerers node and select the serer you are 11. 12. 13.
14.
configuring! Ne6t# go to *onfiguration89Qeystores and SSL# then clic: the O*hange@ lin: under OQeystore *onfiguration! In the *onfigure SSL page# choose OQey Stores as the method in which identity and trust is stored for the WebLogic serer! Specify the OPriate Qey Alias and OPassphrase that were used when creating your :eystore!If you followed our instructions or used our comm and generator# Oserer is your alias! The passphrase is the :eystore password! *lic: *ontinue# then Finish!Heboot the WebLogic serer! %our :eystore should now be installed and enabled
By Bhramaiah
SAM Technologies
[email protected]
L &onfiguration on WebLogic erver @.2 on solaris 7enerate priate Qey 2 EIdentity Qey
:eytool ;gen:ey ;:eyalg HSA ;alias pri:ey ;:eystore yourdomain;priate!D:s 7enerate *SH certificate 2 :eytool ;certreG ; ;alias pri:ey ;:eystore yourdomain;priate!D:s Send *SH certificate to the SSL Vendor! The Serer certificate# Hoot *A# Intermediate certificate and *A *hain certificate will be sent to you! *ombine three certificates into one certificate in the same order as below 2 Public!cert ESerer *ertificate we receied in the name of number!crt Intermediate!certEIntermediate *ertificate Hoot!cert E Hoot *A *ertificate Sae these three certificates into one file yourdomain!crt Import yourdomain!crt file into yourdomain;priate!D:s :eytool ;import ;alias pri:ey ;file yourdomain!crt ;:eystore yourdomain;priate!D:s ;trustcacerts :eytool ;list ; ;:eystore yourdomain;pr iate!D:s ETo chec: the certificate is impor ted properly or not Import Trust identity ETrusted Hoot certificate :eytool ;import ;alias yourdomain ;file Hoot*A!crt ;:eystore yourdomaintrust!D:s ;trustcacerts :eytool ;list ; ;:eystore yourdomaintrust!D:s E To chec: the certificate is imp orted properly or not Login to WebLogic console 7oto &nironment and select Serers ; E&6ample Serer1! *lic: on QeyStores Tab!
By Bhramaiah
SAM Technologies
[email protected]
Proide the following details under identitiy! Qeystores2 *ustom Identity and *ustom Trust *ustom Identity Qeystore 2 /Path/to/:eystore!D:s *ustom Identity Qeystore 2 D:s *ustom Identity Qeystore Passphrase2 password9 *onfirm *ustom Identity Qeystore Passphrase2 password9 Proide the following details under trust!! *ustom Trust Qeystore2 /Path/to/trust:eystore!D:s *ustom Trust Qeystore Type2 D:s *ustom Trust Qeystore Passphrase2 password9 *onfirm *ustom Trust Qeystore Passphrase2 password9 *lic: on SSL tab
By Bhramaiah
SAM Technologies
[email protected]
*hec: the bo6 named2 &nable SSL Listen port! %our application is SSL readyU 1+.>" basics =nformation.
')S ; 'aa messaging serice! Its used to send reciee messages across serer instances! Its of two types Gueue and topic In _ueue only one consumer can access where as in topic more than one consumer can access! ')S identifies _ueue or Topic based on 'N"I ')S does not hae a :ernel API ')S is actually a serice running on a serer All messages would be dumped into ')S store for persistance If ')S serer is down no failoer of loadbalancing is possible as its a pinned serice In weblogic =/14 Gueue/connection factory are stored in ')S modules! ')S modules are deploymed using subdeployment on the serer .n!message is used to communicate bac: to the publisher in Async method ')S _ueue type Point to Point _ueue2 .nly one receier will receie the message! Publish;Subscript topics decouples producers from consumers A ')S client can use 'TA to participate in a distributed transaction Administratie tas:s ')S 1! *reating and maintiaing ')S serer >! *reate connection factories 5! )onitoring desitinations K! *reating ')S stores
By Bhramaiah
SAM Technologies
[email protected]
! *onfigure thresholds and Guotas M! *onfigur durable subscriptions ! )anage ')S serer failoer ')S configuration is defined by an X)L schema file that conforms to the weblogic;Dmsmd!6sd schema An administrator can ma:e and manage ')S modules as 7lobal System resources 7lobal standalone modules )odule pac:ages as an enterprise application *onnection factory is stored in 'N"I! (y default subscribers are non durable but we can register durable subscriptions 1G.how to view the log file in unix with exam%le ?
This e6ample displays only last 4 lines of /ar/log/messages file! *hange 4 to 144 to display the last 144 lines of the log file! Synta62 tail ;n N FIL&NA)&
< tail ;n 4 /ar/log/messages This is probably one of the most used command by sysadmins!To iew a growing log file and see only the newer contents use tail ;f as shown below! The following e6ample shows the content of the /ar/log/syslog command in real;time! Synta62 tail ;f FIL&NA)&
< tail ;f /ar/log/syslog
&hanging file %ermissions and attributes
chmod file
*hanges the permissions of file to be rw6 for the owner# and r6 for
the group and the world! E ? rw6 ? 111 binary! ? r;6 ? 141 binary chgrp user file
)a:es file belong to the group user!
By Bhramaiah
SAM Technologies
chown cliff file
[email protected]
)a:es cliff the owner of file!
chown ;H cliff dir
)a:es cliff the owner of dir and eerything in its directory tree!
iewing and editing filesB
cat filename
"ump a file to the screen in ascii!
more filename
Progressiely dump a file to the screen2 &NT&H ? one line down
SPA*&(AH ? page down G?Guit less filename i filename emacs filename head filename
Li:e more# but you can use Page;$p too! Not on all systems! &dit a file using the i editor! All $NIX systems will hae i in some form! &dit a file using the emacs editor! Not all systems will hae emacs! Show the first few lines of a file!
head ;n filename Show the first n lines of a file! tail filename
Show the last few lines of a file!
tail ;n filename Show the last n lines of a file!
19. What is there in access log?
The serer access log records all reGuests processed by the serer! The location and content of the access log are controlled by the *ustomLog directie! The LogFormat directie can be used to simplify the selection of the contents of the logs! This section describes how to configure the serer to record information in the access log! The access log file contains ip ad dress of where the reGuest#HeGuest )ethodName#HGuest $HI#Protocol Version Numberand status codes 1=>!1M0!1!B>M/aug/>41120251210210;4M44Jpost/benefits/serlet http/1!1 >44 >MK O 1=>!1M0!1!,,,,,,,,,,,ipaddress where the reGuest getting >M/aug/>41120251210210;4M44J,,,,,,,time stamp when we get the reGuest Post,,,,,,,,,reGuest method Name benefits/serlet,,,,,,,reGuest uri http/1!1,,,,,,,,,,,http protocol number used by the serer >44 >MK,,,,,,,,,,,,,,,,,status codes
By Bhramaiah
SAM Technologies
[email protected]
166,,,,,,,,,,,,,,Information )essage >66,,,,,,,,,,,,,Indicate success 566,,,,,,,,,,redirecting the client K66,,,,,,,,,,,failure due to client 66,,,,,,,,,,,failure due to Serer The location of the access file is 2 &B)rogram Diles!%ache oftware Doundation!%ache2.2logs access IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 1@. What is server log in weblogic ?
The serer log records information about eents such as the startup and shutdown of serers# the deployment of new applications# or the failure of one or more subsystems! The messages include information about the time and date of the eent as well as the I" of the user who initiated the eent! %ou can iew and sort these serer log messages to d etect problems# trac: down the source of a fault# and trac: system performance! %ou can also create client applications that listen for these messages and respond automatically! For e6ample# you can create an application that listens for messages indicating a failed subsystem and sends email to a system adm inistrator! In the left pane of the Administration *onsole# e6pand the Serers folder and select the serer! ESee Figure 4;0! In the right pane# selectB9Logging B9Serer! In the File Name bo6# enter a path and filename for the serer log! &nter an absolute pathname or a pathname that is relatie to the sererYs root directory! If you use the Node )anager to start a )anaged Serer# the root directory is located on the computer that hosts the Node )anager process! For more information# refer to A SererYs Hoot "irectory! For information about including a time stamp in the serer logYs file name# refer to Hotating Log Files! *lic: Apply to apply your changes! Hestart the serer! The serer writes all subseGuent domain messages to the new file! &Bbeauser_%ro5ectsdomainsdev_testservers!dminerverlogs
Log file name is AdminSerer!log4441 -ere !dminerver is the name of the Admin Serer &Bbeauser_%ro5ectsdomainsdev_testserversms2logs
Log file name ms2C -ere ms> is name of the )anaged serer
By Bhramaiah
SAM Technologies
[email protected]
20. $ata ource &onfiguration in weblogic?
"ata sources proide "atabase access and connection management! Steps to create "ata Source 2 1. In Administration *onsole# clic: Loc: F Adit
2. In the $omain tructure tree# e6pand ervices J >$< then select $ata ources! 3. .n the Summary of "ata Sources page# clic: ;ew! 4. &nter below details 2 ;ame # >;$= ;ame # $atabase #%e # $atabase $river then clic: ;ext to continue!
5. In u%%orts lobal ransactions select Kt wo')hase &ommit then clic: next :. &nter below "etails 2 $atabase ;ame # Host ;ame # )ort C $atabase ser ;ame # )assword,&onfirm )assword # *lic: ;ext to continue!
;. For Test "atabase *onnection # clic: est &onfiguration then &lic: ;ext to continue. ! 8. Then *lic: to Dinish finally !ctivate changes! 21.How to de%lo# an a%%lication through command line ? open the shell prompt go to *23bea3wlserer,14!53serer3bin And run setWLS&n!cmd After use weblogic!"eployer to deploy the application Synta6 2 'aa weblogic!"eployer ;adminurl admin url9 ;username username9 ;password password9 ;name ApplicationName9 ;targets target serer or cluster9 ;nostage ;deploy path of the source file9 22. What is " %roblem,memor# lea:Chow to overcome this %roblem? We -ecommend hese -esources )ermanent eneration *lass information is stored in the perm generation! Also constant strings are stored there! Strings created dynamically in your application with String!internE will also be stored in the perm generation! e5lective objects classes methods etc.C are stored in perm. It holds all of the reflectie data for the 'V)
'V) process memory The windows tas: manager Dust shows the memory usage of the Daa!e6e tas:/process! It is not unusual for the total memory consumption of the V) to e6ceed the alue of ;Xm6 )anaged -eap EDaa heap# P&H)# code cache \ Natie-&AP \ Thread)emory ? >7( EPAS on windows *ode;cache contains 'IT code and hotspot code! Thread)emory ? Thread,stac:,si+eNum,threads!)anaged-eap2 )anaged by the deeloper! 'aa heap2 This part of the memory is used when you create new Daa obDects! Perm2 for relfectie calls etc!
By Bhramaiah
SAM Technologies
[email protected]
Natie-eap 2 $sed for natie allocations!Thread)emory2 used for thread allocations!
What you see in the Tas:)anager is the total PAS# while what the profiler shows is the 'aa -eap and the P&H)Eoptionally Platforms
1. 2. 3. 4.
)a6imum PAS
60M / Hedhat Linu6 5> bit
> 7(
60M / Hedhat Linu6 MK bit
5 7(
60M / Win=0/>444/NT/)e/XP
> 7(
60M / Solaris 60M E5> bit
K 7(
5. Sparc / Solaris 5> bit
K 7(
Limits of Vertical scaling If F is the fraction of a calculation that is seGuential Ei!e! cannot benefit from paralleli+ation# and E1 F is the fraction that can be paralleli+ed# then the ma6imum speedup that can be achieed by using N processors is2 1 ;;;;;;;;;;;; AmdahlYs law F \ E1;F/N In the limit# as N ;9 infinity# the ma6imum speedup tends to 1/ F! If F is only 14# the problem can be sped up by only a ma6imum of a factor of 14# no matter how large the alue of N used! So we assume that there is a scope of leeraging benefits of multiple *P$s or multithreading!All right# enough of theory!!!!!!!!!!can it sole my problem A 7* outputs ;erbose2gc This flag starts printing additional lines to the console# li:e gien below 7* MM>4Q ;9 4KQE150K5>Q# 4!4>=KKM secsJ Full 7* KMQ ;9 10=KQE1>M0K0Q# 4!>4K415= secsJ *ombined si+e of lie obDects beforeEyoung\tenured 7* ;9 *ombined si+e of lie obDectsEyoung\tenured after 7* ETotal heap si+e# not counting the space in the permanent generation ;XX2\Print-eapAt7* 2 )ore details ;XX2\Print7*TimeStamps will additionally print a time stamp at the start of each collection! 111!4K>2 7* 111!4K>2 "efNew2 01>0Q;901>0QE01>0Q# 4!44444 secsJ 111!4K>2 Tenured2 101KQ;9>511QE>KMQ# 4!1>=45K secsJ >M>0>Q;9>511QE5>4KQ# 4!1>=554M secsJ The collection starts about 111 seconds into the e6ecution of the application! The tenured generation usage was reduced to about 14 101KQ;9>511QE>KMQ ( hprof output file Daa 8Xrunhprof2heap?sites#cpu?samples#depth?14#thread?y#doe?y
By Bhramaiah
SAM Technologies
[email protected]
The heap?sites tells the profiler to write information about memory utili+ation on the heap# indicating where it was allocated! cpu?samples tells the profiler to do statistical sampling to determine *P$ use! depth?14 indicates the depth of the trace for threads! thread?y tells the profiler to identify the threads in the stac: traces! doe?y tells the profiler to produce dump of profiling data on e6it!
* ;XX2\-eap"ump.n.ut.f)emory&rror ;XX2-eap"umpPath?*23..)!t6t "ump the heap on ..)# and then analy+e the ..)!t6t E(inary file with Dhat tool Ebundled with '"Q The command below will launch http serer Rport ! .pen a browser with the $HL Yhttp2//localhost2Y to see the results! Dhat ;port c23..)!t6t
" Profiling the app Normal 4 %ou can profile the application to figure out )emory Lea:s! 'aa memory lea:s Eor what we li:e to call unintentionall@ retained objects# are often caused by saing an obDect reference in a class leel collection and forgetting to remoe it at the proper time! The collection might be storing 144 obDects# out of which = might neer be used! So in this case those = obDects are creating the memory lea:# since the 7* cannot free them as they are referenced by the collection! There are also other :inds of problems with managing resources that impact performance# such as not closing '"(* Statements/HesultSets in a finally bloc: Emany '"(* driers store a Statement reference in the *onnection obDect! A Daa memory lea: is more li:e holding a strong reference to an obDect though it would neer be needed anymore! The fact that you hold a strong reference to an obDect preents the 7* from deallocating it!! 'aa memory lea:s are obDects that fall into category E>! .bDects that are reachable but not lie can be considered memory lea:s! 'V)PI for Profiling applications gie a high leel of detailing Profilers2 -prof# '*onsole# 'Profiler# AppPerfect# %ourQit# &clipse Profiler# Net(eans Profiler #')P# &6tensible 'aa Profiler E&'P# TomcatProbe# ProfilerKD '*onsole is good for summary leel info# trac:ing the memory footprint# chec:ing Thread deadloc:s etc! It does not proide details of the -eap obDect! For -eap details you may use AppPerfect Elicensed or 'Profiler! & For Natie-eap issues!!!!! 'Hoc:it '"Q Efrom (&A proides better tools than the S$N '"Q to peep inside the 'NI -eapEatleast on Windows!
By Bhramaiah
SAM Technologies
[email protected]
'Hoc:t Huntime Analy+er !!!this is part of the Droc:it install! Drcmd PSI" print,memusage 'H)*!e6e !!!launch from /bin and start recording! r# to get some olutionB (ased on the findings from the diagnosis# you may hae to ta:e these actions2
1. *ode change ; For memory lea: issues# it has to be a code change! 2. 'V) parameters tuning ; %ou need to find the behaior of your app in terms of the ratio of young to old obDects# and then tune the 'V) accordingly! We ll tal: abt when to tune a parameter as we discuss the releant params below! )emory parameters2 )emory Si+e2 oerall si+e# indiidual region si+es ;ms# ;Xms sets the initial heap si+e Eyoung and tenured generation .NL%# N.T Permanent If the app starts with a large memory footprint# then you should set the initial heap to a large alue so that the 'V) does not consume cycles to :eep e6panding the heap! ;m6# ;Xm6 sets the ma6imum heap si+eEyoung and tenured gen .NL%#N.T Perm Edefault2 MKmb This is the most freGuently tuned parameter to suit the ma6 memory reGuirements of the app! A low alue oerwor:s the 7* so that it frees space for new obDects to be created# and may lead to ..)! A ery high alue can stare other apps and induce swapping! -ence# Profile the memory reGuirements to select the right alue! ;XX2PermSi+e?>M ;XX2)a6PermSi+e?>Mm
3.
)a6PermSi+e default alue E5>mb for ;client and MKmb for ;serer Tune this to increase the Permanent gereration ma6 si+e! 7* parameters2 ;Xminf 4;1J# ;XX2)in-eapFreeHatio 4;144J sets the percentage of minimum free heap space ; controls heap e6pansion rate ;Xma6f 4;1J# ;XX2)a6-eapFreeHatio 4;144J sets the percentage of ma6imum free heap space ; controls when the V) will return unused heap memory to the .S ;XX2NewHatio sets the ratio of the old and new generations in the heap! A NewHatio of sets the ratio of new to old at 12# ma:ing the new generation occupy 1/Mth of the oerall heap defaults2 client 0# serer > ;XX2SuriorHatio
sets the ratio of the surior space to the eden in the new obDect area! A SuriorHatio of M sets the ratio of the three spaces to 1212M# ma:ing each surior space 1/0th of the new obDect region arbage &ollector uningB
By Bhramaiah
SAM Technologies
[email protected]
Types of 7arbage*ollectors E not complete list
1. Throughput collector2 Edefault for Serer 'V) parallel ersion of the young generation collector! ;XX2\$seParallel7* The tenured gc is the same as the serial collector Edefault 7* for client 'V)! multiple threads to e6ecute a minor collection application has a large number of threads allocating obDects / large &den ;XX2\$seParallel.ld7* EmaDor also in parallel
2. *oncurrent low pause collector 2 collects the tenured generation and does most of the collection concurrently with the e6ecution of the application! Attempts to reduce the pause times needed to collect the tenured generation ;Xincgc or ;XX2\$se*onc)ar:Sweep7* The application is paused for short periods during the collection! A parallel ersion of the young generation copying collector is used with the concurrent collector! )ultiprocessor apps that hae a relatiely large set of long;lied data Ea large tenured generation Apps where response time is more important than oerall throughput e!g! 'AVA,.PTS? ;Xms1>0) ;Xm614>K) ;XX2NewHatio?1 ;erbose2gc ;XX2\Print7*"etails ;XX2 \Print7*TimeStamps ;Xloggc2&23loggc!t6t FlipSide2 Synchroni+ation oerhead# Fragmentation Performance Solution
1. Application Software profiling 2. Serer and 'V) tuning 3. Hight -ardware and .S 4. *ode improement as per the (ehaiour of your application profiling results@!@! easier said 5.
than done $se 'V) the right way 2 optimal 'V) params
:. *lient / serer application ;. ;XX2\$seParallel7* if u hae multiprocessors ome i%s •
• •
• • •
•
• • •
•
$nless you hae problems with pauses# try granting as much memory as possible to the irtual machine Setting ;Xms and ;Xm6 to the same alue @!but be sure about the application behaiour (e sure to increase the memory as you increase the number of processors# since allocation can be paralleli+ed "onZt forget to tune the Perm generation )inimi+e the use of synchroni+ation $se multithreading only if it benefits! (e aware of the thread oerheads! e!g a simple tas: li:e counter incrementing from 1 to billion !!!!use single thread! )ultiple threads will ruin to mutiple of 14! I tested it out on dual *P$ WinXP with 0 threads! Aoid premature obDect creation! *reation should be as close to the actual place of use as possible! Very basic concept that we tend to oerloo:! 'SPs are generally slower than serlets! Too many custom *Ls# reflection 2 increase Perm generation! "onYt be Perm7en;agnostic! Soft Heferences for memory lea:ages! They enable smart caches and yet do not load memory! 7* will flush out SoftHeferences automatically if the 'V) runs low on memory! String(uffer instead of String concat
By Bhramaiah
SAM Technologies
[email protected]
)inimi+e 'NI calls in your code X)L APIs 8 be careful @SAX or ".); ma:e correct choice! $se precompiled 6paths for better performance of the Gueries! $ifference between 5d: 1.* and 5d:1.E • •
7enerics2 proides compile;time Estatic type safety for collections and eliminates the need for most typecasts Etype conersion! ; )etadata2 also called annotations a llows language constructs such as classes and methods to be tagged with additional data# which can then be processed by metadata;aware utilities! ; Autobo6ing/unbo6ing2 automatic conersions between primitie types Esuch as int and primitie wrapper classes Esuch as integer! ; &numerations2 the enum :eyword creates a typesafe# ordered list of alues Esuch as day!monday# day!tuesday# etc!! Preiously this could only be achieed by non;typesafe constant integers or manually constructed classes Etypesafe enum pattern! ; Swing2 new s:innable loo: and feel# called synth! ; Var args2 the last parameter of a method can now be declared using a type name followed by three dots Ee!g! Void drawte6tEstring!!! Lines! In the calling code any number of parameters of that type can be used and they are then placed in an array to be passed to the method# or alternatiely the calling code can pass an array of that type! ; &nhanced for each loop2 the for loop synta6 is e6tended with special synta6 for iterating oer each member of either an array or any iterable# such as the standard collection classesfi6 the preiously bro:en semantics of the Daa memory model# which defines how threads interact through memory! ; Automatic stub generation for rmi obDects! ; Static imports concurrency utilities in pac:age Daa!util!concurrent! ; Scanner class for parsing data from arious input streams and buffers! ; Assertions ; String(uilder class Ein Daa!lang pac:age ; Annotations 2*.How to chec: the &) utili8ation in ;=/ ? $nder Sun Solaris $NIX Eand other $NIX oses li:e -P;$X and (S" oses you can use following commands to gather *P$ information2 sar 2 System actiity reporter mpstat 2 Heport per;processor or per;processor;set statistics ps / top commands ;=/ sar command exam%les 7eneral synta6 is as follows2 sar t MnN In the first instance# sar samples cumulatie actiity counters in the operating system at n interals of t seconds# where t should be or greater! If t is specified with more than one option# all headers are printed together and the output may be difficult to read! as:B $is%la# toda#Os &) activit#C use sar as:BWatching s#stem activit# evolve i.e. re%orts &) tili8ation sar ;u 1> Where# 'u 12 E 2 *omparison of *P$ utili+ation 1> seconds apart times! ut%ut includesB •
1. Pusr2 $ser time E of *P$ 2. Ps#s2 System time E of *P$
By Bhramaiah
SAM Technologies
[email protected]
3. Pwio2 Percent of *P$ running idle with a process waiting for bloc: I/. 4. Pidle2 Percent of *P$ that is id le as:B ou can watch &) activit# evolve for 10 minutes and save data sar ;o file;name M4 14 as:B ou can 5ust sar and logout and let the re%ort store in files nohup sar ;A ;o output;file M4 14 19/de/null >91 Note to display data stored in output;file pass ;f option to sar command2 sar ;f output;file ;=/ m%stat exam%le Type the following command to display per;processor statistics 1> seconds apart times mpstat 1> %ou can also use traditional ps and top command2 top ps ;e ;o pcpu ;o pid ;o user ;o args 2E. How to chec: the dis: s%ace in ;=/? A Guic: way to get a summary of the aailable and used dis: space on your Linu6 system is to type in the df command in a terminal window! The command df stands for dis: f ilesystem! With the ;h option Edf ;h it shows the dis: space in human readable form# which in this case means# it gies you the units along with the numbers!
The du command on the other hand shows the dis: space used by the files and directories in the current directory! Again the ;h option Edf ;h ma:es the output easier to comprehend! Type df ;h or df ;: to list free dis: space2 < df ;h .H < df 8: .utput2 Filesystem /de/sdb1
Si+e
$sed Aail $se )ounted on
>47
=!>7
arrun
5=5)
1KK:
arloc:
5=5)
4
procbususb ude deshm
5=5) 5=5) 5=5)
=!M7 K= / 5=5)
5=5)
1>5:
1 /ar/run 4 /ar/loc:
5=5)
1 /proc/bus/usb
1>5:
5=5)
1 /de
4
5=5)
4 /de/shm
2+.What is ;odemanager and what is use of it?
By Bhramaiah
SAM Technologies
[email protected]
Node )anageris Weblogic Serer utility to start# stop and restartAdministration and )anaged Serer Instances from remote location E There are other ways as well to start/stop Weblogic chec: here ; Node )anager is optional component! 1! Node )anager Process is associated with a )achine and N.T with specific Weblogic "omain Ei!e! $se one node manager for multiple domains on same machine >! There are two ersions of Node )anager ; 'aa;based and Script;based 'aa;based node manager ; runs with in 'V) E'aa Virtual )achine Process and more secure than script;based node manager! *onfiguration for Daa;based node manager are stored in nodemanager!properties Script;based node manager ; is aailable for Linu6 and $ni6 systems only and is based on shell script! 5! There are multiple ways to access Node )anager ; From Administration *onsole 2 &nironments ;9 )achines ;9 *onfiguration ;9 Node )anager ; ')X utilities E'aa )anagement eXtension more here ; WLST commands EWebLogic Scripting Tool K!"efault port on which node manager listen for reGuests is localhost2M# When you configure Node )anager to accept commands from remote systems# you must uninstall the default Node )anager serice# then reinstall it to listen on a non;localhost EIPZs other than 1>!4!4!1 listen address! ! Any domain created before creation of Node )anager Serice will not be accessible ia node )anagerEeen after restarting node manager# solution is to run the WLST command Onm&nroll to enroll that domain with the Node )anager! M! Any domains created after the Node )anager serice has been installed should not hae to be enrolled against the Node )anager! The Node )anager should automatically be ]reachable] by the domain! -ow to *onfigure Node )anager 1!*onfigure each computer Eon which you wish to use Node )anager as a )achine in WebLogic
By Bhramaiah
SAM Technologies
[email protected]
Serer &nironments ;9 )achines ;9 New EAdd )achine $se Lin: here &nironments ;9 )achines ;9 )achine Name Ecreated aboe ;9 *onfiguration ;9 Node )anager >! Assign each serer instance EAdmin or )anaged that you wish to control with Node )anager to )achine! &nironments ;9 )achines ;9 )achine Name Ecreated aboe ;9 *onfiguration ;9 Serers ;9 Add EAdd Serer running on this node which you would li:e to monitor using Node )anager for more info *lic: here 5! &nroll domain Ecreated before installation of Node )anager to Node )anager Windows cd <(&A,-.)&3user,proDects3domains3domain,name93bin set"omain&n!cmd Daa weblogic!WLST wls9 connectEZweblogicZ#YweblogicZ# ]t52//mymachine!mydomain2441^ wls9 nm&nrollEZ*23bea3user,proDects3domains/domainName9Z# ]*23bea3wlserer,ersion9/common/nodemanagerZ $ni6 /Linu6 cd <(&A,-.)&/user,proDects/domains/domain,name9/bin/ ! set"omain&n!sh Daa weblogic!WLST wls9 connectEZweblogicZ#YweblogicZ# ]t52//mymachine!mydomain2441^ wls9 nm&nrollEZ<(&A,-.)&/user,proDects/domains/domain,name9Z# ]<(&A,-.)&/wlserer,ersion9/common/nodemanagerZ where Omymachine!mydomain2441 is the reference to the Admin Serer of the domain to which the serer and machine definition belongs -ow to start Node )anager
By Bhramaiah
SAM Technologies
[email protected]
Node )anager Log Files
If the ping times are higher than you e6pect# then you should start to get some basic statistics about the networ: interface you are using to see if the problem is related to the networ: interface# or a specific protocol! $nder Linu6# you can get some basic networ: statistic information by using the ifconfig tool Esee Listing ! Listing G. etting basic networ: statistic information using the ifconfig tool < ifconfig eth1 eth1 Lin: encap2&thernet -Waddr 4421a2ee2412412c4 inet addr21=>!1M0!4!> (cast21=>!1M0!5!> )as:2>!>!>>!4 inetM addr2 fe0422>1a2eeff2fe4121c4/MK Scope2Lin: $P (H.A"*AST H$NNIN7 )$LTI*AST )T$2144 )etric21 HX pac:ets2=1M05M errors24 dropped20K0= oerruns24 frame24 TX pac:ets2M>0KM errors24 dropped24 oerruns24 carrier24 collisions24 t6Gueuelen21444 HX bytes211M4=>5= E14!0 7i( TX bytes2014>4>4 EK! )i( Interrupt21M (ase address246>444 The important rows are those beginning HX and TX# which show information about the pac:ets sent and receied! The pac:ets alue is a simple count of the pac:ets transferred! The errors# dropped# and oerruns figures show how many of the pac:ets indicated some :ind of fault! A high number of dropped pac:ets in comparison to the pac:ets sent probably indicate that the networ: is busy! %ou can also get e6tended statistic information on all platforms by using the netstat tool! $nder Linu6# the tool proides more specific base protocol statistics# such as the pac:et transmissions for T*P;IP and $"P pac:et types! Again# the information contains some basic statistics Esee Listing 0! Listing 9. sing netstat
< netstat ;s Ip2 0K550 total pac:ets receied 1 with inalid addresses 4 forwarded 4 incoming pac:ets discarded 0K5505 incoming pac:ets deliered M0>4=5K reGuests sent out M reassemblies reGuired 5 pac:ets reassembled o: Icmp2 4> I*)P messages receied 5 input I*)P message failed! I*)P input histogram2 destination unreachable2 K14 echo reGuests2 0> echo replies2 14 1K4M I*)P messages sent 4 I*)P messages failed I*)P output histogram2 destination unreachable2 1515 echo reGuest2 11
By Bhramaiah
SAM Technologies
[email protected]
echo replies2 0> Icmp)sg2 InType42 14 InType52 K14 InType02 0> .utType42 0> .utType52 1515 .utType02 11 Tcp2 05M1 actie connections openings M0KM passie connection openings 1 failed connection attempts 1MK connection resets receied 55 connections established 0545M1 segments receied MM005 segments send out MK4 segments retransmitted 4 bad segments receied! MM resets sent $dp2 1>M405 pac:ets receied 1>=K pac:ets to un:nown port receied! 4 pac:et receie errors 15455 pac:ets sent $dpLite2 Tcp&6t2 pac:ets pruned from receie Gueue because of soc:et buffer oerrun M=> T*P soc:ets finished time wait in fast timer M01 delayed ac:s sent _uic: ac: mode was actiated 11M5 times 140M1 pac:ets directly Gueued to recmsg preGueue! K555 bytes directly in process conte6t from bac:log =1K100> bytes directly receied in process conte6t from preGueue 5M40>K pac:et headers predicted K>M> pac:ets header predicted and directly Gueued to user 15> ac:nowledgments not containing data payload receied 5K14 predicted ac:nowledgments > times recoered from pac:et loss by selectie ac:nowledgements congestion windows recoered without slow start after partial ac: 1 T*P data loss eents 1 timeouts after SA*Q recoery > fast retransmits 0 retransmits in slow start >5M other T*P timeouts 1K5 pac:ets collapsed in receie Gueue due to low soc:et buffer 11M5K "SA*Qs sent for old pac:ets > "SA*Qs sent for out of order pac:ets > "SA*Qs receied connections reset due to une6pected data 4 connections aborted due to timeout T*P"SA*QIgnoredNo$ndo2 1 T*PSac:ShiftFallbac:2 >5 Ip&6t2 In(castP:ts2 K1>M
$nder Solaris and other $NIX ariants# the information proided by netstat differs depending upon the platform! For e6ample# under Solaris# you get detailed statistics for each protocol# and separate
By Bhramaiah
SAM Technologies
[email protected]
information for IPK and IPM connections Esee Listing =! The output in the listing has been truncated! Listing @. sing netstat on olaris < netstat ;s HAWIP rawipIn"atagrams ? KK4 rawipIn&rrors rawipIn*:sum&rrs ? 4 rawip.ut"atagrams rawip.ut&rrors ? 4
? 4 ? =1
$"P
udpIn"atagrams udp.ut"atagrams
? ?
T*P
tcpHtoAlgorithm ? K tcpHto)in ? K44 tcpHto)a6 ? M4444 tcp)a6*onn ? ;1 tcpActie.pens ? 15 tcpPassie.pens ? K tcpAttemptFails ? > tcp&stabHesets ? 5 tcp*urr&stab ? > tcp.utSegs ?15105= tcp.ut"ataSegs ?15=>0 tcp.ut"ata(ytes ?1MK00MM0M tcpHetransSegs ? =4>1 tcpHetrans(ytes ?1545K4>5 tcp.utAc: ?115= tcp.utAc:"elayed ? 4 tcp.ut$rg ? 4 tcp.utWin$pdate ? 51 tcp.utWinProbe ? 0M tcp.ut*ontrol ? 54 tcp.utHsts ? M5 tcp.utFastHetrans ? M tcpInSegs ?K0>4 tcpInAc:Segs ?>00>4>M tcpInAc:(ytes ?1MK00K=44 tcpIn"upAc: ?KK1541M tcpInAc:$nsent ? 4 tcpInInorderSegs ?K144 tcpInInorder(ytes ?5M05>MKM tcpIn$norderSegs ? M4 tcpIn$norder(ytes ?1450=1M tcpIn"upSegs ? >>> tcpIn"up(ytes ? KMK= tcpInPart"upSegs ? 4 tcpInPart"up(ytes ? 4
? 1M ? 1M1
udpIn&rrors udp.ut&rrors
4 4
In all cases# you are loo:ing for a high leel of error pac:ets# retransmissions# or dropped pac:et transmission# all of which indicate that the networ: is busy! If the error rate is e6cessiely high compared to the pac:ets transmitted or receied# then it may indicate a fault with the networ: hardware! 30.what is &ertificate ignature -eQuest ?
%ou must submit your reGuest in a particular format called a *ertificate Signature HeGuest E*SH! WebLogic Serer includes a *ertificate HeGuest 7enerator serlet that creates a *SH! The *ertificate HeGuest 7enerator serlet collects information from you and generates a priate :ey file and a certificate reGuest file! %ou must then submit the *SH ! (efore you can use the *ertificate HeGuest 7enerator serlet# WebLogic Serer must be installed and running! Start the *ertificate HeGuest 7enerator serlet Ecertificate!war! The !war file is automatically installed when you start WebLogic Serer! In a Web browser# enter the $HL for the *ertificate HeGuest 7enerator serlet as follows2 https2//hostname2port/*ertificate hostname is the "NS name o f the machine running WebLogic Serer! port is the number of the port at which WebLogic Serer listens for SSL connections!
By Bhramaiah
SAM Technologies
[email protected]
For e6ample# if WebLogic Serer is running on a machine named Networ:ingKall and it is configured to listen for SSL communications at the default port 44> to run the *ertificate HeGuest 7enerator serlet# you must enter the following $HL in your Web browser2 https2//Networ:ingKall244>/certificate The *ertificate HeGuest 7enerator serlet loads a form in your web browser! *omplete the form displayed in your browser! *lic: the 7enerate HeGuest button! The *ertificate HeGuest 7enerator serlet d isplays messages informing you if any reGuired fields are empty or if any fields contain inalid alues! *lic: the (ac: button in your browser and correct any errors! Note2 Priate Qey Password If you donYt not specify a password# you will get an unencyrpted HSA priate :ey! If you specify a password# you will get a PQ*S;0 encrypted priate :ey! When using PQ*S;0 encrypted priate :eys# you need to enable the $se &ncrytped Qeys field on the SSL tab of the Serer window in the Administration *onsole! When all fields hae been accepted# the *ertif icate HeGuest 7enerator serlet generates the following files in the startup directory of your WebLogic Serer2 mydomain,com;:ey!der;The priate :ey file! The name of this file should go into the Serer Qey File Name field on the SSL tab in the Administration *onsole! mydomain,com;reGuest!dem;The certificate reGuest file# in binary format! mydomain,com;reGuest!pem;The *SH file that you submit!! It contains the same data as the !dem file but is encoded in AS*II so that you can copy it into email or paste it into a Web form! 31.What netstat &ommand ? netstat is a useful tool for chec:ing your networ: configuration and actiity! It is in fact a collection of seeral tools lumped together! We discuss each of its functions in the f ollowing sections! When you ino:e netstat with the 8r flag# it displays the :ernel routing table in the way weYe been doing with route! .n stout# it produces2 netstat 'nr Qernel IP routing table "estination 7ateway 7enmas: Flags )SS Window irtt Iface 1>!4!4!1 >!>!>!> $44 4 lo 1>!1M!1!4 >!>!>!4 $ 44 4 eth4 1>!1M!>!4 1>!1M!1!1 >!>!>!4 $7 44 4 eth4
The 8n option ma:es netstat print addresses as dotted Guad IP numbers rather than the symbolic host and networ: names! This option is especially useful when you want to aoid address loo:ups oer the networ: Ee!g!# to a "NS or NIS serer!
The second column of netstat Ys output shows the gateway to which the routing entry points! If no
gateway is used# an asteris: is printed instead! The third column shows the Ogenerality of the route# i!e!# the networ: mas: for this route! When gien an IP address to find a suitable route for# the :ernel steps through each of the routing table entries# ta:ing the bitwise AN" of the address and the genmas: before comparing it to the target of the route! The fourth column displays the following flags that describe the route2 7 ;;;;;;
The route uses a gateway!
By Bhramaiah
SAM Technologies
$ ;;;;;;
[email protected]
The interface to be used is up!
- ;;;;;; .nly a single host can be reached through the route! For e6ample# this is the case for the loopbac: entry 1>!4!4!1! " ;;;;;; This route is dynamically created! It is set if the table entry has been generated by a routing daemon li:e gated or by an I*)P redirect message Esee the section Section >! in *hapter >! ) ;;;;;; This route is set if the table entry was modified by an I*)P redirect message! U ;;;;;; The route is a reDect route and datagrams will be dropped! 33. What is !"! command in solaris ?
mstat ; report irtual memory statistics
;)= mstat ;cisS J dis's J interval count J J
mstat deles into the system and reports certain statistics :ept about process# irtual memory# dis:# trap and *P$ actiity! Note2 mstat statistics are only supported for certain deices!
Without options# mstat displays a one;line summary of the irtual memory actiity since the system was booted! If interval is specified# mstat summari+es actiity oer the
last interval seconds# repeating foreer! If a count is gien# the statistics are repeated count times! Note2 interval and count do not apply to the ;i and ;s options!
If dis's are specified# they are gien priority when mstat chooses which dis:s to display Eonly four fit on a line! *ommon dis: names are id# sd# 6d# or 6y# followed by a number# for e6ample# sd># 6d4# and so forth! For more gen; eral system statistics# use sarE1# iostatE1)# or sarE1)!
;c
Heport cache flushing statistics! (y default# report
By Bhramaiah
SAM Technologies
[email protected]
the total number of each :ind of cache flushed since boot time! The types are2 user# conte6t# region# seg; ment# page# and partial;page!
;i
Heport the number of interrupts per deice!
;s
"isplay the total number of arious system eents since boot!
;S
Heport on swapping rather than paging actiity!
This
option will change two fields in mstatYs pagingYY display2 rather than the reYY and mfYY fields# mstat will report siYY Eswap;ins and soYY Eswap;
outs!
3*.How do #ou find out %ort numbers in linux?
In linu6 we hae commands lsof ;i T*P Edisplays online open tcp ports lsof ;i $"P aboe commands wor: for linu6 only netstat ;anp C head ;>4 nmap ;anp E if the nmap utility is installed in linu6 system thru netstat only we can get much of the information regarding the open ports 3E. What are the difference between authentication and authori8ation ?
Authentication An authentication system is how you identify yourself to the computer! The goal behind an authentication system is to erify that the user is actually who they say they are! There are many ways of authenticating a user!Li:e Password based authentication "eice based authentication (iometric Authentication
By Bhramaiah
SAM Technologies
[email protected]
Authori+ation .nce the system :nows who the user is through authentication# authori+ation is how the system decides what the user can do! A good e6ample of this is using group permissions or the difference between a normal user and the superuser on a uni6 system!
3+. !%%lication is wor:ing but $< is not su%%oting what :ind of exce%tion #ou will get?
.HA;1>4#TNS2Listener does not currently :now of SI" gie in connect descriptor The connection "escriptor used by the client was 1=>!1M!>>1!>>K21>126e
1=>!1M!>>1!>>K;;;;;;ip address of database running system 1>1;;;;;;;port number Xe;;;;;;database serice name or schema name
Weblogic!application!)odule&6ception2 At weblogic!Ddbc!module!'"(*)odule!prepare'"(*)odule!Daa>0=9
3@. $isabling and Anabling !dmin &onsole
)any at times for most of our administration wor: including the changes Edeployments# start/stop of serers# etc or configurations E')S# creation/deletion/editing of our serers# etc we use our weblogic admin console! (ut# for security reasons some of the ban:ing companies for its core ban:ing applications prefer to disable the admin console in its ban:ing applications!
By Bhramaiah
SAM Technologies
[email protected]
This short and sweet article mainly targets to present you on how to enable and disable your admin console2 "isabling your Admin *onsole2 We can disable our weblogic admin console in two different ways 1
Admin console
>
Weblogic Scripting Tool
From Admin console2; To disable access to the Administration *onsole2
1. After you log in to admin console clic: Loc: &dit! 2. In the left pane of the *onsole# under "omain Structure# select the domain name! 3. Select *onfiguration 9 7eneral# and clic: Adanced at the bottom of the page! 4. "eselect *onsole &nabled! 5. *lic: Sae! :. To actiate these changes# clic: Actiate *hanges! From WLST2; connect6Kweblogic KCweblogic KCt3://localhost:7001K7 edit67 startAdit67 cmo.set&onsoleAnabled6false7 save67 activate67 disconnect67 exit67
&nabling the Admin *onsole2 After we disable the admin console we can enable it again by using WLST! Following are the steps on the same2 connect6Kweblogic KCweblogic KCt3://localhost:7001K7 edit67 startAdit67 cmo.set&onsoleAnabled6true7 save67
By Bhramaiah
SAM Technologies
[email protected]
activate67 disconnect67 exit67 *0.how to findout the a%%lication status using WL?
connectEYweblogicY#YweblogicY#Yt52//localhost20441Y domainHuntimeE cdEYAppHuntimeStateHuntime/AppHuntimeStateHuntimeY AppList ? cmo!getApplicationIdsE print Y Application Application State3nY print Y3nY for App in AppList2 print YY#App #Y Y# cmo!getIntendedStateEApp print Y3nY *1.How to find out the server status using WL?
username ? YweblogicY password ? YweblogicY $HL?Yt52//localhost20441Y connectEusername#password#$HL domainHuntimeE cdEYSererHuntimesY serers?domainHuntimeSerice!getSererHuntimesE for serer in serers2
sererName?serer!getNameE print YY print Y
sererName
Y
print YY print Y Serer State
Y# serer!getStateE
print Y Serer ListenAddress Y# serer!getListenAddressE print Y Serer ListenPort
Y# serer!getListenPortE
By Bhramaiah