Pages - Menu

Showing posts with label Server Configuration. Show all posts
Showing posts with label Server Configuration. Show all posts

pack & unpack domain

Thursday, July 25, 2013

Execute Following command under $WL_HOME/common/bin dir to pack domain

pack.sh  –managed=true –domain=<domain name> -template=<domain_name.jar> -template_name=”<description>”

For example if you want to pack domain mydomain :-

pack.sh  –managed=true –domain=mydomain -template=mydomain.jar -template_name=”mydomain template”nt

Now copy the jar file under some location in another machine where we have to unpack it. For unpacking 

execute following command under $WL_HOME/common/bin

unpack.sh –domain=<domain name> -template=<jar file name>

For example if you want to pack domain mydomain :-




unpack.sh –domain=mydomain  -template=mydomain.jar

Updating the AIA Configuration with the new host name/ip.

  1. Navigate to <AIA_INSTANCE>/AIAMetaData/config folder and edit the AIAConfigurationProeprties.xml file to modify the following property
  2. <Property name="EH.JNDIURL">t3://<existing list of soa server details>,<newsoa server host>:<newsoa server port></Property>
  3. Navigate to <AIA_INSTANCE>/config folder and open the AIAInstallProperties.xml file. Add the following information under the "/properties/fp/server/jndi-url" tag.

  4.  
    <jndiurl>t3://<existing list of soa server details>,<newsoa server host>:<newsoa server port></jndiurl>
     
  5. Start the new Node. When you start the new node, you notice errors pertaining to Foundation Pack in the server logs. Ignore them for now.

  6.  
  7. Navigate to <AIA_HOME>/aia_instances/<instance name>/bin and source aiaenv.sh/bat.

  8.  
  9. Navigate to <AIA_HOME>/Infrastructure/Install/AID and execute the following command.
ant -f AIAInstallDriver.xml -DDeploymentPlan=<AIA_HOME>/Infrastructure/Install/config/FPAddNodeToClusterDP.xml -DPropertiesFile=<AIA_HOME>/aia_instances/<instance name>/config/AIAInstallProperties.xml

Scaling up SOA cluster

Steps for configuration changes:
  • Adding the server to the cluster
  • Configuring the memory arguments for the server.
  • Adding the hostname/ip address in the OHS config file.
  • Configuring JMS for the new soa server.
  • Configuring UMS driver properties in Em console for new soa server.
  • Updating the AIA Configuration with the new host name/ip.
Adding the server to the cluster
    1. Click New to add new managed server.
           
             2.    Specify the server details.




             3.   Click on finish to create new soa server to the cluster.



                4.    Finally add the machine name for the new soa server to communicate with the node manager.

Trying to Start a Weblogic Admin Server or Managed Server via a Service on 64bit Windows Fails with "Unable to Find a JVM"

Wednesday, July 24, 2013

If the service was created successfully and however when attempting to start the service, the following window is shown:

The beasvc <Domain>_<ServerName> service on Local Computer started and then stopped. Some services stop automatically  if they have no work to do, for example, the Performance Logs and Alerts service.

Assuming the -log parameter was specified when creating the service as per the note, the <ServerName>-stdout.txt file shows the following:


[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszCmdLine = -client -Xms32m -Xmx200m -XX:MaxPermSize=128m -XX:+UseSpinning  -Xverify:none  -da -Dplatform.home=C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3 -Dwls.home=C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3\server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\Oracle\AS11\MIDDLE~1\patch_wls1033\profiles\default\sysext_manifest_classpath -Xverify:none -classpath etc....
......
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszJavaHome = C:\Oracle\JDK6-64
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszExecDir = C:\Oracle\AS11\MiddlewareStand\user_projects\domains\Test_Domain
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszOldPath = C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszNewPath = C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3\server\native\win\x64\;C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3\server\bin;C:\Oracle\JDK6-64\jre\bin;C:\Oracle\JDK6-64\bin;C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3\server\native\win\x64\oci920_8;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszDelay = 0
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszStopClass = []
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszLog = [C:\Oracle\AS11\MiddlewareStand\user_projects\domains\Test_Domain\servers\AdminServer\logs\AdminServer-stdout.txt]
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] Thread created successfully
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] Reporting SCM of SERVICE_START_PENDING with delay=0
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszHost = []
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] lpszPort = []
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] Reporting SCM of SERVICE_RUNNING
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] waiting for multiple events
[Fri Jul 23 11:12:01 2010] [E] [StartJVM] Unable to fine a JVM
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] done waiting for multiple events. Wait=1
[Fri Jul 23 11:12:01 2010] [E] [ServiceStart] Error in JVM. Cause=Unable to find a JVM!
[Fri Jul 23 11:12:01 2010] [I] [ServiceStart] Informing SCM about SERVICE_STOP

CAUSE :

The service is attempting to start Weblogic with the JAVA_OPTION "-client", for example from the log:

 lpszCmdLine = -client -Xms32m -Xmx200m -XX:MaxPermSize=128m -XX:+UseSpinning  -Xverify:none  -da -Dplatform.home=C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3 -Dwls.home=C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=C:\Oracle\AS11\MIDDLE~1\WLSERV~1.3\server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=C:\Oracle\AS11\MIDDLE~1\patch_wls1033\profiles\default\sysext_manifest_classpath -Xverify:none -classpath

On 64bit Windows for the Service to start the WLS Server, the "-server" option should be used


SOLUTION :

Either edit the existing Registry Entry:

1. Select the Windows "Start" -> "Run" -> "regedit"
2. In the Registry Editor, navigate to: HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/beasvc <Domain_ServerName>/Parameters
3. Double Click on the "CmdLine" variable and change the "value data" from "-client" to "-server". For example change:

-client -Xms32m -Xmx200m -XX:MaxPermSize=128m etc..


to:

-server -Xms32m -Xmx200m -XX:MaxPermSize=128m etc..
or if using JRockit JDK:

-jrockit -Xms32m -Xmx200m -XX:MaxPermSize=128m etc..

4. Attempt to start the service again and it should start successfully. Check the <ServerName>-stdout.txt to make sure the server is up and running.


OR delete the exisitng service and create it again:

1. Delete the existing service from the registry and reboot the server.
2. Edit the $MIDDLEWARE_HOME\wlserver_10.3\server\bin\installSvc.cmd
3. Add "set JAVA_VM=-server", or for JRockit only "set JAVA_VM=-jrockit" at the following section:

@echo off

set JAVA_VM=-server

if "%ADMIN_URL%" == "" goto runAdmin
@echo on
set CMDLINE="%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -classpath \"%CLASSPATH%\" -Dweblogic.Name=%SERVER_NAME%

-Dweblogic.management.username=%WLS_USER% -Dweblogic.management.server=\"%ADMIN_URL%\

Scaling up a server

We have two scaling options: vertical and horizontal scaling. Vertical scaling relates to adding more CPUs to a machine. To better utilize the server hardware we can add more WebLogic instances to the machine that could lead to increased application throughput. To determine if this is indeed the case we need to benchmark. Benchmarking for scalability is about measuring resource utilization. Good scalability means that service levels can be maintained while the workload is increased. If an application does not scale well, it is not fully utilizing the hardware. Consequently, throughput will degrade. Ideally, a linear load increase should lead to a linear degradation in service levels and performance. Linear scalabilty can be approached when so-called share nothing clusters are used. The nodes provide the same functionality and know nothing about other nodes in the cluster (no HTTP session replication). In this case, the computing ability of the cluster increases almost linearly as more nodes are added to the cluster, if the back-end information systems, such as a database, are powerful enough.

Applications that ‘share nothing’ are usually sharing state through the database. The application-tier can scale as far as when the database becomes a bottleneck. In general, relying on a single shared resource will eventually cause contention for that resource and thus limit the scalability. Caching is a good resolution. When we cache data at the application-tier we avoid calls to the database (and also avoid relational data to object data conversions). When using a cluster of server instances we need to maintain multiple caches; this is not a problem for read-only data but for read/write data it is. Caching solutions, such as Coherence, provide different kind of caching, i.e., replicated and partitioned. Replicated does not scale well when cache writes are involved as the data needs to be replicated across all the nodes in the grid. A partioned cache, on the other hand, scales very well when cache writes are involved as data ownership is spread throughout the cluster (the system automatically rebalances the data when the number of nodes in the grid changes – we do not need to decide on how to partition the data, it comes out of the box). Another plus is that access to the cache means at most one network trip, this in order to maintain linear scalability. An optimization on read-access can be made when data can be obtained locally (sticky access) in this case a hybrid solution such as the near cache can be applied. Note that when Coherence*Web is used to cache HTTP session objects a near cache data structure is used. More information on Coherence*Web can be found in the post Setting-up a WebLogic Cluster that uses Coherence.

Database caching patterns are cache-aside, read/write-through or write-behind. The caching pattern cache-aside is discussed in the post Hibernate and Coherence. The caching patterns read/write-through or write-behind are discussed in the post Coherence and Hibernate: Decoupling the Database.

To scale the processing, data grids allow for a targeted execution of processing in the nodes, i.e., the map/reduce pattern (used, for example, in Google’s bigtable or Apache’s hadoop). The core of the map/reduce pattern are the following steps:

    Map step – a master node takes some input (problem), partitions it into smaller sub-problems and distributes those to worker nodes. Note that a worker node in turn can do the same.
    Reduce step – the master takes all the answers and combines them to get the output.

Sort of a divide and conquer algorithm, with the key difference that the map/reduce algorithm handles the data as key-value pairs.

Horizontal scalling relates to adding more machines to the environment, which gives a failover capability that we cannot get with vertical scaling. A good approach is to combine both scaling techniques to obtain better CPU utilization and failover capability. The post Setting-up a WebLogic Cluster that spans Multiple Machines shows an example, as the title suggests, of how to set-up a cluster that spans multiple machines.

Install WebLogic in Linux Environment

We first create a user, for example, oracle. To create a user run the following commands under the root user:

    useradd oracle
    passwd oracle

This creates a /home/oracle directory. To delete the user we can use: userdel -r oracle the option -r removes the /home/oracle directory.

The following software versions will be used:

  • JRockit JVM – jrrt-4.0.1-1.6.0-linux-x64 
  • WebLogic Server – wls1035_generic

First, we choose an installation directory, for example /home/oracle/weblogic. This will be our middleware home in the installation of WebLogic.

To install JRockit we follow these steps:

  • Run the file jrrt-4.0.1-1.6.0-linux-x64.bin. 
  • Click Next on the welcome screen. 
  • Define the install directory /home/oracle/weblogic/jrrt-4.0.1-1.6.0 and click Next. 
  • Optionally select extra components and click Next. 
  • When the installation is finished click Done.

To install WebLogic we follow these steps:

  • Navigate to the JDK’s bin directory (/home/oracle/weblogic/jrrt-4.0.1-1.6.0/bin). 
  • Enter the following command: ./java -d64 -Xms1024m -Xmx1024m -jar wls1031_generic.jar. 
  • Click Next on the welcome screen. 
  • Define the Middleware-Home directory which was used to install the JDK and click Next. Click Yes in the pop-up. 
  • Fill in support credentials if applicable and click Next. 
  • Select Custom as installation type and click Next. 
  • De-select the evaluation database and click Next. 
  • Select the installed JDK (if the JDK is not shown, click Browse and browse to the root of the JDK) and click Next. 
  • Accept the defaults in the directories screen and click Next. 
  • Click Next to start the installation. 
  • De-select Run Quickstart and click Done.

Install WebLogic

Resetting Admin UserName And Password

Tuesday, July 23, 2013


To know How to Decrypt WebLogic Password ? 

Many times we want to Alter WebLogic Admin Username and passwords on a Routine Basis…

If you want to Reset The WebLogic Username and Password then Please follow the Steps mentioned Below…(EXACTLY):

Step1). open a Command Prompt and then run “setDomainEnv.sh” or “setDomainEnv.cmd”.

Step2). Just for Safety Take a Backup of (C:\bea103\user_projects\domains\7001_Domain\security\*DefaultAuthenticatorInit.ldift*) file …because in the Next Command which we are going to run is going to Create a New File “DefaultAuthenticatorInit.ldift”.

Step3). In the Command Window Move inside your Domain’s Security Directory…And then Run the Following Command:

Example: C:\bea103\user_projects\domains\7001_Domain\security>java weblogic.security.utils.AdminAccount newAdmin newPassword .

Syntax: java weblogic.security.utils.AdminAccount <NewAdminUserName> <NewAdminPassword>

NOTE:- There is a . (DOT) at the end of the Above command which represents the Current Directory. Here you can see that after this command Executes A new “DefaultAuthenticatorInit.ldift” file will be created in the Current Directory.

IMPORTANT STEP   [This Step 3-A) U Need Not to Follow If you Already Forgot your Admin Credentials]

Step3-A).  Login to Admin Console

Security Realms—> myrealm(Your realm Name)—> Migration(Tab)—> Export (Tab)

Here please provide a Directory location for “Export Directory on Server:” TextBox (Example: C:\UserData)

Click on “Save” button…you will find that in the Directory which you have specified you will get :

DefaultAuthenticator.dat
DefaultCredentialMapper.dat
exportIndex.dat
XACMLAuthorizer.dat
XACMLRoleMapper.dat

Step 4). In the Same command prompt Move inside the admin Server folder inside your domain. And then Just remname the “data” folder to something else ….like “data_OLD” this is a way of taking safe backup….

Example: C:\bea103\user_projects\domains\7001_Domain\servers\AdminServer> rename data data_OLD

Step 5). Now Similarly rename the boot.properties as well to an other File….

Example: C:\bea103\user_projects\domains\7001_Domain\servers\AdminServer\security> rename boot.properties boot.properties_OLD

Step 6). Make sure that “boot.properties” file exists….If yes then Now start The Admin Server….

While starting it will ask for the UserName and Password to be entered as ..we havenot created any “boot.properties” file at present. But it is always recommended that u create the “boot.properties” file on your own …to prevent WebLogic Prompting you for Admin Username & Passwords while starting the Server.

————> At the End Login to Admin Console with the New Useraname and Password—–> Check the Users in Security realms …you will not find any user with name “weblogic” There….

This is most important Step:  Because Sometimes we face this kind of issue if you have provided a Wrong format in your “boot.properties” file there should be NO Special Charachers (UTF or Invisible sharacters) Or NO Space in your “boot.properties” file …except below two Lines:

    username=MyAdminUserName
    password=MyAdminPassword

Please edit this File very carefully….better use Noteopad kind of Simple Editors.
Use “ls” (Unix command) or “dir” Windows Command to Make Sure that the File Extension is “boot.properties” only…and not “boot.properties.txt” or something else.

Note: There should be No Heading Or Trailing SPACE character in these two Lines.

Step 7).  To import other User Data back Please do the following:

Login to Admin Console
Security Realms—> myrealm(Your realm Name)—> Migration(Tab)—> Import (Tab)

Now provide the folder Name where u have all the above files:
DefaultAuthenticator.dat
DefaultCredentialMapper.dat
exportIndex.dat
XACMLAuthorizer.dat
XACMLRoleMapper.dat
 

Blogger news

Blogroll

Most Reading