How To Start The Weblogic Server In Windows
Starting and Stopping WebLogic Servers
This section discusses the following topics:
- WebLogic Administration Server and WebLogic Managed Servers
- Starting the WebLogic Administration Server
- Adding a WebLogic Managed Server to the Domain
- Starting a WebLogic Managed Server
- Migrating from Earlier Versions of WebLogic Server
- Stopping WebLogic Servers from the Administration Console
- Setting up the WebLogic Server as a Windows Service
- Registering Startup and Shutdown Classes
WebLogic Administration Server and WebLogic Managed Servers
A WebLogic domain may consist of 1 or more WebLogic Servers. One (and no more than one) of these WebLogic Servers must be the Administration Server for the domain. Boosted WebLogic Servers in the domain are managed servers. The aforementioned executable may be started as either a WebLogic Assistants Server or as a WebLogic Managed Server.
Being the Administration Server is the default role for a WebLogic Server. Therefore, if in that location is only one WebLogic Server in a domain, that server is the Administration Server. In a multi-server domain, a WebLogic Server becomes a Managed Server only if it is instructed to obtain its configuration from a running Administration Server when started.
The Administration Server controls admission to the configuration for a WebLogic domain and provides other management services such as monitoring and log message browsing. The Assistants Server serves up the Administration Console which provides user access to the management services offered by the Assistants Server.
When a WebLogic Managed Server is started, it obtains its configuration from the Assistants Server. For this reason, booting a multi-server WebLogic domain is a ii-footstep procedure: Outset you beginning the Administration Server, then you start the Managed Servers.
Note: The Managed Servers must be the same WebLogic version as the Administration Server.
Startup Mistake Messages
When a WebLogic Server is starting, the normal logging subsystem is not yet available for logging. Accordingly, any errors encountered during startup are logged to stdout and to a special startup log, servername -startup.log (where servername is the name of the server). If startup is successful, the last bulletin in this log points to the location of the local server log file where normal logging occurs. For more information on the WebLogic Server logging subsystem, see Using Log Messages to Manage WebLogic Servers.
Starting the WebLogic Administration Server
In that location are several ways in which the WebLogic Administration Server can exist started:
- From the control line
The command to start the WebLogic Server tin exist either typed in a command trounce manually or information technology can be placed in a script to avert retyping the control each time the server is started. For data on the sample scripts provided run across Starting the WebLogic Managed Servers Using Scripts.
- From the Showtime Card (Windows merely)
- A WebLogic Server installed as a Windows service volition beginning automatically when the estimator is rebooted.
Use of Passwords When Starting the WebLogic Server
During installation you are asked to specify a password that will be required when the server is started. If you employ beginning scripts to offset an Administration Server or a Managed Server, you can include the countersign as a command-line argument (Come across Starting the WebLogic Administration Server from the Command Line.) If you lot showtime the server using a script without the password specified as a control-line argument, you will exist prompted to enter the countersign if there is no countersign.ini file.
Starting the WebLogic Administration Server from the Start Menu
If you installed WebLogic Server on Windows with the BEA Installation programme, you can use the WebLogic Server shortcut on the Windows Start card to start the WebLogic Administration Server. Select:
Start ProgramsBEA WebLogic East-Business PlatformWeblogic Server Version Outset Default Server
where version is the WebLogic Server software version number.
Invoking the WebLogic Server from the First menu executes the outset script startWeblogic.cmd (which is located in install_dir /config/ domain_name where domain_name is the name of the domain and install_dir is the directory where y'all installed the WebLogic Server software).
Starting and Stopping the WebLogic Server every bit a Windows Service
When installed as a Windows service, the WebLogic Server starts automatically when you lot kick the Windows computer. The WebLogic Server is started past executing the Windows outset script startWeblogic.cmd. A WebLogic Server started this fashion is started as an Administration Server. See Starting the WebLogic Assistants Server from the Command Line.
To run the WebLogic Server as a Windows service, you must have installed it as such. For information on installing and removing the WebLogic Server equally a Windows service, see Setting up the WebLogic Server equally a Windows Service.
Yous can also terminate and start the WebLogic Server easily from the Service Control Panel.
- Select KickoffSettingsControl Panel.
- Double-click the Services Control Console to open it.
- In the Services Command Panel, curlicue to the end to observe WebLogic Server. If WebLogic is Started, you volition have the option to Stop it when you select it, past clicking the Stop push button to the correct. If WebLogic is Stopped, the Starting time button will be available.
You lot can make the Windows service Automatic, Manual, or Disabled by clicking the Startup button and selecting a mode.
Starting the WebLogic Assistants Server from the Command Line
The WebLogic Server is a Coffee grade file, and similar any Java application, yous can start it with the coffee control. The arguments needed to commencement the WebLogic Server from the control line can exist quite lengthy and typing it out whenever you need to start the server tin be irksome. To brand sure that your startup commands are accurate, BEA Systems recommends that you comprise the command into a script that you lot tin can use whenever you want to beginning a WebLogic Server.
The following arguments are required when starting the WebLogic Administration Server from the java command line:
- Specify the minimum and maximum values for Java heap memory.
For example, you may want to beginning the server with a default resource allotment of 64 megabytes of Coffee heap memory to the WebLogic Server. To do so, you can beginning the server with the java -ms64m and -mx64m options.
These values assigned to these parameters can dramatically affect the performance of your WebLogic Server and are provided here merely as full general defaults. In a product surroundings you lot should carefully consider the correct memory heap size to utilize for your applications and environment.
- Prepare the java -classpath option.
The minimum content for this option is described nether Setting the Classpath Option.
- Specify the name of the server.
The domain configuration specifies configuration by server name. To specify the proper name of the server on the command line, use the following argument:
-Dweblogic.Name= servername
The default value is myserver .
- Provide user password.
The default user is organization and the required countersign is the password specified during installation. To enter the password, include the post-obit argument:
-Dweblogic.management.password= password
- Specify the WebLogic root directory if you lot do not start the WebLogic Server from the WebLogic root directory.
The WebLogic root directory contains the security resources for the domain and the Configuration Repository (a directory named \config). You tin specify the location of the root directory on the control line with the post-obit argument:
-Dweblogic.RootDirectory= path
where path is the path to the root directory. If y'all do non specify this attribute on the control line, the electric current directory is used to prepare the runtime value of this attribute.
- Specify the location of the bea.home directory:
-Dbea.home= root_install_dir
where root_install_dir is the root directory under which yous installed the BEA WebLogic Server software.
- If you generated a password-protected individual key, yous need to pass the server the private key countersign at startup and then that the server can decrypt the PKCS private fundamental file. To pass the private primal countersign to the server on startup, include the post-obit argument on the control line:
-Dweblogic.pkpassword= pkpassword
where pkpassword is the private key password.
Countersign-protected private keys are generated when the Private Cardinal Password field is specified in the Document Request Generator servlet. For more than information, see Managing Security.
- You can specify the name of the domain configuration when starting the Assistants Server past using the post-obit statement on the control line:
-Dweblogic.Domain= domain_name
where domain_name is the name of the domain. This will also be the subdirectory which has the configuration file that will be used to boot the domain.
The configuration repository consists of the domains under the /config directory. The configuration repository may contain a variety of possible domain configurations. Each such domain is located under a separate subdirectory, with the subdirectory name being the name of that domain. When you specify domain_name you are thus specifying this subdirectory name. The subdirectory thus specified contains the XML configuration file (config.xml) and the security resources for that domain (run into example below). The file config.xml specifies the configuration for that domain.
The domain configuration with which the Assistants Server is started becomes the active domain. Only 1 domain can be active.
- You tin can too specify values for WebLogic configuration attributes on the control line. These values get the runtime value for that attribute, and any value stored in the persistent configuration is ignored. The format for setting a runtime value for a WebLogic attribute on the command line is:
-Dweblogic. attribute = value
Setting the Classpath Pick
The following must be included as arguments to the -classpath option on the java control line:
- / weblogic /lib/weblogic_sp.jar
- / weblogic /lib/weblogic.jar
- WebLogic Server comes with a trial version of an all-Java database management system (DBMS) called Cloudscape. If you will be using this DBMS, then you will demand to include the following in the classpath:
/ weblogic /samples/eval/cloudscape/lib/cloudscape.jar - If yous will be using WebLogic Enterprise Connectivity, you will need to include the post-obit:
/ weblogic /lib/poolorb.jar
where weblogic is the directory where you installed WebLogic Server.
Starting the Assistants Server Using a Script
Sample scripts are provided with the WebLogic distribution that you can use to commencement WebLogic Servers. You volition demand to modify these scripts to fit your environment and applications. Divide scripts are provided for starting the Administration Server and the Managed Server. The scripts for starting the Assistants Server are called startWebLogic.sh (UNIX) and startWeblogic.cmd (Windows). These scripts are located in the configuration subdirectory for your domain.
To use the supplied scripts:
- Pay close attention to classpath settings and directory names.
- Alter the value of the variable JAVA_HOME to the location of your JDK.
- UNIX users must change the permissions of the sample UNIX script to make the file executable. For example:
chmod +10 startAdminWebLogic.sh
Restarting the Administration Server when Managed Servers are Running
For a typical production system it is recommended that the applications containing your critical business logic be deployed on Managed Servers. In such a scenario, the office of the Administration Server is that of configuring and monitoring the Managed Servers. If the Administration Server should become unavailable in such a configuration, the applications running on the Managed Servers can continue to process client requests.
When the Administration Server is started, it makes a re-create of the configuration file that was used to boot the active domain. This is saved in the file
install_dir /config/ domain_name /config.xml.booted
where install_dir is the directory where you installed the WebLogic Server software and domain_name is the name of the domain. The Administration Server creates the config.xml.booted file only later information technology has successfully completed its startup sequence and is gear up to process requests.
You should make a copy of this file so that you have a working configuration file that you can revert to if you need to dorsum out of changes made to the active configuration from the Administration Panel.
If the Administration Server goes down while Managed Servers proceed to run, you do not demand to restart the Managed Servers to recover management of the domain. The procedure for recovering management of an agile domain depends upon whether you can restart the Administration Server on the same machine it was running on when the domain was started.
Restarting the Administration Server on the Same Machine
If y'all restart the WebLogic Administration Server while Managed Servers go along to run, the Assistants Server tin detect the presence of the running Managed Servers if you instruct the Administration Server to perform a discovery. To instruct the Administration Server to do a discovery of Managed Servers, enter the post-obit argument on the command line when starting the Administration Server:
-Dweblogic.direction.discover=truthful
The default value of this attribute is false. The configuration directory for the domain contains a file running-managed-servers.xml which is a list of the Managed Servers that the Administration Server knows nearly. When the Administration Server is instructed to perform discovery upon startup, it uses this list to check for the presence of running Managed Servers.
Restart of the Administration Server does not update the runtime configuration of the Managed Servers to take account of whatever changes made to attributes that can only be configured statically. WebLogic Servers must exist restarted to take business relationship of changes to static configuration attributes. Discovery of the Managed Servers does enable the Administration Server to monitor the Managed Servers or make runtime changes in attributes that tin exist configured dynamically.
Restarting the Administration Server on Another Auto
If a machine crash prevents you from restarting the Administration Server on the aforementioned machine, you tin recover management of the running Managed Servers as follows:
- Assign to some other computer the same host proper name equally the onetime Administration Server car.
- Install the WebLogic Server software on the new assistants automobile (if this has not already been done).
- The /config directory (the configuration repository) used to start the Administration Server on the machine being replaced needs to be made available to the new car. The /config directory could be copied from fill-in media or made available via NFS mountain, for example. This includes the configuration file (config.xml) used to boot the active domain as well as applications and components installed in the /applications directory for that domain.
- Restart the Administration Server on the new machine with the addition of the following statement on the command line:
-Dweblogic.management.discover=true
This argument will force the Administration Server to detect the presence of the Managed Servers that are running.
Adding a WebLogic Managed Server to the Domain
Earlier you tin run a WebLogic Server every bit a managed server, you must first create an entry for that server in the configuration for the domain. To do this, practice the post-obit:
- Start the Administration Server for the domain.
- Invoke the Administration Console by pointing your browser at http:// hostname : port /console, where hostname is the name of the machine where the Administration Server is running and port is the heed port number that you take configured for the Administration Server (default is 7001).
- Create an entry for the server machine (MachinesCreate a new machine) (if it is unlike than the Assistants Server machine) and the new server (ServersCreate a new server).
For more information on configuring servers, see Configuring WebLogic Servers and Clusters.
Starting a WebLogic Managed Server
Once you take added WebLogic Managed Servers to your configuration (see Adding a WebLogic Managed Server to the Domain), you tin beginning the Managed Servers from the java command line. The command to offset the WebLogic Server tin can exist either typed in a command shell manually or it can be placed in a script to avoid retyping the command each time the server is started. For information on the sample scripts provided encounter Starting the WebLogic Managed Servers Using Scripts.
The main way in which the startup parameters for a Managed Server differ from an Administration Server is that you demand to provide an argument that identifies the location of the Assistants Server from which the Managed Server requests its configuration. A WebLogic Server started without this parameter runs every bit an Administration Server.
The following are required when starting a WebLogic Managed Server:
- Specify the minimum and maximum of Java heap retentiveness.
For example, you may desire to start the server with a default allocation of 64 megabytes of Java heap memory to the WebLogic Server. To do so, yous can start the server with the java -ms64m and -mx64m options.
These values assigned to these parameters can dramatically affect the performance of your WebLogic Server and are provided here just as general defaults. In a production environment y'all should carefully consider the correct retention heap size to utilize for your applications and environment.
- Set the java -classpath option.
The minimum content for this option is described nether Setting the Classpath Option.
- Specify the name of the server.
When a WebLogic Managed Server requests its configuration data from the Administration Server, it identifies itself to the Administration Server past server proper name. This enables the Administration Server to reply with the advisable configuration for that WebLogic Server. For this reason, y'all must also set up the server proper name when starting a managed server. This tin be specified by adding the post-obit statement to the command line when starting the WebLogic Managed Server:
-Dweblogic.Name= servername
- Provide the password for the system user.
Merely the system user tin can start a Managed Server. To specify the password for the system user, y'all can include the post-obit statement:
-Dweblogic.direction.password= password
For information about use of passwords, see Use of Passwords When Starting the WebLogic Server.
Note: Because system is the default value for the -Dweblogic.direction.username statement, y'all do not need to specify information technology when starting a Managed Server.
- Specify the location of the bea.dwelling directory:
-Dbea.home= root_install_dir
where root_install_dir is the root directory nether which you installed the BEA WebLogic Server software.
- If you want to starting time the server with Secure Socket Layer (SSL) protocol, you lot demand to pass the server the private fundamental password at startup so that the server can decrypt the SSL private key file. To pass the SSL individual key password to the server on startup, include the post-obit argument on the command line:
-Dweblogic.pkpassword= pkpassword
where pkpassword is the SLL private central password.
- Specify the host proper noun and listen port of the WebLogic Administration Server
When starting a managed server, it is necessary to specify the host name and mind port of the Administration Server from which the managed server is to asking its configuration. This can be specified by adding the following argument to the command line when starting the managed server:
-Dweblogic.management.server= host : port
or
-Dweblogic.management.server=http:// host : port
where host is the name or IP accost of the machine where the Assistants Server is running and port is the Administration Server'due south listen port. By default the Administration Server's listen port is 7001.
If you are using Secure Socket Layer (SSL) for communication with the Administration Server, the Administration Server must exist specified as:
-Dweblogic.management.server=https:// host : port
To apply SSL protocol in communication between the Managed Servers and the Administration Server, y'all need to enable SSL on the Administration Server. For details on how to fix this upwards, see Managing Security.
Annotation: Any WebLogic Server that is started without specifying the location of the Administration Server is started as an Administration Server.
Notation: Because the Managed Server receives its configuration from the Assistants Server, the Administration Server specified must be in the same domain as the Managed Server.
- You can also specify values for WebLogic configuration attributes on the command line. Aspect values set this style become the runtime value for that attribute, and whatsoever value stored in the persistent configuration is ignored. The format for setting a runtime value for a WebLogic attribute on the command line is:
-Dweblogic. attribute = value
Starting the WebLogic Managed Servers Using Scripts
Sample scripts are provided with the WebLogic distribution that you tin can use to showtime WebLogic Servers. You will need to modify these scripts to fit your environment and applications. Separate scripts are provided for starting the Assistants Server and the Managed Server. The scripts to start Managed Servers are called startManagedWebLogic.sh (UNIX) and startManagedWebLogic.cmd (Windows). These scripts are located in the configuration subdirectory for your domain.
To use the supplied scripts:
- Pay close attention to classpath settings and directory names.
- Change the value of the variable JAVA_HOME to the location of your JDK.
- UNIX users must alter the permissions of the sample UNIX script to make the file executable. For example:
chmod +x startManagedWebLogic.sh
There are ii means to beginning the Managed Server using the script:
- If you set the value of the environment variables SERVER_NAME and ADMIN_URL, you do non need to provide these every bit arguments when invoking the beginning script. SERVER_NAME should be set to the name of the WebLogic Managed Server that you wish to start. ADMIN_URL should exist gear up to signal to the host (host name or IP accost) and port number where the Administration Server is listening for requests (default is 7001). For example:
set SERVER_NAME=bigguy
set ADMIN_URL=peach:7001
startManagedWebLogic - You can invoke the showtime script and pass the proper noun of the Managed Server and the URL for Administration Server on the command line:
startManagedWebLogic server_name admin:url
where server_name is the name of the Managed Server yous are starting and admin_url is either http:// host : port or https:// host : port where host is the host name (or IP accost) of the Assistants Server and port is the port number for the Administration Server.
Migrating from Earlier Versions of WebLogic Server
If you have WebLogic Server startup scripts that you used with a previous release of the product, you will need to modify them to work with this release. The following are the main changes from previous releases:
- Dynamic class loading has inverse.
Previous releases of WebLogic Server had two carve up Java classpath settings on the command line:
- The Java arrangement classpath
- A special WebLogic classpath
The WebLogic classpath property was used to facilitate dynamic class loading. In this release, the WebLogic classpath holding has been eliminated and the Coffee organisation classpath setting has changed. Scripts used with previous releases will need to be modified accordingly. In this release, dynamic loading of classes needed for Coffee 2 applications is the responsibility of those applications, and specifying the location of the compiled classes is accomplished via the Extensible Markup Language (XML) descriptors in the files comprising the application.
Encounter Setting the Classpath Option for information on setting the Coffee system classpath.
- Information technology is no longer necessary to specify the location of the license file or the policy file on the command line.
- The distinction between an Assistants Server and Managed Servers is new to this release. You volition demand to add the URL to betoken a WebLogic Server to a running Administration Server if you lot want to showtime it as a Managed Server.
- See Starting the WebLogic Assistants Server from the Command Line and Starting a WebLogic Managed Server for a complete listing of the required arguments.
- New outset scripts, startManagedWebLogic.cmd (Windows) and startManagedWebLogic.sh (UNIX, are provided for starting WebLogic Managed Servers. The startWebLogic.sh (UNIX) and startWebLogic.cmd (Windows) scripts are now for utilize in starting the WebLogic Assistants Server.
Stopping WebLogic Servers from the Administration Panel
To shutdown an individual WebLogic Server:
- In the Assistants Console domain tree (in the left pane), select the server y'all want to shutdown.
- On the MonitoringGeneral tab page, select the Shutdown this server link.
Shutting Down a Server from the Command Line
You lot can also close downwardly a WebLogic Server from the command line with the following command:
coffee weblogic.Admin -url host : port SHUTDOWN -username adminname -password password
where:
host is the name or IP accost of the automobile where the WebLogic Server is running.
port is the WebLogic Server's heed port (default is 7001).
adminname designates a user that has administrator privileges for the target WebLogic Server. Default is system.
password is the countersign for adminname .
Setting upwardly the WebLogic Server every bit a Windows Service
You lot can run the WebLogic Server as a Windows service. When installed every bit a Windows service, the WebLogic Server starts automatically when y'all boot the Windows computer. A WebLogic Server is started this way past invoking the beginning script startWeblogic.cmd. Whether the WebLogic Server is started as an Administration Server or as a Managed Server depends upon the parameters in the coffee command invoking the WebLogic Server. See Starting a WebLogic Managed Server and Starting the WebLogic Administration Server from the Command Line.
To setup the WebLogic Server to run as a Windows service or to reconfigure information technology so it is no longer a Windows service, you must have ambassador-level privileges. To install the WebLogic Server as a Windows service, practise the following:
- Navigate to the weblogic \config\ mydomain directory (where weblogic is the directory where WebLogic Server was installed and mydomain is the subdirectory with your domain'due south configuration).
- Execute the script installNTService.cmd.
Removing WebLogic Server as a Windows Service
To remove the WebLogic Server as a Windows service, practice the following:
- Navigate to the weblogic \config\ mydomain directory (where weblogic is the directory where WebLogic Server was installed and mydomain is the subdirectory with your domain's configuration).
- Execute the script uninstallNTService.cmd.
You can also uninstall the WebLogic Server as a Windows service from the Windows Start bill of fare.
Irresolute Passwords for a Server Installed as a Windows Service
If you install the Default Server every bit a Windows service, the system password that you entered during installation of the WebLogic software is used when creating the service. If this countersign is later changed, you must do the following:
- Uninstall the WebLogic Server as a Windows service using the uninstallNTService.cmd script (located in the directory install_dir /config/ domain_name where install_dir is the directory where you installed the product).
- The installNTservice.cmd script contains the post-obit control:
rem *** Install the service
"C:\bea\wlserver6.0\bin\beasvc" -install -svcname:myserver -javahome:"C:\bea\jdk130" -execdir:"C:\bea\wlserver6.0" -extrapath:"C\bea\wlserver6.0\bin" -cmdline:
%CMDLINE%You must suspend the post-obit to the control:
-password:" your_password "
where your_password is the new password.
- Execute the modified installNTservice.cmd script. This will create a new service with the updated password.
The WebLogic Windows Service Progam (beasvc.exe)
The scripts for installing and removing a WebLogic Server as a Windows service invoke the WebLogic Windows Service program, beasvc.exe. Multiple instances of WebLogic Server can be installed or removed equally a Windows service using beasvc.exe.
All configurations for multiple services are stored in the Windows Registry using a unlike service name and under a server-specific hive at:
HKEY_LOCAL_MACHINE\System\Current\ControlSet\Services
When you start the service, the Windows registry entries are picked up and the JVM is initialized and started. Since each service that is installed is independent of the others, you can install multiple instances of WebLogic Server to run every bit a Windows service, provided that each service is given a unique name.
The following options are available with beasvc.exe:
-install
-remove
-svcname: service_name
-cmdline: java_cmdline_parameters
-javahome: java_directory
-execdir: base_dir
-extrapath: additional_env_settings
-help
Win32 systems have a 2K limitation on the length of the command line. If the classpath setting for the Windows service startup is very long, the 2K limitation could be exceeded. With the i.2 or later version of the Sunday Microsystems JVM, you can specify a file that contains the classpath using the @ selection. You could use this option with beasvc.exe as in the following example:
beasvc -install -svcname:myservice -classpath:@C:\temp\myclasspath.txt
Registering Startup and Shutdown Classes
WebLogic provides a machinery for performing tasks whenever a WebLogic Server starts up or gracefully shuts downwards. A startup class is a Java program that is automatically loaded and executed when a WebLogic Server is started or restarted. Startup classes are loaded and executed only later all other server initialization tasks accept completed.
Shutdown classes work the same style as startup classes. A shutdown class is automatically loaded and executed when the WebLogic Server is close downwardly either from the Administration Console or using the weblogic.admin shutdown control.
In order for your WebLogic Servers to use startup or shutdown classes, it is necessary to register these classes, which you lot can practice from the Administration Console.
You can register a startup or shutdown class by doing the following:
- Access the Startup & Shutdown table from the domain tree (in the left pane) in the Administration Console. This table provides options for creating entries for shutdown or startup classes in the domain configuration.
- Provide the class proper noun and necessary arguments, if any, on the Configuration tab page for the startup or shutdown course you are calculation.
Run into the Administration Panel online assist for more information on:
- Startup classes
- Shutdown classes
Copyright © 2000 BEA Systems, Inc. All rights reserved. |
Source: https://docs.oracle.com/cd/E13222_01/wls/docs60/adminguide/startstop.html
Posted by: morrisonwastoponcen.blogspot.com
0 Response to "How To Start The Weblogic Server In Windows"
Post a Comment