Showing posts with label weblogic admin. Show all posts
Showing posts with label weblogic admin. Show all posts

Tuesday, February 17, 2015

Weblogic Clusters basics -I

A WebLogic Server cluster consists of multiple WebLogic Server server instances running simultaneously and working together to provide increased scalability and reliability. A cluster appears to clients to be a single WebLogic Server instance. The server instances that constitute a cluster can run on the same machine, or be located on different machines. You can increase a cluster’s capacity by adding additional server instances to the cluster on an existing machine. Each server instance in a cluster must run the same version of WebLogic Server.




A WebLogic Server cluster provides these benefits:

   Scalability

     You can add server instances to a cluster without interruption of service—the application continues to run without impact to clients and end users.
   

High-Availability

    In a WebLogic Server cluster, application processing can continue when a server instance fails. You “cluster” application components by deploying them on multiple server instances in the cluster—so, if a server instance on which a component is running fails, another server instance on which that component is deployed can continue application processing.


How Failover works on cluster:

 WebLogic Server maintains information about state using techniques called session replication and replica-aware stubs. When a particular object unexpectedly stops doing its job, replication techniques enable a copy of the object pick up where the failed object stopped, and finish the job.

How Loadbalancing works on cluster:

Load balancing is the even distribution of jobs and associated communications across the computing and networking resources in your environment. For load balancing to occur:
  • There must be multiple copies of an object that can do a particular job.
  • Information about the location and operational status of all objects must be available.
    WebLogic Server allows objects to be clustered—deployed on multiple server instances—so that there are alternative objects to do the same job. WebLogic Server shares and maintains the availability and location of deployed objects using unicast, IP sockets, and JNDI.

 Different types of objects can clusterd below is the list and how:


Web applications can consist of different types of objects, including Enterprise JavaBeans (EJBs), servlets, and Java Server Pages (JSPs). Each object type has a unique set of behaviors related to control, invocation, and how it functions within an application. For this reason, the methods that WebLogic Server uses to support clustering—and hence to provide load balancing and failover—can vary for different types of objects. The following types of objects can be clustered in a WebLogic Server deployment:

    Servlets

    JSPs

    EJBs

    Remote Method Invocation (RMI) objects

    Java Messaging Service (JMS) destinations


Different object types can have certain behaviors in common. When this is the case, the clustering support and implementation considerations for those similar object types may be same. In the sections that follow, explanations and instructions for the following types of objects are generally combined:

    Servlets and JSPs

    EJBs and RMI objects


Servlets and JSPs

WebLogic Server provides clustering support for servlets and JSPs by replicating the HTTP session state of clients that access clustered servlets and JSPs. WebLogic Server can maintain HTTP session states in memory, a file system, or a database.



  • In-memory replication
    Using in-memory replication, WebLogic Server copies a session state from one server instance to another. The primary server creates a primary session state on the server to which the client first connects, and a secondary replica on another WebLogic Server instance in the cluster. The replica is kept up-to-date so that it may be used if the server that hosts the servlet fails.


JDBC-based persistence
In JDBC-based persistence, WebLogic Server maintains the HTTP session state of a servlet or JSP using file-based or JDBC-based persistence.

Thursday, February 12, 2015

How to configure remote managed server from Admin server

First we need to create base weblogic installation using wls12**.jar

After this steps completed, we need to go back and get template(basic folder structurs and related modules) from your domain,which you will get from pack.sh command.

Pack.sh -->  This command locates under MW_HOME/common/bin  directory.

on your Admin server, you need to create template of your domain using pack command.

ex:

./pack.sh -managed=true -domain=/root/Oracle/Middlewre/user_projects/domains/testdomain -template=/root/Oracle/mydomain_template.jar -template_name="My Managed Server Domain" 




now you need to copy this template jar into your  remote machine using scp command.
scp mydomain_template.jar root@192.168.12.13:/root/Oracle .
 
next step you need to create domain directory structure using unpack command.
./unpack.sh -domain=/root/Oracle/Middleware/user_projects/domains/testdomain -template=/root/Oracle/mydomain_managed.jar

that's it.From next step onwards you can startnodemanager script on remote machine and you can create managed server using remote server. 



Tuesday, April 15, 2014

Linux commands: Useful for Weblogic administration




1) How to check list of available files on directories

ls      ---- list of files
ls -l    --- Long list files
ls -ltr  ---- for latest files will comes last

2) How to know current working directory?

pwd

ex:
root@localhost Desktop]# pwd
/root/Desktop



3) How to check file system size

df -h

ex:
root@localhost Desktop]# pwd
/root/Desktop


4) How to check disk utilization

du -sh

5) Copy command

cp sourcefile destinationfile

6) move command
mv sourcefile destinationfile


Also Check for Latest Videos on Weblogic training tutorials videos here:

7) change permission

CHMOD can also to attributed by using Numeric Permissions:
400 read by owner
040 read by group
004 read by anybody (other)
200 write by owner
020 write by group
002 write by anybody
100 execute by owner
010 execute by group
001 execute by anybody

more info: http://www.linux.org/threads/file-permissions-chmod.4094/

8) Change ownership permissions:

chown username:groupname file/directory

more info: http://www.cyberciti.biz/faq/how-to-use-chmod-and-chown-command/

9) If you want to change some parameter in a file using sed:

sed -i s/oldparameter/newparameter/g filename

10) killing some process id:

kill -9 pid

pid: process id

11) How to update Local file system hierarchy ?
dbupdate

12) How to find any files using some pattern?

locate test.txt
locate test
locate jdk_

13). How to check running java process?

ps command
ex: ps -ef | grep java

14). How to check running jvm process port number?

netstat -tulnp | grep  java

15) How yo create Linux user?

   useradd username
ex: useradd test

16) How to delete linux user?

   userdel username
ex: userdel test

17)  uptime  --- To know system load and server running time from server start.

ex:

localhost ~]# uptime
 16:48:27 up 8 min,  3 users,  load average: 0.07, 0.18, 0.13
[root@localhost ~]#


18)  top  ---  To know linux system tasks.

localhost ~]# top
top - 16:50:19 up 10 min,  3 users,  load average: 0.06, 0.14, 0.13
Tasks: 147 total,   1 running, 142 sleeping,   4 stopped,   0 zombie
Cpu(s):  0.0%us,  0.3%sy,  0.0%ni, 58.5%id, 41.2%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   1011428k total,   486260k used,   525168k free,    45816k buffers
Swap:  2031612k total,        0k used,  2031612k free,   161472k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2452 root      20   0 98.1m 4332 3356 S  0.7  0.4   0:00.23 sshd
   10 root      20   0     0    0    0 S  0.3  0.0   0:03.13 rcu_sched
 2077 root      20   0 45148  764  440 S  0.3  0.1   0:00.05 udisks-daemon
 2516 root      20   0 15080 1236  904 R  0.3  0.1   0:00.19 top
    1 root      20   0 19416 1540 1232 S  0.0  0.2   0:01.64 init
    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd
    3 root      20   0     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0
    5 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 kworker/0:0H
    6 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kworker/u:0
    7 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 kworker/u:0H
    8 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0
    9 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rcu_bh
   11 root      RT   0     0    0    0 S  0.0  0.0   0:00.01 watchdog/0


19)  history --- You will get history of your previous commands.

ex:

[root@localhost ~]# history
    1  useradd testuser
    2  passwd testuser
    3  uptime
    4  man top
    5  top
    6  man top
    7  clear
    8  history
[root@localhost ~]

20) how to run a shell script as back ground process?

Ans)  ./test.sh &
if you give a shell script after space and give '&' symbol, then this script will run on as background
process.


21) If you want to run a shell script as background  process and also if you want to collect output from running shell script, how to it?

Ans)  nohup ./test.sh &
nohup is a command to collect all your shell script related output to save into "nohup.out" file. This
file will be located on same directory, once you execute this command.

22) Crontab command  ?

Crontab is useful to schedule any jobs from your linux server.

checking how many jobs currently running on your linux box/server:

->crontab -l

Checking jobs based on user on your server:
->crontab -l -u testuser

Adding cronjob using:

-> crontab -e

Adding Cronjob using user:

-> cronjob -e -u testuser

how to add parameters into crontab:




You can edit on crontab like this:
 
 
30 08 10 06 * /home/test/test.sh
  • 30 – 30th Minute
  • 08 – 08 AM
  • 10 – 10th Day
  • 06 – 6th Month (June)
  • * – Every day of the week
 or

On below example, i want to daily nullify (removing content from test.log file) test.log file at 11pm.
ex:
*     23   *    *       >/root/test.log


Note: While editing under crontab, for each option you need to provide TAB button (you will get from your keyboard) space.