weblogic.Admin reference

 


Contents

  1. Overview
  2. Environment
  3. Syntax
  4. Store User Credentials
  5. Cycle Servers
  6. Server Information
  7. JDBC Connection Pools
  8. MBeans
  9. Batch Mode
  10. Clusters

See Also:

  1. Deployment Tools Reference
  2. Command-Line Utilities


Overview

weblogic.Admin is a commandline interface for manipulating WebLogic servers.

While the Administration Console interacts only with the Administration Server, the weblogic.Admin utility can access the Administration Server as well as all active server instances directly.

Managed Servers retrieve configuration data from the Administration Server, and the Administration Server can access runtime data from all Managed Servers.

If the Administration Server is down, you can still use the weblogic.Admin utility to retrieve runtime information from Managed Servers and invoke some administrative commands. However, you can save configuration changes to the domain's config.xml file only when you access the Administration Server.

 


Required Environment for the weblogic.Admin Utility

To set up your environment for the weblogic.Admin utility:

  1. Install and configure the WebLogic Server software

  2. Add WebLogic Server classes to the CLASSPATH environment variable and $WL_HOME/server/bin to the PATH environment variable. You can use $WL_HOME/server/bin/setWLSEnv.sh to set both variables.

  3. Configure a domain-wide administration port (Optional).

    The domain-wide administration port is secured by SSL.

    If a server instance is deadlocked, it can respond to weblogic.Admin commands only if you have enabled the domain-wide administration port. If you have not already enabled the domain-wide administration port, your only option is to shut down the server instance by killing the Java process that is running the server. You will lose all session data.

 


Syntax for Invoking the weblogic.Admin Utility

java [ SSL Arguments ]
     weblogic.Admin 
     [ Connection Arguments ] 
     [ User Credentials Arguments ]
     COMMAND-NAME command-arguments 

The command names and arguments are not case sensitive.

The following sections provide detailed syntax information:

 

SSL Arguments

java [ -Dweblogic.security.TrustKeyStore=DemoTrust ]
     [ -Dweblogic.security.JavaStandardTrustKeystorePassPhrase=password ]
     [ -Dweblogic.security.CustomTrustKeyStoreFileName=filename 
       -Dweblogic.security.TrustKeystoreType=CustomTrust
      [-Dweblogic.security.CustomTrustKeystorePassPhrase=password ] ]
     [ -Dweblogic.security.SSL.hostnameVerifier=classname ]
     [ -Dweblogic.security.SSL.ignoreHostnameVerification=true ]
     weblogic.Admin 
     [ User Credentials Arguments ] 
     COMMAND arguments 

If you have enabled the domain-wide administration port, or if you want to secure your administrative request by using some other listen port that is secured by SSL, include SSL arguments when you invoke weblogic.Admin.

 

-Dweblogic.security.TrustKeyStore=DemoTrust

Causes weblogic.Admin to trust the CA certificates in the demonstration trust keystore

WL_HOME/server/lib/DemoTrust.jks

This argument is required if the server instance to which you want to connect is using the demonstration identity and certificates.By default, weblogic.Admin trusts only the CA certificates in the Java Standard Trust keystore

SDK_HOME/jre/lib/security/cacerts

 

-Dweblogic.security.JavaStandardTrustKeystorePassPhrase=password

Specifies the password that was used to secure the Java Standard Trust keystore.If the Java Standard Trust keystore is protected by a password, and if you want to trust its CA certificates, use this argument.By default, the Java Standard Trust keystore is not protected by a password.

 

-Dweblogic.security.CustomTrustKeyStoreFileName=filename
-Dweblogic.security.TrustKeystoreType=CustomTrust

Causes weblogic.Admin to trust the CA certificates in a custom keystore that is located at filename. You must use both arguments to trust custom keystores.

 

-Dweblogic.security.CustomTrustKeystorePassPhrase=password

Specifies the password that was used to secure the custom keystore.You must use this argument only if the custom keystore is protected by a password.

 

-Dweblogic.security.SSL.hostnameVerifier=classname

Specifies the name of a custom Host Name Verifier class. The class must implement the weblogic.security.SSL.HostnameVerifier interface.

 

-Dweblogic.security.SSL.ignoreHostnameVerification=true

Disables host name verification.

 

Using SSL to Secure Administration Requests: Main Steps

To secure administration requests with SSL:

  1. Ensure that two-way SSL is disabled on the server instance to which you want to connect.

    By default, when you enable SSL, a server instance supports one-way SSL. Because two-way SSL provides additional security, you might have enabled two-way SSL. However, weblogic.Admin does not support two-way SSL.

  2. Ensure that the trusted CA certificates are stored in a keystore that the weblogic.Admin utility can access through the file system.

  3. When you invoke the weblogic.Admin utility, include arguments that specify the following:

 

Specifying Trust for weblogic.Admin

When the weblogic.Admin utility connects to a server's SSL port, it must specify a set of certificates that describe the certificate authorities (CAs) that the utility trusts.

To specify trust for weblogic.Admin:

  • To trust only the CA certificates in the Java Standard Trust keystore, you do not need to specify command-line arguments, unless the keystore is protected by a password.

    If the Java Standard Trust keystore is protected by a password, use the following command-line argument:

    -Dweblogic.security.JavaStandardTrustKeystorePassPhrase=password

  • To trust both the CA certificates in the Java Standard Trust keystore and in the demonstration trust keystore, include the following argument:

    -Dweblogic.security.TrustKeyStore=DemoTrust

    This argument is required if the server instance to which you want to connect is using the demonstration identity and certificates.

    If the Java Standard Trust keystore is protected by a password, include the following command-line argument:

    -Dweblogic.security.JavaStandardTrustKeystorePassPhrase=password

  • To trust only the CA certificates in a keystore that you create, specify the following command-line arguments:

    • -Dweblogic.security.CustomTrustKeyStoreFileName=filename

      where filename specifies the fully qualified path to the trust keystore.

    • -Dweblogic.security.TrustKeystoreType=CustomTrust

      This optional command-line argument specifies the type of the keystore. Generally, this value for type is jks.

    • If the custom keystore is protected by a password, include
      -Dweblogic.security.CustomTrustKeystorePassPhrase=password

 

Specifying Host Name Verification for weblogic.Admin

A host name verifier ensures the host name URL to which the client connects matches the host name in the digital certificate that the server sends back as part of the SSL connection. A host name verifier is useful when an SSL client, or a SSL server acting as a client, connects to an application server on a remote host. It helps to prevent man-in-the-middle attacks.

To specify host name verification for weblogic.Admin:

  • To use the host name verifier that the WebLogic Security Service provides, you do not need to specify host-name verification arguments.

    If you specify an IP address or the localhost string in the weblogic.Admin -url or -adminurl argument, the host name verifier that the WebLogic Security Service provides will allow the connection if the CN field of the digital certificate matches the DNS name of the local host.

  • To use a custom host name verifier, specify:

    -Dweblogic.security.SSL.hostnameVerifier=classname

    where classname specifies the implementation of the weblogic.security.SSL.HostnameVerifier interface.

  • To disable host name verification, specify:

    -Dweblogic.security.SSL.ignoreHostnameVerification=true

  Connection Arguments

java [ SSL Arguments ]
     weblogic.Admin 
     [ {-url URL} | {-adminurl URL} ]
     [ User Credentials Arguments ]
     COMMAND-NAME command-arguments

When you invoke most weblogic.Admin commands, you specify the arguments below to connect to a WebLogic Server instance. Some commands have special requirements for the connection arguments. Any special requirements are described in the command documentation.

 

  1. -url [protocol://]address:port

    The listen address and listen port of the server instance that runs the command.

    In most cases, you should specify the Administration Server's address and port, which is the central management point for all servers in a domain. Some commands, such as START and CREATE, must run on the Administration Server. The documentation for each command indicates whether this is so.

    If you specify a Managed Server's listen address and port, the command can access data only for that server instance; you cannot run a command on one Managed Server to view or change data for another server instance.

    When you use MBean-related commands, specify the Administration Server's listen address and port to access Administration MBeans. To access Local Configuration MBeans or Runtime MBeans, you can specify the server instance on which the MBeans reside. (However, the -adminurl argument can also retrieve Local Configuration MBeans or Runtime MBeans from any server.)

    To use a listen port that is not secured by SSL, the format is

    -url [protocol://]address:port

    To use a port that is secured by SSL, the format is

    -url secure-protocol://address:port

    If you have set up a domain-wide administration port, specify the administration port number:

    -url secure-protocol://address:domain-wide-admin-port

    The default value for this argument is t3://localhost:7001.

     

  2. -adminurl [protocol://]Admin-Server-address:port

    Enables the Administration Server to retrieve Local Configuration MBeans or Runtime MBeans for any server instance in the domain.

    For all commands other than the MBean commands, -adminurl admin-address and -url admin-address are synonymous.

    The -adminurl value must specify the listen address and listen port of the Administration Server.

    To use a port that is not secured by SSL, the format is -adminurl [protocol]Admin-Server-address:port.

    To use a port that is secured by SSL, the format is -adminurl secure-protocol://Admin-Server-address:port

    If you have set up a domain-wide administration port, specify the administration port number:

    -adminurl secure-protocol://Admin-Server-address:domain-wide-admin-port

    There is no default value for this argument.

 

User Credentials Arguments

java [ SSL Arguments ]
     weblogic.Admin 
     [ Connection Arguments ] 
     [ { -username username [-password password] } |
       [ -userconfigfile config-file [-userkeyfile admin-key] ] 
     ]
     COMMAND-NAME command-arguments 

When you invoke most weblogic.Admin commands, you specify the arguments below to provide the user credentials of a WebLogic Server user who has permission to invoke the command.
Argument Definition
-username username The name of the user who is issuing the command. This user must have appropriate permission to view or modify the target of the command.
-password password The password that is associated with the username. If you do not specify the -password argument, weblogic.Admin prompts you for a password.

If WL_HOME/server/bin is specified in the PATH environment variable, weblogic.Admin uses a set of WebLogic Server libraries that prevent the password from being echoed to standard out.

-userconfigfile config-file Specifies the name and location of a user-configuration file, which contains an encrypted username and password. The encrypted username must have permission to invoke the command you specify.

If you do not specify -userconfigfile config-file, and if you do not specify -username username, weblogic.Admin searches for a user-configuration file at the default path name.

-userkeyfile admin-key Specifies the name and location of the key file that is associated with the user-configuration file you specify.

When you create a user-configuration file, the STOREUSERCONFIG command uses a key file to encrypt the username and password. Only the key file that encrypts a user-configuration file can decrypt the username and password.

Note: The exit code for all commands is 1 if the Administration client cannot connect to the server or if the WebLogic Server instance rejects the username and password.

 

Specifying User Credentials

The simplest way to specify user credentials is to create a user configuration file and key file in the default location. Thereafter, you do not need to include user credentials in weblogic.Admin invocations. A user-configuration file contains encrypted user credentials that can be decrypted only by a single key file.

For example, the following command creates a user configuration file and key file in the default location:

java weblogic.Admin -username weblogic -password weblogic STOREUSERCONFIG

After you enter this STOREUSERCONFIG command, you can invoke weblogic.Admin without specifying credentials on the command line or in scripts. For example:

java weblogic.Admin GET -pretty -type -Domain

If you create a user configuration file or key file in a location other than the default, you can include the -userconfigfile config-file and -userkeyfile admin-key arguments on the command line or in scripts.

If you do not create a user configuration file and key file, use the -username and -password arguments when invoking the weblogic.Admin utility directly on the command line or in scripts. With these arguments, the username and password are not encrypted. If you store the values in a script, the user credentials can be used by anyone who has read access to the script.

The following list summarizes the order of precedence for the weblogic.Admin user-credentials arguments:

  • If you specify -username username -password password, the utility passes the unencrypted values to the server instance you specify in the -url argument.

    These arguments take precedence over the { -userconfigfile config-file -userkeyfile admin-key } arguments.

  • If you specify -username username, the utility prompts for a password. Then it passes the unencrypted values to the server instance you specify in the -url argument.

    This argument also takes precedence over the { -userconfigfile config-file -userkeyfile admin-key } arguments.

  • If you specify { -userconfigfile config-file -userkeyfile admin-key } and do not specify { -username username [-password password]}, the utility passes the values that are encrypted in config-file to the server instance you specify in the -url argument.

  • If you specify neither { -username username [-password password] } nor { -userconfigfile config-file -userkeyfile admin-key }, the utility searches for a user-configuration file and key file at the default path names. The default path names vary depending on the JVM and the operating system.

 

Examples of Providing User Credentials

The following command specifies the username weblogic and password weblogic directly on the command line:

java weblogic.Admin -username weblogic \
                    -password weblogic \
                    COMMAND 

The following command uses a user-configuration file and key file that are located at the default pathname:

java weblogic.Admin COMMAND 

The following command uses a user-configuration file named /wlUser1-WebLogicConfig.properties and a key file named /secure/myKey:

java -userconfigfile /wlUser1-WebLogicConfig.properties \
     -userkeyfile /secure/myKey \
     COMMAND 

 

Protocol Support

The -url and -adminurl arguments of the weblogic.Admin utility support the t3, t3s, http, https, and iiop protocols.

  • If you want to use http or https to connect to a server instance, enable HTTP Tunneling for that instance.

  • If you want to use iiop to connect to a server instance, enable the iiop protocol for that instance.

  • If you use the -url argument to specify a non-secured port, the weblogic.Admin utility uses t3 by default. For example...

    java weblogic.Admin -url localhost:7001

    ...resolves to...

    java weblogic.Admin -url t3://localhost:7001.

  • If you use either the -url or -adminurl argument to specify a port that is secured by SSL, specify either t3s or https.

 

Example Environment

In many of the examples throughout the sections that follow, it is assumed that a certain environment has been set up:

  • The WebLogic Server administration domain is named Grape.

  • The Administration Server is named GrapeServer and listens on port 7001.

  • The Administration Server uses the name of its host machine, AdminHost, as its listen address:

    -Dweblogic.ListenAddress=host

    ...and...

    -Dweblogic.ListenPort= portnumber.

  • The weblogic username has system-administrator privileges and uses weblogic for a password.

  • The user credentials have not been encrypted in a user configuration file.

  • A Managed Server named GrapeManagedServer uses the name of its host machine, ManagedHost, as its listen address and 8001 as its listen port.

 

Exit Codes Returned by weblogic.Admin

All weblogic.Admin commands return an exit code of 0 if the command succeeds and an exit code of 1 if the command fails.

To view the exit code from a Windows command prompt, enter echo %ERRORLEVEL% after you run a weblogic.Admin command. To view the exit code in a bash shell, enter echo $?.

For example:

java weblogic.Admin -username weblogic -password weblogic GET -pretty 
-mbean "MedReName=MyServer,Type=Server" -property ListenPort

---------------------------
MBeanName: "MedReName=MyServer,Type=Server"
        ListenPort: 7010

echo $?
0

weblogic.Admin calls System.exit(1) if an exception is raised while processing a command, causing Ant and other Java client JVMs to exit. You can override this default behavior by specifying -noExit for Ant tasks (wlconfig) and -continueOnError for weblogic.Admin batch operations (BATCHUPDATE).

 


Command for Storing User Credentials

For any weblogic.Admin command that connects to a WebLogic Server instance, provide user credentials. You can use the STOREUSERCONFIG command to encrypt the user credentials instead of passing credentials directly on the command line or storing unencrypted credentials in scripts.

 


STOREUSERCONFIG

Creates a user-configuration file and an associated key file. The user-configuration file contains an encrypted username and password. The key file contains a secret key that is used to encrypt and decrypt the username and password.

Only the key file that originally encrypted the username and password can decrypt the values. If you lose the key file, create a new user-configuration and key file pair.

You must ensure that only authorized users can access the key file. Any user who accesses a valid user-configuration and key file pair gains the privileges of the encrypted username. To secure access to the key file, you can store the key file in a directory that provides read and write access only to authorized users, such as WebLogic Server administrators. Alternatively, you can write the key file to a removable medium, such as a floppy or CD, and lock the medium in a drawer when it is not being used.

Unlike other weblogic.Admin commands, the STOREUSERCONFIG command does not connect to a WebLogic Server instance. The data encryption and file creation are accomplished by the JVM in which the STOREUSERCONFIG command runs. Because it does not connect to a WebLogic Server instance, the command cannot verify that the username and password are valid WebLogic Server credentials.

 

Syntax

java  weblogic.Admin  \
      -username username  \
    [ -password password] \
    [ -userconfigfile config-file ]  \
    [ -userkeyfile keyfile ] \
      STOREUSERCONFIG 

Argument Definition
-userconfigfile config-file Specifies a file pathname at which the STOREUSERCONFIG command creates a user-configuration file. The pathname can be absolute or relative to the directory from which you enter the command.

If a file already exists at the specified pathname, the command overwrites the file with a new file that contains the newly encrypted username and password.

If you do not specify this option, STOREUSERCONFIG does the following:

  • To determine the directory in which to create the user-configuration file, it uses the JVM's user-home directory. The default value varies depending on the SDK and type of operating system.

  • To determine the file name, it prepends your operating-system username to the string -WebLogicConfig.properties. For example, username-WebLogicConfig.properties. You can use Java options to specify a different username.
-userkeyfile keyfile Specifies a file pathname at which the STOREUSERCONFIG command creates a key file. The pathname can be absolute or relative to the directory from which you enter the command.

If a file already exists at the specified pathname, STOREUSERCONFIG uses the existing key file to encrypt the new user-configuration file.

If you do not specify this option, STOREUSERCONFIG does the following:

  • To determine the directory in which to create the key file, it uses the JVM's user-home directory. The default value varies depending on the SDK and type of operating system.

  • To determine the file name, it prepends your operating-system username to the string -WebLogicKey.properties. For example, username-WebLogicKey.properties. You can use Java options to specify a different username.
-username username
[ -password password ]
Specifies the username and password to encrypt. The STOREUSERCONFIG command does not verify that the username and password are valid WebLogic Server user credentials.

If you omit the -password password argument, STOREUSERCONFIG prompts you to enter a password.


 

Configuring the Default Path Name

If you do not specify the location in which to create and use a user-configuration file and key file, the weblogic.Admin and weblogic.Deployer utilities supply the following default values:

  • $HOME/username-WebLogicConfig.properties
  • $HOME/username-WebLogicKey.properties

Where $HOME is the home directory of the operating-system user account as determined by the JVM, and username is your operating-system username.

The value of the home directory varies depending on the SDK and type of operating system. For example, on UNIX, the home directory is usually "~username."

You can use the following Java options to specify values for $HOME and username:

  • -Duser.home=pathname specifies the value of $HOME
  • -Duser.name=usernanme specifies the value of username.

For example, the following command configures the user-home directory to be $WL_HOME and the user name to be wlAdmin.

java -Duser.home=$WL_HOME -Duser.name=wlAdmin weblogic.Admin COMMAND

The command will search for the following user-configuration and user key files:

/myHome/wlAdmin-WebLogicConfig.properties
/myHome/wlAdmin-WebLogicKey.properties

 

Creating User-Configuration and Key Files

To create user-configuration and key files:

  1. Use the -username username and -password password arguments to specify the username and password to be encrypted.

  2. Specify the name and location of the user-configuration and key files by doing one of the following:

    • Use the -userconfigfile config-file and -userkeyfile key-file arguments:

      java weblogic.Admin -username username \
                          -password password \
                          -userconfigfile config-file \
                          -userkeyfile key-file
                          STOREUSERCONFIG
      

    • Use the default behavior to create files named $HOME/username-WebLogicConfig.properties and $HOME/username-WebLogicKey.properties:

      java weblogic.Admin -username username -password password STOREUSERCONFIG

    • Use the -Duser.home=directory and -Duser.name=username Java options to create files named directory/username-WebLogicConfig.properties and directory/username-WebLogicKey.properties:

      java -Duser.home=directory \
           -Duser.name=username \
           weblogic.Admin \
           -username username \
           -password password \
           STOREUSERCONFIG 
      

You can change the name and location of a user-configuration file or a key file after you create them, as long as you use the two files as a pair.

 

Using a Single Key File for Multiple User-Configuration Files

To use one key file to encrypt multiple user-configuration files:

  1. Create an initial user-configuration file and key file pair.

    For example, enter the following command:

    java weblogic.Admin -username username \
                        -password password \
                        -userconfigfile /AdminConfig \
                        -userkeyfile /myKeyFile \
                        STOREUSERCONFIG 
    
  2. When you create an additional user-configuration file, specify the existing key file.

    For example, enter the following command:

    java weblogic.Admin -username username 
                        -password password
                        -userconfigfile /anotherConfigFile 
                        -userkeyfile /myKeyFile
                        STOREUSERCONFIG
    

 

Examples

In the following example, a user who is logged in to a UNIX operating system as joe encrypts the username wlAdmin and password wlPass:

java weblogic.Admin -username wlAdmin \
                    -password wlPass
                     STOREUSERCONFIG 

The command determines whether a key file named ~joe/joe-WebLogicKey.properties exists. If such a file does not exist, it prompts the user to select y to confirm creating a key file. If the command succeeds, it creates two files:

~joe/joe-WebLogicConfig.properties 
~joe/joe-WebLogicKey.properties 

The file joe-WebLogicConfig.properties contains an encrypted version of the strings wlAdmin and wlPass. Any command that uses the ~joe/joe-WebLogicConfig.properties file must specify the ~joe/joe-WebLogicKey.properties key file.

In the following example, the user joe is a System Administrator who wants to create a user-configuration file for an operating-system account named kavan. For the sake of convenience, joe wants to create the user-configuration file in kavan's home directory, which will simplify the syntax of the weblogic.Admin commands that kavan invokes. For added security, only one key file exists at joe's organization, and it is located on a removable hard drive.

To create a user configuration file in kavan's home directory that is encrypted and decrypted by a key file name /myKeyFile:

java -Duser.name=kavan \
     -Duser.home="/usr/local/kavan" \
     weblogic.Admin \
     -username wlOperatorPat \
     -password wlOperator1 \
     -userkeyfile /myKeyFile
     STOREUSERCONFIG 

A user who logs in to kavan's account can use the following syntax to invoke weblogic.Admin commands:

java weblogic.Admin -userkeyfile /myKeyFile COMMAND

 


Commands for Managing the Server Life Cycle

Below is an overview of commands that manage the life cycle of a server instance. Subsequent sections describe command syntax and arguments, and provide an example for each command.

Command Description
CANCEL_SHUTDOWN (Deprecated) Cancels the SHUTDOWN command for the WebLogic Server that is specified in the URL.
DISCOVERMANAGEDSERVER Causes the Administration Server to re-establish its administrative control over Managed servers.
FORCESHUTDOWN Terminates a server instance without waiting for active sessions to complete
LOCK (Deprecated) Locks a WebLogic Server against non-privileged logins. Any subsequent login attempt initiates a security exception which may contain an optional string message.
RESUME Makes a server available to receive requests from external clients.
SHUTDOWN Gracefully shuts down a WebLogic Server.
START Uses a configured Node Manager to start a Managed Server in the RUNNING state.
STARTINSTANDBY (Deprecated) Uses a configured Node Manager to start a Managed Server and place it in the STANDBY state.
UNLOCK (Deprecated) Unlocks the specified WebLogic Server after a LOCK operation.

 


CANCEL_SHUTDOWN

(Deprecated) The CANCEL_SHUTDOWN command cancels the SHUTDOWN command for a specified WebLogic Server.

When you use the SHUTDOWN command, you can specify a delay (in seconds). An administrator may cancel the shutdown command during the delay period. Be aware that the SHUTDOWN command disables logins, and they remain disabled even after cancelling the shutdown. Use the UNLOCK command to re-enable logins.

This command is deprecated because the ability to specify a delay in the SHUTDOWN command is also deprecated. Instead of specifying a delay in the SHUTDOWN command, you can now set attributes to control how a server shuts down.

 

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [ Connection Arguments ] 
     [ User Credentials Arguments ]
     CANCEL_SHUTDOWN

 

Example

The following example cancels the shutdown of a WebLogic Server instance that runs on a machine named ManagedHost and listens on port 8001:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
   -password weblogic CANCEL_SHUTDOWN

 


DISCOVERMANAGEDSERVER

Causes the Administration Server to re-establish administrative control over Managed Servers.

If the Administration Server fails while Managed Servers continue to run, or if you shut down the Administration Server while Managed Servers continue to run, you lose the ability to change the configuration or deploy modules to any server in the domain. To regain this administrative ability, restart the Administration Server. By default, an Administration Server finds the last known set of Managed Servers and re-establishes a connection.

If the Administration Server is unable to automatically re-establish a connection to one or more Managed Servers during its startup cycle, you can use this command to re-establish administrative control.

For example, you might have started a Managed Server in the STANDBY state and did not resume the Managed Server before restarting the Administration Server. The Administration Server discovers only Managed Servers that are in the RUNNING state.

Other factors can prevent the Administration Server from finding and re-connecting to Managed Servers, and you can use this command any time you need to re-establish a connection.

 

Syntax

java [ SSL Arguments ] 
       weblogic.Admin 
     [ -url [ protocol://]address:port ]
     [ User Credentials Arguments ]
     DISCOVERMANAGEDSERVER 
     [ -serverName targetServer 
       [ -listenAddress listenaddress ] 
       [ -listenPort listenport ]
     ]

Argument Definition 
-url [protocol://]address:port You must specify the listen address and listen port of the Administration Server. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001.
-serverName Specifies a Managed Server that is currently running. If you do not specify a server, the Administration Server will discover and re-establish control over all the Managed Servers that are known to be running but disconnected from administrative services.
-listenAddress Specifies the listen address of the Managed Server that you name with the -serverName argument. If you do not specify this argument, the command uses the listen address that is configured in the domain's config.xml file.
-listenPort Specifies the listen port of the Managed Server that you name with the -serverName argument. If you do not specify this argument, the command uses the listen port that is configured in the domain's config.xml file.

 


 

Example

The following command instructs the Administration Server to re-connect to GrapeManagedServer:

java weblogic.Admin 
     -url AdminHost:7001 
     -username weblogic 
     -password weblogic 
     DISCOVERMANAGEDSERVER 
     -serverName GrapeManagedServer

In the following example, a Managed Server is configured to listen on port 7021, but you used the -Dweblogic.ListenPort startup option to temporarily change the listen port to 8201. The following command instructs the Administration Server to re-connect to GrapeManagedServer, which is listening on port 8201:

java weblogic.Admin 
     -url AdminHost:7001 
     -username weblogic 
     -password weblogic 
     DISCOVERMANAGEDSERVER 
     -serverName GrapeManagedServer 
     -listenPort 8201

 


FORCESHUTDOWN

Terminates a server instance without waiting for active sessions to complete.

If a server instance is in a deadlocked state, it can respond to weblogic.Admin commands only if you have enabled the domain-wide administration port. (A deadlocked server is one in which all threads are struck trying to acquire locks held by other threads.) If you have not already enabled the domain-wide administration port, your only option for shutting down the server instance is to kill the Java process that is running the server. You will lose all session data.

 

Syntax

java [ SSL Arguments ] 
   [-Dweblogic.system.BootIdentityFile=filename 
     [-Dweblogic.RootDirectory=path]
   ]
   weblogic.Admin 
   [ Connection Arguments ] 
   [ User Credentials Arguments ]
   FORCESHUTDOWN 
   [ targetServer ]

Argument Definition
-Dweblogic.system.BootIdentityFile=filename
[-Dweblogic.RootDirectory=path]
Cause the command to retrieve encrypted user credentials from a boot identity file.

Use these arguments if you invoke this command from a script, you have not created a user configuration file, and you do not want to store user credentials in your script.

If you do you not use the -username argument or a user configuration file to specify credentials, the command retrieves user credentials from a boot properties file as follows:

If you invoke the command from a server's root directory, and if the server's root directory contains a valid boot.properties file, it retrieves credentials from this file by default.

If you invoke the command from a server's root directory, but the server's boot identity file is not in the server's root directory or is not named boot.properties, the command can use a boot identity file if you include the following argument:

-Dweblogic.system.BootIdentityFile=filename

where filename is the fully qualified pathname of a valid boot identity file.

If you do not invoke the command from a server's root directory, the command can use a boot identity file if you include both of the following arguments in the command:

-Dweblogic.system.BootIdentityFile=filename
-Dweblogic.RootDirectory=path

where filename is the fully qualified pathname of a valid boot identity file and
path is the relative or fully-qualified name of the server's root directory.

  • If you have not created a boot identity file for a server, or if you do not want to use it, use the -username and -password arguments to provide user credentials.

  • If you specify both -Dweblogic.system.BootIdentityFile=filename and -username and -password, the command uses the credentials specified in the -username and -password arguments.
targetServer The name of the server to shut down. If you do not specify a value, the command shuts down the server that you specified in the -url argument.

 

 

Example

The following command instructs the Administration Server to shut down a Managed Server:

java weblogic.Admin -url AdminHost:7001 -username weblogic 
   -password weblogic FORCESHUTDOWN GrapeManagedServer

After you issue the command, GrapeManagedServer prints messages to its log file and to its standard out. The messages indicate that the server state is changing and that the shutdown sequence is starting.

If the command succeeds, the final message that the target server prints is as follows:

<Oct 12, 2002 11:28:59 AM EDT> <Alert> <WebLogicServer> <000219> <The
shutdown sequence has been initiated.> 

In addition, if the command succeeds, the weblogic.Admin utility returns the following:

Server "GrapeManagedServer" was force shutdown successfully ...

In the following example, the Administration Server is not available, so the command instructs the Managed Server to shut itself down:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
-password weblogic FORCESHUTDOWN 

The following example provides user credentials by referring to a boot identity file. The example specifies the server's root directory and boot identity file name so that it can be invoked from any directory:

java -Dweblogic.system.BootIdentityFile=/mydomain/boot.properties
 -Dweblogic.RootDirectory=/mydomain
 weblogic.Admin -url AdminHost:7001 FORCESHUTDOWN 

 


LOCK

(Deprecated) Locks a WebLogic Server instance against non-privileged logins. Any subsequent login attempt initiates a security exception which may contain an optional string message.

Note: This command is privileged. It requires the password for the WebLogic Server administrative user.

Instead of using the LOCK command, start a server in the STANDBY state. In this state, a server instance responds only to administrative requests over the domain-wide administration port.

 

Syntax

java [ SSL Arguments ]
     weblogic.Admin 
     [ -url [protocol://]address:port ] 
     [ User Credentials Arguments ]
   LOCK ["stringMessage"]

Argument Definition 
-url [protocol://]address:port Specify the listen address and listen port of the server instance that you want to lock. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001.
"stringMessage" Message, in double quotes, to be supplied in the security exception that is thrown if a non-privileged user attempts to log in while the WebLogic Server instance is locked.

 

 

Example

In the following example, a Managed Server named GrapeManagedServer is locked.

java weblogic.Admin -url ManagedHost:8001 -username weblogic
   -password weblogic 
   LOCK "Sorry, WebLogic Server is temporarily out of service."

Any application that subsequently tries to log into the locked server with a non-privileged username and password receives the specified message: Sorry, WebLogic Server is temporarily out of service.

 


RESUME

Moves a server instance from the STANDBY state to the RUNNING state.

 

Syntax

java [ SSL Arguments ]
     weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
   RESUME [targetServer]

Argument Definition
-url secure-protocol://address:port Because servers can be in the STANDBY state only if the domain-wide administration port is enabled, to resume a server specify the Administration Server and domain-wide administration port as follows:

t3s://Admin-Server-address:domain-wide-admin-port

or

https://Admin-Server-address:domain-wide-admin-port
targetServer The name of the server to resume.

If you do not specify a value, the command resumes the server that you specified in the -url argument.


 

 

Example

The following example connects to the Administration Server and instructs it to resume a Managed Server:

java weblogic.Admin -url t3s://AdminHost:9002 -username weblogic 
-password weblogic RESUME GrapeManagedServer

 


SHUTDOWN

Gracefully shuts down the specified WebLogic Server instance.

A graceful shutdown gives WebLogic Server subsystems time to complete certain application processing currently in progress. By default, a server instance waits for pending HTTP sessions to finish as a part of the graceful shutdown. You can override this behavior using the -ignoreExistingSessions argument.

In release 6.x, this command included an option to specify a number of seconds to wait before starting the shutdown process. This option is now deprecated. To support this deprecated option, this command assumes that a numerical value in the field immediately after the SHUTDOWN command indicates seconds. Thus, you cannot use this command to gracefully shut down a server whose name is made up entirely of numbers. Instead, use the Administration Console.

Instead of specifying a delay in the SHUTDOWN command, you can now use a -timeout option, or set attributes in the Administration Console to control how a server shuts down.

If a server instance is in a deadlocked state, it can respond to weblogic.Admin commands only if you have enabled the domain-wide administration port. (A deadlocked server is one in which all threads are struck trying to acquire locks held by other threads.) If you have not already enabled the domain-wide administration port, your only option for shutting down the server instance is to kill the Java process that is running the server. You will lose all session data.

 

Syntax

java [ SSL Arguments ] \
     [ -Dweblogic.system.BootIdentityFile=filename  
     [ -Dweblogic.RootDirectory=path ] ] \
     weblogic.Admin  \
     [ Connection Arguments ]  \
     [ User Credentials Arguments ] \
     SHUTDOWN  \
     [ -ignoreExistingSessions]  \
     [ -timeout seconds ]  \
     [ targetServer] 

Argument Definition
-Dweblogic.system.BootIdentityFile=filename
[-Dweblogic.RootDirectory=path]
Cause the command to retrieve encrypted user credentials from a boot identity file.

Use these arguments if you invoke this command from a script, you have not created a user configuration file, and you do not want to store user credentials in your script.

If you do you not use the -username argument or a user configuration file to specify credentials, the command retrieves user credentials from a boot properties file as follows:

  • If you invoke the command from a server's root directory, and if the server's root directory contains a valid boot.properties file, it retrieves credentials from this file by default. For information about a server's root directory, refer to "A Server's Root Directory."

  • If you invoke the command from a server's root directory, but the server's boot identity file is not in the server's root directory or is not named boot.properties, the command can use a boot identity file if you include the following argument:

-Dweblogic.system.BootIdentityFile=filename

where filename is the fully qualified pathname of a valid boot identity file.

  • If you do not invoke the command from a server's root directory, the command can use a boot identity file if you include both of the following arguments in the command:

-Dweblogic.system.BootIdentityFile=filename
-Dweblogic.RootDirectory=path

where filename is the fully qualified pathname of a valid boot identity file and
path is the relative or fully-qualified name of the server's root directory.

  • If you have not created a boot identity file for a server, or if you do not want to use it, use the -username and -password arguments to provide user credentials.

  • If you specify both -Dweblogic.system.BootIdentityFile=filename and -username and -password, the command uses the credentials specified in the -username and -password arguments.
-ignoreExistingSessions Causes a graceful shutdown operation to drop all HTTP sessions immediately. If you do not specify this option, the command refers to the Ignore Sessions During Shutdown setting for the server in the domain's config.xml file.

By default, a graceful shutdown operation waits for HTTP sessions to complete or timeout.

-timeout seconds The number of seconds subsystems have to complete in-flight work and suspend themselves.

If you specify a timeout value and the subsystems do not complete work and suspend themselves within that period, WebLogic Server will perform a forced shutdown on the server instance.

If you do not specify a value, the SHUTDOWN command defers to the Graceful Shutdown Timeout setting that is specified on the Server—>Control—>Start/Stop tab of the Administration Console. By default, this setting is 0, which means that the server will wait indefinitely for graceful shutdown to complete.

targetServer The name of the server to shut down.

If you do not specify a value, the command shuts down the server that you specified in the -url argument.

seconds (Deprecated) Number of seconds allowed to elapse between the invoking of this command and the shutdown of the server.
"stringMessage" (Deprecated) Message, in double quotes, to be supplied in the message that is sent if a user tries to log in while the WebLogic Server is being shut down.

 

 

Example

The following example instructs the Administration Server to shut down a Managed Server:

java weblogic.Admin -url AdminHost:7001 -username weblogic 
-password weblogic SHUTDOWN GrapeManagedServer

After you issue the command, GrapeManagedServer prints messages to its log file and to its standard out. The messages indicate that the server state is changing and that the shutdown sequence is starting.

If the command succeeds, the final message that the target server prints is as follows:

<Oct 12, 2002 11:28:59 AM EDT> <Alert> <WebLogicServer> <000219> <The
shutdown sequence has been initiated.> 

In addition, if the command succeeds, the weblogic.Admin utility returns the following:

Server "GrapeManagedServer" was shutdown successfully ...

In the following example, the Administration Server is not available. The same user connects to a Managed Server and instructs it to shut itself down:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
-password weblogic SHUTDOWN 

The following example provides user credentials by referring to a boot identity file. The example specifies the server's root directory and boot identity file name so that it can be invoked from any directory:

java -Dweblogic.system.BootIdentityFile=/mydomain/boot.properties
 -Dweblogic.RootDirectory=/mydomain weblogic.Admin
 -url AdminHost:7001 SHUTDOWN

 


START

Starts a Managed Server using Node Manager.

This command requires the following environment:

  • The domain's Administration Server must be running.
  • The Node Manager must be running on the Managed Server's host machine.
  • The Managed Server must be configured to communicate with a Node Manager.

The Startup Mode field in the Administration Console determines whether a Managed Server starts in the RUNNING state or STANDBY state.

 

Syntax

java [ SSL Arguments ] weblogic.Admin 
   [-url URL]
   [ User Credentials Arguments ]
   START targetServer 

Argument Definition
-url [protocol://]address:port Must specify the listen address and listen port of the domain's Administration Server.

If you specify a secure listen port, also specify a secure protocol.

If you do not specify a value, the command assumes t3://localhost:7001.

targetServer The name of the Managed Server to start in a RUNNING state.

 

 

Example

The following example instructs the Administration Server and Node Manager to start a Managed Server:

java weblogic.Admin -url AdminHost:7001 -username weblogic 
-password weblogic START GrapeManagedServer

When you issue the command, the following occurs:

  1. The Administration Server determines which machine GrapeManagedServer is configured to run on. It instructs the Node Manager that is running on that machine to start GrapeManagedServer in the state that the Start Mode field specifies.
  2. The Node Manager indicates its progress by writing messages to its standard out. You can view these messages from the Administration Console on the Server—>Control—>Remote Start Output tab.
  3. If the command succeeds, the weblogic.Admin utility returns to the following message:

Server "GrapeManagedServer" was started ...
Please refer to server log files for completion status ... 

 


STARTINSTANDBY

(Deprecated) Starts a Managed Server using Node Manager.

In previous releases, this command started a Managed Server using the Node Manager and placed it in a STANDBY state. In this state, a server is not accessible to requests from external clients.

In the current release, the Startup Mode field in the Administration Console determines the state in which a Managed Server starts, regardless of which command you use to start the server instance. See "Starting a Managed Server in the STANDBY State in the Administration Console Help.

This command requires the following environment:

  • The domain's Administration Server must be running.

  • The Node Manager must be running on the Managed Server's host machine.

  • The Managed Server must be configured to communicate with a Node Manager.

  • The domain must be configured to use a domain-wide administration port.

 

Syntax

java [ SSL Arguments ] weblogic.Admin 
   [-url URL]
   [ User Credentials Arguments ]
   STARTINSTANDBY targetServer 

Argument Definition
-url secure-protocol://address:port You must specify the Administration Server and domain-wide administration port as follows:

t3s://Admin-Server-address:domain-wide-admin-port

or

https://Admin-Server-address:domain-wide-admin-port
targetServer The name of the WebLogic Server to start in the STANDBY state.

 

 

Example

The following example instructs the Administration Server and Node Manager to start a Managed Server:

java weblogic.Admin -url t3s://AdminHost:9002 -username weblogic 
-password weblogic STARTINSTANDBY GrapeManagedServer

When you issue the command, the following occurs:

  1. The Administration Server determines which machine GrapeManagedServer is configured to run on. It instructs the Node Manager that is running on that machine to start GrapeManagedServer in the state that the Start Mode field specifies.
  2. The Node Manager indicates its progress by writing messages to its standard out. You can view these messages from the Administration Console on the Server—>Control—>Remote Start Output tab.
  3. If the command succeeds, the weblogic.Admin utility returns to the following message:

Server "GrapeManagedServer" was started ...
Please refer to server log files for completion status ... 

When you use the Node Manager to start a Managed Server, the Node Manager writes standard out and standard error messages to its log file. You can view these messages from the Administration Console on the Machine—>Monitoring tab.

 


UNLOCK

(Deprecated) Unlocks the specified WebLogic Server after a LOCK operation.

This command is deprecated because the LOCK command is deprecated. Instead of LOCK and UNLOCK, use STARTINSTANDY and RESUME.

 

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
   UNLOCK

 

Example

In the following example, an administrator named adminuser with a password of gumby1234 requests the unlocking of the WebLogic Server listening on port 7001 on machine localhost:

java weblogic.Admin -url localhost:7001 -username adminuser 
   -password gumby1234 UNLOCK

 


Commands for Retrieving Information about WebLogic Server and Server Instances

Command Description
CONNECT Makes the specified number of connections to a WebLogic Server instance and returns two numbers representing the total time for each round trip and the average amount of time (in milliseconds) that each connection is maintained.
GETSTATE Returns the current state of the specified WebLogic Server instance.
HELP Provides syntax and usage information for all WebLogic Server commands (by default) or for a single command if a command value is specified on the HELP command line.
LICENSES Lists the licenses for all WebLogic Server instances that are installed on a specific server.
LIST Lists the bindings of a node in a server's JNDI naming tree.
PING Sends a message to verify that a WebLogic Server instance is listening on a port and is ready to accept client requests.
SERVERLOG

Displays the server log file generated on a specific server instance.

THREAD_DUMP Provides a real-time snapshot of the WebLogic Server threads that are currently running on a particular instance.
VERSION Displays the version of the WebLogic Server software that is running on the machine specified by the value of URL.


 

 


CONNECT

Connects to a WebLogic Server instance and returns two numbers representing the total time for each round trip and the average amount of time (in milliseconds) that each connection is maintained.

 

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
   CONNECT [count] 

Argument Definition
-url [protocol://]address:port Specify the listen address and listen port of the server instance to which you want to connect. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001.
count Number of connections the weblogic.Admin utility makes to the specified server instance. By default, this command makes only one connection.

 

Example

In the following example, the weblogic.Admin utility establishes 10 connections to a WebLogic Server instance whose listen address is ManagedHost and listen port is 8001:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
   -password weblogic CONNECT 10

If the command establishes the connections, it returns the following information:

Connection: 0 - 3,229 ms
Connection: 1 - 17 ms
Connection: 2 - 14 ms
Connection: 3 - 20 ms
Connection: 4 - 18 ms
Connection: 5 - 25 ms 
Connection: 6 - 27 ms 
Connection: 7 - 15 ms 
Connection: 8 - 15 ms
Connection: 9 - 15 ms 
  RTT = ~3422 milliseconds, or ~342 milliseconds/connection  

If the command does not establish a connection, it returns nothing.

In this example, the first connection required 3,229 milliseconds and the second connection required 17 milliseconds. The average time for all connections was 3422 milliseconds.

 


GETSTATE

Returns the current state of a server.

If a server instance is in a deadlocked state, it can respond to weblogic.Admin commands only if you have enabled the domain-wide administration port. (A deadlocked server is one in which all threads are struck trying to acquire locks held by other threads.) If you have not already enabled the domain-wide administration port, your only option is to shut down the server instance by killing the Java process that is running the server. You will lose all session data.

 

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [ Connection Arguments ] 
     [ User Credentials Arguments ]
   GETSTATE [targetServer]

Argument Definition
targetServer The name of the server for which you want to retrieve the current state. If you do not specify a value, the command returns the state of the server that you specified in the -url argument.

 

Example

The following example returns the state of a WebLogic Server instance that runs on a machine named AdminHost:

java weblogic.Admin -url AdminHost:7001 -username weblogic 
   -password weblogic GETSTATE

If the command succeeds for a running server, it returns the following:

Current state of "GrapeServer" : RUNNING

 


HELP

Provides syntax and usage information for all WebLogic Server commands (by default) or for a single command if a command value is specified on the HELP command line.

You can issue this command from any computer on which the WebLogic Server is installed. You do not need to start a server instance to invoke this command, nor do you need to supply user credentials.

Syntax

java weblogic.Admin HELP [COMMAND]

Example

In the following example, information about using the PING command is requested:

java weblogic.Admin HELP PING

The command returns the following:

Usage: java [SSL trust options]
    weblogic.Admin [ [-url | -adminurl] [<protocol>://]<address>:<port>]
    -username <username> -password <password>
    PING <roundTrips> <messageLength>

Where:
roundTrips = Number of pings.
messageLength = Size of the packet (in bytes) to send in each ping. The default
size is 100 bytes. Requests for pings with packets larger than 10 MB throw exceptions.

Description: Sends a message to verify that a WebLogic Server instance is listen
ing on a port and is ready to accept WebLogic client requests.

Example(s):
Connecting through a non-secured port:
java weblogic.Admin -url t3://localhost:7001 -username weblogic -password weblog
ic ping 3 100

Connecting through an SSL port of a server that uses the demonstration keys and certificates:
|java -Dweblogic.security.TrustKeyStore=DemoTrust 
weblogic.Admin -url t3s:/localhost:7001 -username weblogic -password weblogic
PING <roundTrips> <messageLength>

 


LICENSES

Lists the BEA licenses for all WebLogic Server instances installed on the specified host.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [ Connection Arguments ] 
     [ User Credentials Arguments ]
   LICENSES

Example

The following command returns a list of licenses for a host named AdminHost:

java weblogic.Admin -url AdminHost:7001 -username weblogic 
   -password weblogic LICENSES

If the command establishes a connection, it returns license information to standard out.

 


LIST

Lists the bindings of a node in the JNDI naming tree.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [ Connection Arguments ] 
     [ User Credentials Arguments ]
   LIST [JNDIcontextName] 

Argument Definition
JNDIcontextName The JNDI context for lookup, for example, weblogic, weblogic.ejb, javax. By default, the command lists the bindings immediately below the InitialContext of the specified server instance.

 

Example

The following command returns the initial context for the GrapeServer example server that runs on a machine named AdminHost:

java weblogic.Admin -url AdminHost:7001 -username weblogic 
   -password weblogic LIST

If the command succeeds, it returns information similar to the following abbreviated output:

Contents of InitialContext
    jms: weblogic.jndi.internal.ServerNamingNode
  javax: weblogic.jndi.internal.ServerNamingNode
  mail: weblogic.jndi.internal.ServerNamingNode
...

To view the JNDI tree below the mail context, enter the following command:

java weblogic.Admin -url AdminHost:7001 \
                    -username weblogic \
                    -password weblogic \
                    LIST mail

If the command succeeds, it returns the following:

Contents of mail
  GrapeMailSession: javax.mail.Session  

 


PING

Sends a message to verify that a WebLogic Server instance is listening on a port and is ready to accept WebLogic client requests.

For information on returning a description of all servers in a cluster, refer to CLUSTERSTATE.

If a server instance is in a deadlocked state, it can respond to weblogic.Admin commands only if you have enabled the domain-wide administration port. (A deadlocked server is one in which all threads are struck trying to acquire locks held by other threads.) If you have not already enabled the domain-wide administration port, your only option is to shut down the server instance by killing the Java process that is running the server. You will lose all session data.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [ Connection Arguments ] 
     [ User Credentials Arguments ]
   PING [roundTrips] [messageLength]

Argument Definition
roundTrips Number of pings.
messageLength Size of the packet (in bytes) to be sent in each ping. Requests for pings with packets larger than 10 MB throw exceptions.

 

Example

The following command pings a server instance 10 times:

java weblogic.Admin -url AdminHost:7001 -username weblogic 
   -password weblogic PING 10

If the command succeeds, it returns output similar to the following:

Sending 10 pings of 100 bytes.
  RTT = ~46 milliseconds, or ~4 milliseconds/packet

The following command pings a server instance that is running on a host computer named ManagedHost:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
   -password weblogic PING 

 


SERVERLOG

Returns messages from the local log file of a server instance. The command returns messages only from the current log file; it does not return messages in log files that the server instance has archived (renamed) because of log file rotation.

By default, the command returns the first 500 messages from the current log file (messages within the file are ordered from oldest to newest). You can change the default behavior by specifying a time and date range, but you cannot change the number of messages to be returned. The command always returns up to 500 messages, depending on the number of messages in the log file.

For each message, the command returns the following message attributes, separated by spaces:

MessageID TimeStamp Severity Subsystem MessageText

This command can not be used to return the domain-wide log file. You can view the domain-wide log file from the Administration Console.

Syntax

java [ SSL Arguments ] weblogic.Admin [-url URL] [ User Credentials Arguments ] SERVERLOG [starttime [endtime]]

Argument Definition
-url [protocol://]address:port Specify the listen address and listen port of the server instance for which you want to retrieve the local log file. If you use the -url argument to specify the Administration Server, the command returns the local log file of the Administration Server. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001.
starttime Returns up to 500 messages in the current log file with a time stamp that is after the time you specify. The date format is yyyy/mm/dd. Time is indicated using a 24-hour clock. The start date and time are entered inside quotation marks, in the following format: "yyyy/mm/dd hh:mm"

By default, SERVERLOG returns up to 500 messages in chronological order starting from the beginning of the current log file.

endtime

Specifies the end of a time range and causes SERVERLOG to return up to 500 messages with a time stamp that is after starttime and before endtime. The date format is yyyy/mm/dd. Time is indicated using a 24-hour clock. The end date and time are entered inside quotation marks, in the following format: "yyyy/mm/dd hh:mm"

By default, SERVERLOG returns up to 500 messages in chronological order starting with the starttime value and ending with the time at which you issued the SERVERLOG command.


 

Example

The following command returns all messages in the local log file of a server instance named GrapeManagedServer and pipes the output through the command shell's more command:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
   -password weblogic SERVERLOG | more

If the command succeeds, it returns output similar to the following truncated example:

130036    Oct 18, 2002 4:19:12 PM EDT Info  XML   Initializing XMLRegistry.
001007    Oct 18, 2002 4:19:13 PM EDT  Info   JDBC  Initializing... issued. 
001007    Oct 18, 2002 4:19:13 PM EDT  Info JDBC   Initialize Done issued.
190000    Oct 18, 2002 4:19:13 PM EDT   Info   Connector  Initializing J2EE Connector Service 
190001    Oct 18, 2002 4:19:13 PM EDT     Info     Connector J2EE Connector Service initialized successfully
...

The following command returns messages that were written to the local log file since 8:00 am today:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
   -password weblogic SERVERLOG 08:00

The following command returns messages that were written to the local log file between 8:00 am and 8:30 am on October 18, 2002:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
 -password weblogic SERVERLOG "2002/10/18 08:00" "2002/10/18 08:30"

 


THREAD_DUMP

Prints a snapshot of the WebLogic Server threads that are currently running for a specific server instance. The server instance prints the snapshot to its standard out.

If a server instance is in a deadlocked state, it can respond to weblogic.Admin commands only if you have enabled the domain-wide administration port. (A deadlocked server is one in which all threads are struck trying to acquire locks held by other threads.) If you have not already enabled the domain-wide administration port, your only option is to shut down the server instance by killing the Java process that is running the server. You will lose all session data.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [ Connection Arguments ] 
     [ User Credentials Arguments ]
     THREAD_DUMP

Example

The following example causes a server instance that is running on a host named ManagedHost to print a thread dump to standard out:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
-password weblogic THREAD_DUMP 

If the command succeeds, the command itself returns the following:

Thread Dump is available in the command window that is running the server.

The server instance prints a thread dump to its standard out, which, by default, is the shell (command prompt) within which the server instance is running.

 


VERSION

Displays the version of the WebLogic Server software that is running the server instance you specify with the -url argument.

Syntax

java weblogic.Admin [-url URL] -username username 
   [-password password] VERSION

Argument Definition
-url [protocol://]address:port Specify the listen address and listen port of a WebLogic Server instance. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001.

 

Example

The following command displays the version of the WebLogic Server software that is currently running on a host named ManagedHost:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
   -password weblogic VERSION

If the command succeeds, it returns output similar to the following:

WebLogic Server 8.1  Sat Oct 15 22:51:04 EDT 2002 207896
WebLogic XMLX Module 8.1  Sat Oct 15 22:51:04 EDT 2002 207896

 


Commands for Managing JDBC Connection Pools

Note: All JDBC commands are privileged commands. You must supply the username and password for a WebLogic Server administrative user to use these commands.

Command Description
CREATE_POOL Creates a connection pool.
DELETE_POOL Deletes the MBean and the configuration for the connection pool. Replaces DESTROY_POOL.
DESTROY_POOL (Deprecated) Closes all connections in the connection pool and deletes the connection pool configuration. Use DELETE_POOL instead.
SUSPEND_POOL Disables the pool, suspending all operations on pool connections until the pool is re-enabled. Replaces DISABLE_POOL.
DISABLE_POOL (Deprecated) Temporarily disables a connection pool, preventing any clients from obtaining a connection from the pool. Use SUSPEND_POOL instead.
RESUME_POOL Re-enables a connection pool after it has been suspended. Replaces ENABLE_POOL.
ENABLE_POOL (Deprecated) Enables a connection pool after it has been disabled. The JDBC connection states for each in-use connection are exactly as they were when the connection pool was disabled; clients can continue JDBC operations exactly where they left off.

Use RESUME_POOL instead.

TEST_POOL Tests a connection pool by reserving and releasing a connection from the connection pool. Requires testConnsOnReserve or testConnsOnRelease to be true and testTableName must be set.
RESET_POOL Closes and reopens all allocated connections in a connection pool. This may be necessary after the DBMS has been restarted, for example. Often when one connection in a connection pool has failed, all of the connections in the pool are bad.
SHUTDOWN_POOL Closes all connections in the connection pool and undeploys the connection pool on all targets.
EXISTS_POOL Tests whether a connection pool with a specified name exists in a specified WebLogic Server instance. Use this command to determine whether a dynamic connection pool has already been created or to ensure that you select a unique name for a dynamic connection pool you want to create.

 

 


CREATE_POOL

Creates a connection pool on the WebLogic Server instance running at the specified URL.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [ Connection Arguments ] 
     [ User Credentials Arguments ]
   CREATE_POOL poolName props=myProps,initialCapacity=1,maxCapacity=1,
   capacityIncrement=1,allowShrinking=true,shrinkPeriodMins=15,
   driver=myDriver,url=myURL, testConnsOnReserve=true,
   testTableName=tablename

Argument Definition
poolName Required. A unique name of the connection pool. Must be unique in the domain.
aclName (Deprecated) Identifies the different access lists within fileRealm.properties in the server configuration directory. Paired name must be dynaPool.
props Required. Database connection properties; typically in the format "database login name; server network id". Required entries vary by DBMS. Separate property value pairs with a semicolon.
password Optional. Database login password. This value overrides any database password specified in props.
initialCapacity Optional. Initial number of connections in a pool. If this property is defined, WebLogic Server creates these connections at boot time. Default is 1; cannot exceed maxCapacity.
maxCapacity Optional. Maximum number of connections allowed in the pool. Default is 1; if defined, maxCapacity should be =>1.
capacityIncrement Optional. Number of connections to add at a time when the connection pool is expanded. Default = 1.
allowShrinking Optional. Indicates whether or not the pool can shrink when connections are detected to not be in use.
Default = true.
shrinkPeriodMins Optional. Interval between shrinking. Units in minutes. Minimum = 1.If allowShrinking = True, then default = 15 minutes.
driver Required. Fully qualified driver classname of the JDBC driver.
url Required. URL of the database as required by the JDBC driver. Format varies by DBMS.
testConnsOnReserve Optional. Indicates reserved test connections. Default = False.
testConnsOnRelease Optional. Indicates test connections when they are released. Default = False.
testTableName Optional. Database table used when testing connections; must be present for tests to succeed. Required if either testConnsOnReserve or testConnsOnRelease are defined. Can also be a SQL query instead of a database table name. To use a SQL query, enter SQL followed by a space and the SQL query to run in place of the standard test.
refreshPeriod Optional. Sets the connection refresh interval in minutes. Every unused connection will be tested using testTableName. Connections that do not pass the test will be closed and reopened in an attempt to reestablish a valid physical database connection. If TestTableName is not set then the test will not be performed.
loginDelaySecs Optional. The number of seconds to delay before creating each physical database connection. This delay takes place both during initial pool creation and during the lifetime of the pool whenever a physical database connection is created. Some database servers cannot handle multiple requests for connections in rapid succession. This property allows you to build in a small delay to let the database server catch up. This delay takes place both during initial pool creation and during the lifetime of the pool whenever a physical database connection is created.

 

Example

The following example creates a connection pool named demoPool on the GrapeManagedServer instance running on the host machine named ManagedHost and listening at port 8001:

java weblogic.Admin -url t3://ManagedHost:8001 -username weblogic
   -password weblogic CREATE_POOL demoPool
   url=jdbpointbase:server://localhost:9092/demo,
   driver=com.pointbase.jdbc.jdbcUniversalDriver,
   testConnsOnReserve=true,
   testTableName=SYSTABLES,
   initialCapacity=2
   maxCapacity=10
   capacityIncrement=2
   allowShrinking=true
   props=user=examples;password=examples

If the command succeeds, it returns output similar to the following:

Connection pool "demoPool" created successfully.

 


DELETE_POOL

Removes all targets for the connection pool and then deletes the connection pool from the configuration.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
   DELETE_POOL -poolName poolName

Argument Definition
-url [protocol://]address:port Optional. Specify the listen address and listen port of the Administration Server. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001.
-poolName Required. The name of the connection pool to delete.

 

Example

The following command deletes a connection pool named demoPool on a managed server instance of WebLogic Server is running on a machine named AdminHost:

java weblogic.Admin -username weblogic -password weblogic 
   -url AdminHost:7001 DELETE_POOL -poolName demoPool

If the command succeeds, it returns output similar to the following:

The pool demoPool was successfully deleted from the configuration.

 


DESTROY_POOL

(Deprecated) Connections are closed and removed from the pool and the pool is destroyed when it has no remaining connections.

This command is deprecated. Use DELETE_POOL or SHUTDOWN_POOL instead.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
   DESTROY_POOL poolName [true|false]

Argument Definition
-url [protocol://]address:port Specify the listen address and listen port of the Administration Server. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001.
poolName

Required. Unique name of pool.

false (soft shutdown)

Soft shutdown waits for connections to be returned to the pool before closing them.

true (default—hard shutdown)

Hard shutdown kills all connections immediately. Clients using connections from the pool get exceptions if they attempt to use a connection after a hard shutdown.


 

Example

The following command destroys a connection pool named demoPool in a WebLogic Domain with the Administration Server running on a machine named AdminHost and listening at port 7001.

java weblogic.Admin -url AdminHost:7001 -username weblogic
   -password weblogic DESTROY_POOL demoPool false

 


SUSPEND_POOL

Disables the pool, suspending all operations on pool connections until the pool is re-enabled. With the false argument, if connections are in use, applications using a connection will get an exception. WebLogic Server preserves all connections in the connection pool exactly as they were before the connection pool was suspended. With the true argument (force suspend), applications that are currently using a connection are forcibly disconnected, and connections that were in use when the connection pool was suspended are recreated (closed and reopened). Any transaction on the connections that are closed are rolled back. WebLogic Server preserves all other connections exactly as they were before the connection pool was suspended.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
   SUSPEND_POOL -poolName connection_pool_name [true | false]

Argument Definition
-url [protocol://]address:port Optional. Specify the listen address and listen port of a WebLogic Server instance on which the connection pool has been deployed. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001. For more information, refer to the -url entry in Table 1-3 on page 11 and Protocol Support.
-poolName Required. The name of the connection pool to suspend.
false Applications using a connection will get an exception. WebLogic Server preserves all connections in the connection pool exactly as they were before the connection pool was suspended.
true Force suspend—applications that are currently using a connection are forcibly disconnected, and connections that were in use when the connection pool was suspended are recreated (closed and reopened).

 

Example

The following command suspends a connection pool named demoPool on a WebLogic Server instance where the administration server is running on a machine named AdminHost:

java weblogic.Admin -url AdminHost:7001 -username weblogic 
   -password weblogic SUSPEND_POOL -poolName demoPool false

If the command succeeds, it returns output similar to the following:

Connection pool demoPool is suspended successfully.

 


DISABLE_POOL

(Deprecated) You can temporarily disable a connection pool, preventing any clients from obtaining a connection from the pool.

You have the following options for disabling a pool. 1) Freeze the connections in a pool that you later plan to enable, or 2) Destroy the connections.

This command is deprecated. Use SUSPEND_POOL instead.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
   DISABLE_POOL poolName [true|false]

Argument Definition
-url [protocol://]address:port Optional. Specify the listen address and listen port of a WebLogic Server instance on which the connection pool has been deployed. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001. For more information, refer to the -url entry in Table 1-3 on page 11 and Protocol Support.
poolName

Name of the connection pool

false (disables and suspends)

Disables the connection pool, and suspends clients that currently have a connection. Attempts to communicate with the database server throw an exception. Clients can, however, close their connections while the connection pool is disabled; the connections are then returned to the pool and cannot be reserved by another client until the pool is enabled.

true (default—disables and destroys)

Disables the connection pool, and destroys the client's JDBC connection to the pool. Any transaction on the connection is rolled back and the connection is returned to the connection pool.


 

Example

In the following example, the command disables a connection pool named demoPool in a WebLogic domain where the Administration Server is running on a machine named AdminHost and listening at port 7001. This command freezes connections to be enabled later:

java weblogic.Admin -url AdminHost:7001 -username weblogic
   -password weblogic DISABLE_POOL demoPool false

 


RESUME_POOL

Re-enables a connection pool that you disabled with the SUSPEND_POOL command. RESUME_POOL marks the connection pool as enabled and allows applications to use connections from the connection pool. If you suspended the connection pool with the false argument (not force suspend), all connections are preserved exactly as they were before the connection pool was suspended. Applications that had reserved a connection before the connection pool was suspended can continue JDBC operations exactly where they left off. If you suspended the connection pool with the true argument (force suspend), connections that were not in use when the connection pool was suspended are preserved exactly as they were before the suspension. Connections that were in use were closed and reopened. Applications that had reserved a connection no longer have a valid JDBC context.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
   RESUME_POOL -poolName connection_pool_name

Argument Definition
-url [protocol://]address:port Optional. Specify the listen address and listen port of a WebLogic Server instance on which the connection pool has been deployed and is suspended. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001. For more information, refer to the -url entry in Table 1-3 on page 11 and Protocol Support.
-poolName Required. The name of the connection pool to resume.

 

Example

The following command resumes (re-enables) a connection pool named demoPool:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
   -password weblogic RESUME_POOL -poolName demoPool

If the command succeeds, it returns output similar to the following:

Connection pool demoPool is resumed successfully.

 


ENABLE_POOL

(Deprecated) When a pool is enabled, the JDBC connection states for each in-use connection are exactly as they were when the connection pool was disabled; clients can continue JDBC operations exactly where they left off.

This command is deprecated. Use RESUME_POOL instead.

Syntax

java weblogic.Admin [-url URL]
   -username username [-password password]
   ENABLE_POOL poolName 

Argument Definition
-url [protocol://]address:port Optional. Specify the listen address and listen port of a WebLogic Server instance on which the connection pool has been deployed and is disabled. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001. For more information, refer to the -url entry in Table 1-3 on page 11 and Protocol Support.
poolName Name of the connection pool.

 

Example

In the following command, a connection pool named demoPool is re-enabled after being disabled:

java weblogic.Admin -url AdminHost:7001 \
                    -username weblogic \
                    -password weblogic \
                    ENABLE_POOL demoPool

 


TEST_POOL

Reserves and releases a connection from the connection pool. The command also runs a test query using the connection, either before reserving the connection or after releasing the connection, to make sure the database is available. This command requires that either testConnsOnReserve or testConnsOnRelease is set to true and testTableName is specified.

Note: The TEST_POOL command tests an individual instance of the connection pool. To test all instances (deployments) of the connection pool, repeat the command for each instance in your configuration.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
   TEST_POOL poolName

Argument Definition
-url [protocol://]address:port Specify the listen address and listen port of a WebLogic Server instance on which the connection pool has been deployed. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001. For more information, refer to the -url entry in Table 1-3 on page 11 and Protocol Support.
poolName Name of the connection pool as listed in the configuration file (config.xml).

 

Example

This command tests the connection pool registered as GrapePool and deployed on a server that listens on port 8001 of the host ManagedHost:

java weblogic.Admin -url ManagedHost:8001 -username weblogic -password weblogic TEST_POOL GrapePool

If the command succeeds, it returns the following:

JDBC Connection Test Succeeded for connection pool "GrapePool".

 


RESET_POOL

This command closes and reopens the database connections in a connection pool.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
   RESET_POOL poolName

Argument Definition
-url [protocol://]address:port Optional. Specify the listen address and listen port of a WebLogic Server instance on which the connection pool has been deployed. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001. For more information, refer to the -url entry in Table 1-3 on page 11 and Protocol Support.
poolName Name of the connection pool as listed in the configuration file (config.xml).

 

Example

This command closes and reopens database connection in the connection pool named demoPool for the WebLogic Server instance listening on port 7001 of the host AdminHost.

 java weblogic.Admin -url AdminHost:7001 -username weblogic
   -password weblogic RESET_POOL demoPool

 


SHUTDOWN_POOL

Shuts down the connection pool by closing all database connections. With the false argument, if applications are currently using any connections from the pool, the operation will fail. With the true argument (force shutdown), all applications that are currently using a connection from the connection pool are forcibly disconnected.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
   SHUTDOWN_POOL -poolName connection_pool_name [true | false]

Argument Definition
-url [protocol://]address:port Optional. Specify the listen address and listen port of a WebLogic Server instance on which the connection pool has been deployed. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001. For more information, refer to the -url entry in Table 1-3 on page 11 and Protocol Support.
-poolName Required. The name of the connection pool to shut down.
false If applications are currently using any connections from the pool, the operation will fail.
true Force shutdown—all applications that are currently using a connection from the connection pool are forcibly disconnected..

 

Example

The following command shuts down a connection pool named demoPool on a WebLogic Server instance running on a machine named AdminHost and listening at port 7001:

java weblogic.Admin -url AdminHost:7001 -username weblogic 
   -password weblogic SHUTDOWN_POOL -poolName demoPool false

If the command succeeds, it returns output similar to the following:

Connection pool demoPool is shutdown successfully.

 


EXISTS_POOL

Tests whether a connection pool with a specified name exists in the WebLogic Server domain. You can use this method to determine whether a dynamic connection pool has already been created or to ensure that you select a unique name for a dynamic connection pool you want to create.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
   EXISTS_POOL poolName

Argument Definition
-url [protocol://]address:port Specify the listen address and listen port of the Administration Server. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001. For more information, refer to the -url entry in Table 1-3 on page 11 and Protocol Support.
poolName Name of connection pool.

 

Example

The following command determines wether or not a pool with a specific name exists:

java weblogic.Admin -url AdminHost:7001 -username weblogic
   -password weblogic EXISTS_POOL demoPool

 


Commands for Managing WebLogic Server MBeans

The following sections describe weblogic.Admin commands for managing WebLogic Server MBeans.

Specifying MBean Types

To specify which MBean or MBeans you want to access, view, or modify, all of the MBean management commands require either the -mbean argument or the -type argument.

Use the -mbean argument to operate on a single instance of an MBean.

Use the -type argument to operate on all MBeans that are an instance of a type that you specify. An MBean's type refers to the interface class of which the MBean is an instance. All WebLogic Server MBeans are an instance of one of the interface classes defined in the weblogic.management.configuration or weblogic.management.runtime packages. For configuration MBeans, type also refers to whether an instance is an Administration MBean or a Local Configuration MBean. For a complete list of all WebLogic Server MBean interface classes, refer to the WebLogic Server Javadoc for the weblogic.management.configuration or weblogic.management.runtime packages.

To determine the value that you provide for the -type argument, do the following:

  1. Find the MBean's interface class and remove the MBean suffix from the class name. For an MBean that is an instance of the weblogic.management.runtime.JDBCConnectionPoolRuntimeMBean, use JDBCConnectionPoolRuntime.
  2. For a Local Configuration MBean, append Config to the name. For example, for a Local Configuration MBean that is an instance of the weblogic.management.configuration.JDBCConnectionPoolMBean interface class, use JDBCConnectionPoolConfig. For the corresponding Administration MBean instance, use JDBCConnectionPool.

MBean Management Commands

Table 1-7 is an overview of the MBean management commands.

Command Description
CREATE Creates an Administration MBean instance. This command cannot be used for Runtime MBeans and we recommend that you do not use it to create Local Configuration MBeans. See CREATE.
DELETE Deletes an MBean instance. See DELETE.
GET Displays properties of MBeans. See GET.
INVOKE Invokes management operations that an MBean exposes for its underlying resource. See INVOKE.
QUERY Searches for MBeans whose WebLogicObjectName matches a pattern that you specify. See QUERY.
SET Sets the specified property values for the named MBean instance. This command cannot be used for Runtime MBeans. See SET.

 

 


CREATE

Creates an instance of a WebLogic Server Administration or Local Configuration MBean, however, BEA recommends that you do not use it to create Local Configuration MBeans. This command cannot be used for Runtime MBeans.

If the command is successful, it returns OK.

When you use this command to create an Administration MBean instance, use the -url argument to specify the Administration Server. WebLogic Server populates the Administration MBean with default values and saves the MBean's configuration in the domain's config.xml file. For some types of Administration MBeans, WebLogic Server does not create the corresponding Local Configuration MBean replica until you restart the server instance that hosts the underlying managed resource. For example, if you create a JDBCConnectionPool Administration MBean to manage a JDBC connection pool on a Managed Server named ManagedGrapeServer, restart ManagedGrapeServer so that it can create its local replica of the JDBCConnectionPool Administration MBean that you created. For more information on MBean replication and the life cycle of MBeans, refer to "MBeans for Configuring Managed Resources in the Programming WebLogic Management Services with JMX guide.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
   CREATE -name name -type mbeanType 

or

java [ SSL Arguments ] weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
   CREATE -mbean objectName 

Argument Definition
-url [protocol://]address:port Specify the listen address and listen port of the Administration Server. You can create Administration MBeans only on the Administration Server.

  • If you specify a secure listen port, also specify a secure protocol.
  • If you do not specify a value, the command assumes t3://localhost:7001.

Although the CREATE command also supports the -adminurl argument, we recommend that you do not use CREATE to create Local Configuration MBeans.

-name name The name you choose for the MBean that you are creating.
-type mbeanType The type of MBean that you are creating. For more information, refer to Specifying MBean Types.
-mbean objectName Fully qualified object name of an MBean in the a href="../javadocs/weblogic/management/WebLogicObjectName.html">WebLogicObjectName format. For example:


domain:Type=type,Name=name"
For more information, refer to the Javadoc for WebLogicObjectName.

 

Example

The following example uses the -name and -type arguments to create a JDBCConnectionPool Administration MBean named myPool on an Administration Server:

java weblogic.Admin -url AdminHost:7001 -username weblogic 
   -password weblogic CREATE -name myPool -type JDBCConnectionPool

If the command succeeds, it prints the following to standard out:

Ok

The following example uses the -mbean argument and a href="../javadocs/weblogic/management/WebLogicObjectName.html">WebLogicObjectName conventions to create a JDBCConnectionPool Administration MBean named myPool on an Administration Server:

java weblogic.Admin -url AdminHost:7001 -username weblogic
   -password weblogic 
    CREATE -mbean "mydomain:Type=JDBCConnectionPool,Name=myPool"

 


DELETE

Deletes MBeans. If you delete an Administration MBean, WebLogic Server removes the corresponding entry from the domain's config.xml file.

If the command is successful, it returns OK.

Note: When you delete an Administration MBean, a WebLogic Server instance does not delete the corresponding Configuration MBean until you restart the server instance.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [ {-url URL} |   
       {-adminurl[protocol://]Admin-Server-address:port}
     ]
     [ User Credentials Arguments ]
   DELETE {-type mbeanType|-mbean objectName}

Arguments Definition
{-url [protocol://]address:port} or {-adminurl [protocol://]Admin-Server-address:port} To delete Administration MBeans, use -url to specify the Administration Server's listen address and listen port. To delete Runtime MBeans or Local Configuration MBeans, use one of the following:

  • -url to specify the listen address and listen port of the server instance on which you want to delete MBeans.

  • -adminurl to delete instances of a Runtime or Local Configuration MBean type from all server instances in the domain.
For more information, refer to the -url and -adminurl entries in Table 1-3 on page 11 and Protocol Support.
-type mbeanType Deletes all MBeans of the specified type. For more information, refer to Specifying MBean Types.
-mbean objectName Fully qualified object name of an MBean in the a href="../javadocs/weblogic/management/WebLogicObjectName.html">WebLogicObjectName format. For example:
domain:Type=type,Name=name" For more information, refer to the Javadoc for WebLogicObjectName.

 

Example

The following example deletes the JDBCConnectionPool Administration MBean named myPool:

java weblogic.Admin -url AdminHost:7001 -username weblogic 
 -password weblogic DELETE -mbean
 MedReName=myPool,Type=JDBCConnectionPool

If the command succeeds, it prints the following to standard out:

Ok

The following example deletes the JDBCConnectionPool Local Configuration MBean named myPool on a server instance named GrapeManagedServer:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
 -password weblogic DELETE -mbean
  MedReLocation=GrapeManagedServer,Name=myPool,
 Type=JDBCConnectionPoolConfig 

The following example deletes all JDBCConnectionPool Local Configuration MBeans for all server instances in the domain:

java weblogic.Admin -adminurl AdminHost:7001 -username weblogic 
   -password weblogic DELETE -type JDBCConnectionPoolConfig 

The following example deletes all JDBCConnectionPool Local Configuration MBeans on a server instance named GrapeManagedServer:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
 -password weblogic DELETE -type JDBCConnectionPoolConfig 

 


GET

Displays MBean properties (attributes) and JMX object names (in the a href="../javadocs/weblogic/management/WebLogicObjectName.html">WebLogicObjectName format).

The output of the command is as follows:

{MBeanName object-name {property1 value} {property2 value}. . .} 
. . .

Note that the properties and values are expressed as name-value pairs, each of which is returned within curly brackets. This format facilitates parsing of the output by a script.

If -pretty is specified, each property-value pair is displayed on a new line and curly brackets are not used to separate the pairs:

MBeanName: object-name
property1: value
property2: value
.
.
.
MBeanName: object-name
property1: value
abbribute2: value

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [ {-url URL} |   
       {-adminurl[protocol://]Admin-Server-address:port}
     ]
     [ User Credentials Arguments ]
   GET [-pretty] {-type mbeanType|-mbean objectName} 
   [-property property1] [-property property2]...

Argument Definition
{-url [protocol://]address:port} or {-adminurl [protocol://]Admin-Server-address:port} To retrieve Administration MBeans, use -url to specify the Administration Server's listen address and listen port. To retrieve Runtime MBeans or Local Configuration MBeans, use one of the following:

  • -url to specify the listen address and listen port of the server instance on which you want to retrieve MBeans.

  • -adminurl to retrieve instances of a Runtime or Local Configuration MBean type from all server instances in the domain.
For more information, refer to the -url and -adminurl entries in Table 1-3 on page 11 and Protocol Support.
-type mbeanType Returns information for all MBeans of the specified type. For more information, refer to Specifying MBean Types.
-mbean objectName Fully qualified object name of an MBean in the a href="../javadocs/weblogic/management/WebLogicObjectName.html">WebLogicObjectName format:
domain:Type=type,Location=location,Name=name"
-pretty Places property-value pairs on separate lines.
-property property The name of the MBean property (attribute) or properties to be listed.

Note: If property is not specified using this argument, all properties are displayed.


 

Example

The following example displays all properties of the JDBCConnectionPool Administration MBean for a connection pool named GrapePool. Note that the command must connect to the Administration Server to retrieve information from an Administration MBean:

java weblogic.Admin -url AdminHost:7001 -username weblogic 
 -password weblogic GET -pretty -mbean
 MedReName=GrapePool,Type=JDBCConnectionPool

If the command succeeds, it returns output similar to the following truncated example:

---------------------------

MBeanName: "MedReName=GrapePool,Type=JDBCConnectionPool" ACLName: CachingDisabled: true CapacityIncrement: 1 ConnLeakProfilingEnabled: false ConnectionCreationRetryFrequencySeconds: 0 ConnectionReserveTimeoutSeconds: 10 ...

The following example displays all instances of all JDBCConnectionPoolRuntime MBeans for all servers in the domain.

java weblogic.Admin -adminurl AdminHost:7001 -username weblogic 
 -password weblogic GET -pretty -type JDBCConnectionPoolRuntime

The following example displays all instances of all JDBCConnectionPoolRuntime MBeans that have been deployed on the server instance that listens on ManagedHost:8001:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
 -password weblogic GET -pretty -type JDBCConnectionPoolRuntime 

 


INVOKE

Invokes a management operation for one or more MBeans. For WebLogic Server MBeans, you usually use this command to invoke operations other than the getAttribute and setAttribute that most WebLogic Server MBeans provide.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [ {-url URL} |   
       {-adminurl[protocol://]Admin-Server-address:port}
     ]
     [ User Credentials Arguments ]
   INVOKE {-type mbeanType|-mbean objectName} -method 
   methodname [argument . . .]

Arguments Definition
{-url [protocol://]address:port}

or

{-adminurl [protocol://]Admin-Server-address:port}

To invoke operations for Administration MBeans, use -url to specify the Administration Server's listen address and listen port.

To invoke operations for Runtime MBeans, use one of the following:

  • -url to specify the listen address and listen port of the server instance on which you want to invoke Runtime MBean operations.

  • -adminurl to invoke operations for all instances of a Runtime MBean on all server instances in the domain.

We recommend that you do not invoke operations for Local Configuration MBeans. Instead, invoke the operation on the corresponding Administration MBean.

-type mbeanType Invokes the operation on all MBeans of a specific type. For more information, refer to Specifying MBean Types.
-mbean objectName Fully qualified object name of an MBean, in the WebLogicObjectName format:


domain:Type=type,Location=location,Name=name"
-method methodname Name of the method to be invoked.
argument Arguments to be passed to the method call. When the argument is a String array, the arguments must be passed in the following format:

"String1;String2;. . . "

 

Example

The following example enables a JDBC connection pool by invoking the enable method of the JDBCConnectionPoolRuntime MBean:

java weblogic.Admin -url AdminHost:7001 
                    -username weblogic 
                    -password weblogic INVOKE
                    -mbean MedReLocation=GrapeServer,Name=myPool,
                     ServerRuntime=Grape,Type=JDBCConnectionPoolRuntime 
                    -method enable

The following example enables all JDBC connection pools in the domain by invoking the enable method of all the JDBCConnectionPoolRuntime MBeans:

java weblogic.Admin -adminurl AdminHost:7001 -username weblogic 
 -password weblogic INVOKE
 -type JDBCConnectionPoolRuntime -method enable

 


QUERY

Searches for WebLogic Server MBeans whose WebLogicObjectName matches a pattern that you specify.

All MBeans that are created from a WebLogic Server MBean type are registered in the MBean Server under a name that conforms to the weblogic.management.WebLogicObjectName conventions. You must know an MBean's WebLogicObjectName if you want to use weblogic.Admin commands to retrieve or modify specific MBean instances. For more information, refer to "WebLogic Server Management Namespace in the Programming WebLogic Management Services with JMX guide.

The output of the command is as follows:

{MBeanName object-name {property1 value} {property2 value}. . .} 
. . .

Note that the properties and values are expressed as name-value pairs, each of which is returned within curly brackets. This format facilitates parsing of the output by a script.

If -pretty is specified, each property-value pair is displayed on a new line and curly brackets are not used to separate the pairs:

MBeanName: object-name
property1: value
property2: value
.
.
.
MBeanName: object-name
property1: value
abbribute2: value

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [ {-url URL} |   
       {-adminurl[protocol://]Admin-Server-address:port}
     ]
     [ User Credentials Arguments ]
   QUERY -pretty -pattern object-name-pattern 

Argument Definition
{-url [protocol://]address:port} or {-adminurl [protocol://]Admin-Server-address:port} To search for Administration MBean object names, use -url to specify the Administration Server's listen address and listen port. To search for the object names of Local Configuration or Runtime MBeans, use one of the following:

  • -url to specify the listen address and listen port of the server instance on which you want to search.

  • -adminurl to search on all server instances in the domain.
For more information, refer to the -url and -adminurl entries in Table 1-3 on page 11 and Protocol Support.
-pretty Places property-value pairs on separate lines.
-pattern A partial WebLogicObjectName for which the QUERY command searches. The value must conform to the following pattern: domain-name:property-list For the domain-name portion of the pattern, you can use the * character, which matches any character sequence. Because the server instance that you specify with the -url or -adminurl argument can access only the MBeans that belong to its domain, the * character is sufficient. For example, if you use -url to specify a server in the Grape domain, QUERY can only return MBeans that are in the Grape domain. It cannot search for MBeans in a domain named mydomain. For the property-list portion of the pattern, specify one or more components (property-value pairs) of a WebLogicObjectName. For a list of all WebLogicObjectName property-value pairs, refer to "WebLogic Server Management Namespace in the Programming WebLogic Management Services with JMX guide. (For example, all WebLogicObjectNames include Name=value and Type=value property-value pairs.) You can specify these property-value pairs in any order. Within a given naming property-value pair, there is no pattern matching. Only complete property-value pairs are used in pattern matching. However, you can use the * wildcard character in the place of one or more property-value pairs. For example, Name=Med* is not valid, but Name=GrapeServer,* is valid. If you provide at least one property-value pair in the property-list, you can locate the wildcard anywhere in the given pattern, provided that the property-list is still a comma-separated list.

 

Example

The following example searches for all JDBCConnectionPoolRuntime MBeans that are on a server instance that listens at ManagedHost:8001:

java weblogic.Admin -url ManagedHost:8001 -username weblogic 
 -password weblogic QUERY
 -pattern *:Type=JDBCConnectionPoolRuntime,*

If the command succeeds, it returns the following:

Ok

The following example searches for all instances of GrapePool MBeans on all servers in the current domain. It uses -adminurl, which instructs the Administration Server to query the Administration MBeanHome interface (This interface has access to all MBeans in the domain):

java weblogic.Admin -adminurl AdminHost:7001 -username weblogic 
 -password weblogic QUERY -pattern *:Name=GrapePool,*

If the command succeeds, it returns an instance of the JDBCConnectionPool Administration MBean that is named GrapePool, along with all corresponding Local Configuration and Runtime MBeans.

 


SET

Sets the specified property (attribute) values for a configuration MBean. This command cannot be used for Runtime MBeans.

If the command is successful, it returns OK.

When you use this command for an Administration MBean, the new values are saved to the config.xml file.

We recommend that you do not use this command to set values on a Local Configuration MBean. If you use this command for a Local Configuration MBean, the new values are not saved to the config.xml file. Depending on the attribute that you set, the subsystem that uses the MBean might not be able to modify its operation per the new value. In addition, some subsystems require that their Local Configuration MBeans be replicated throughout a domain. If you modify the value for a Local Configuration MBean on one server, the new value will not be replicated throughout the domain and the subsystem might not operate correctly.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
   SET {-type mbeanType|-mbean objectName}
   -property property1 property1_value 
   [-property property2 property2_value] . . .

Argument Definition
-url [protocol://]address:port Specifies the listen address and listen port of the Administration Server. Only the Administration Server can access Administration MBeans. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001. For more information, refer to the -url entry in Table 1-3 on page 11 and Protocol Support. Although the SET command supports the -adminurl, we recommend that you do not use it to set values of Local Configuration MBeans.
-type mbeanType Sets the properties for all MBeans of a specific type. For more information, refer to Specifying MBean Types.
-mbean objectName Fully qualified object name of an MBean in the WebLogicObjectName format. For example:
domain:Type=type,Name=name" For more information, refer to the Javadoc for WebLogicObjectName.
-property property The name of the property to be set.
property _value The value to be set.

  • Some properties require you to specify the name of a WebLogic Server MBean. In this case, specify the fully qualified object name of an MBean in the WebLogicObjectName format. For example:
    domain:Type=type,Name=name"
    For more information, refer to the Javadoc for WebLogicObjectName.

  • When the property value is an MBean array, separate each MBean object name by a semicolon and surround the entire property value list with quotes:
"domain:Name=name,Type=type;domain:Name=name,Type=type"

  • When the property value is a String array, separate each string by a semicolon and surround the entire property value list with quotes:
"String1;String2;. . . "

  • When the property value is a String or String array, you can set the value to null by using either of the following:

-property property-name ""
-property property-name

For example, both -property ListenAddress "" and -property ListenAddress set the listen address to null.

  • If the property value contains spaces, surround the value with quotes:

-Da=1 -Db=3"

For example:
SET -type ServerStart -property Arguments "-Da=1 -Db=3"

  • When setting the properties for a JDBC Connection Pool, pass the arguments in the following format:
"user:username;password:password;server:servername"

 

Example

The following example sets to 64 the StdoutSeverityLevel property of the local configuration instance of the ServerMBean for a server named GrapeManagedServer:

java weblogic.Admin -url http://ManagedHost:8001 
  -username weblogic -password weblogic 
  SET -mbean
  MedReLocation=GrapeManagedServer,Name=GrapeManagedServer,
  Type=ServerConfig
 -property StdoutSeverityLevel 64

If the command succeeds, the server instance writes a log message similar to the following:

<Sep 16, 2002 12:11:27 PM EDT> <Info> <Logging> <000000> <Log messages of every severity will be displayed in the shell console.>

The command prints Ok to standard out.

The following example sets to 64 the StdoutSeverityLevel property for all administration instances of ServerMBean in the current domain:

java weblogic.Admin -url http://AdminHost:7001 
  -username weblogic -password weblogic 
  SET -type Server -property StdoutSeverityLevel 64

 


Running Commands in Batch Mode

By default, each weblogic.Admin command that you invoke starts a JVM, acts on a server instance, and then shuts down the JVM. To improve performance for issuing several weblogic.Admin commands in an uninterrupted sequence, you can use the BATCHUPDATE command to run multiple commands in batch mode. The BATCHUPDATE command starts a JVM, runs a list of commands, and then shuts down the JVM.

For example, if a domain contains multiple server instances, you can create a file that returns the listen ports of all Managed Servers in a domain. Then you specify this file as an argument in weblogic.Admin BATCHUPDATE command.

 


BATCHUPDATE

Runs a sequence of weblogic.Admin commands. All output from commands that BATCHUPDATE runs is printed to standard out.

Using this command provides better performance than issuing a series of individual weblogic.Admin commands. For more information, refer to the previous section, Running Commands in Batch Mode.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [ {-url URL} |   
       {-adminurl[protocol://]Admin-Server-address:port}
     ]
     [ User Credentials Arguments ]
    BATCHUPDATE -batchFile fileLocation   
   [-continueOnError] [-batchCmdVerbose] 

Argument Definition
{-url [protocol://]address:port} or {-adminurl [protocol://]Admin-Server-address:port} If the batch file contains commands that access Administration MBeans, use -url to specify the Administration Server's listen address and listen port. If the batch file contains commands that access Local Configuration or Runtime MBeans, use one of the following:

  • -url to specify the listen address and listen port of the server instance on which you want to access MBeans.

  • -adminurl to access all Local Configuration or Runtime MBeans in the domain.
If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001. For more information, refer to the -url and -adminurl entries in Table 1-3 on page 11 and Protocol Support.
-batchfile fileLocation The name of a text file that contains a list of weblogic.Admin commands. If you use a relative pathname, the root context is the directory from which you issue the weblogic.Admin BATCHUPDATE command. The file must contain one or more commands, formatted as follows: COMMAND-NAME arguments Place each command on a separate line. Within the batch file, the BATCHUPDATE command ignores any line that begins with a # character.
-continueOnError If one of the commands fails or emits errors, weblogic.Admin ignores the error and continues to the next command. By default, weblogic.Admin stops processing commands as soon as it encounters an error.
-batchCmdVerbose Causes BATCHUPDATE to indicate which command it is currently invoking. As it invokes a command, BATCHUPDATE prints the following to standard out: Executing command: command-from-batchfile

 

Example

This example uses the BATCHUPDATE command to return the listen ports for a collection of server instances in a domain. A file named commands.txt contains the following lines:

get -mbean MedReName=GrapeServer,Type=Server -property ListenPort
get -mbean MedReName=GrapeManagedServer,Type=Server -property ListenPort     

The following command invokes the commands in commands.txt:

java weblogic.Admin -url AdminHost:7001 -username weblogic -password weblogic BATCHUPDATE -batchFile /commands.txt -continueOnError -batchCmdVerbose

If the command succeeds it outputs the following to standard out:

Executing command: get -mbean MedReName=GrapeServer,Type=Server -property ListenPort
{MBeanName="MedReName=GrapeServer,Type=Server"{ListenPort=7001}}
Executing command: get -mbean MedReName=GrapeManagedServer,Type=Server -property ListenPort
{MBeanName="MedReName=GrapeManagedServer,Type=Server"{ListenPort=7021}} 

 


Commands for Working with Clusters

Command Description
CLUSTERSTATE Returns the number and state of servers in a cluster.
MIGRATE Migrates a JMS service or a JTA service from one server instance to another within a cluster.
STARTCLUSTER Starts all servers in a cluster
STOPCLUSTER. Forces all servers in a cluster to shut down.
VALIDATECLUSTERCONFIG. Parses the domain's configuration file and reports any discrepancies in all cluster-related elements.

 

 


CLUSTERSTATE

Returns the number and state of servers in a cluster.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
   CLUSTERSTATE -clusterName clusterName 

Argument Definition
{-url [protocol://]address:port} Specify the listen address and listen port of any server instance that is currently active and that belongs to the cluster. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001.
-clusterName clusterName The name of the cluster as specified in the domain's configuration file (config.xml).

 

Example

The following example returns information about a cluster:

java weblogic.Admin 
     -url AdminHost:7001 
     -username weblogic 
     -password weblogic 
     CLUSTERSTATE -clustername 
     GrapeCluster

If the command succeeds, it returns output similar to the following:

There are 3 server(s) in cluster: GrapeCluster

The alive servers and their respective states are listed below:
GrapeManagedServer2---RUNNING
GrapeManagedServer3---RUNNING

The other server(s) in the cluster that are not active are:
GrapeManagedServer1

 


MIGRATE

Migrates a JMS service or a JTA Transaction Recovery service to a targeted server within a server cluster.

Syntax

To migrate JMS resources:

java [ SSL Arguments ] 
     weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
     MIGRATE 
     -migratabletarget 
     "serverName 
     (migratable)"
     -destination serverName 
     [-sourcedown] [-destinationdown]

To migrate JTA resources:

java [ SSL Arguments ] 
     weblogic.Admin 
     [ -url URL]
     [ User Credentials Arguments ]
     MIGRATE 
     -jta 
     -migratabletarget serverName
     -destination serverName 
     [ -sourcedown ] 
     [ -destinationdown ]

Argument Definition
{-url [protocol://]address:port} Specify the listen address and listen port of the Administration Server. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001.
-jta Specifies that the migration is a migration of JTA services. If you do not specify this argument, the MIGRATE command migrates JMS services.
-migratabletarget Names the server from which the service will migrate. The syntax for the server name varies depending on the type of service you are migrating:

  • For JMS, specify "servername (migratable)"
    For example, "myserver (migratable)"

  • For JTA, specify servername
    For example, myserver
-destination Names the server to which the service will migrate.
-sourcedown Specifies that the source server is down. This switch should be used very carefully. If the source server is not in fact down, but only unavailable because of network problems, the service will be activated on the destination server without being removed from the source server, resulting in two simultaneous running versions of the same service, which could cause corruption of the transaction log or of JMS messages.
-destinationdown Specifies that the destination server is down. A JMS service migrated to a non-running server will be lost. When migrating the JTA Transaction Recovery Service to a non-running server, the target server will assume recovery services when it is started.

 

Examples

In the following example, a JMS service is migrated from myserver2 to myserver3.

java weblogic.Admin -url AdminHost:7001 -username weblogic
   -password weblogic
   MIGRATE -migratabletarget "myserver2 (migratable)" 
  -destination myserver3

In the following example, a JTA Transaction Recovery service is migrated from myserver2 to myserver3.

java weblogic.Admin -url AdminHost:7001 -username weblogic
   -password weblogic
    MIGRATE -jta -migratabletarget myserver2 
   -destination myserver3 -sourcedown

 


STARTCLUSTER

Starts all of the servers that are in a cluster have been configured to use a Node Manager.

This command requires the following environment:

  1. The domain's Administration Server must be running.
  2. The Node Manager must be running on the Managed Server's host machine.
  3. The Managed Server must be configured to communicate with a Node Manager.

The Startup Mode field in the Administration Console determines whether a Managed Server starts in the RUNNING state or STANDBY state.

Syntax

java [ SSL Arguments ] 
     weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
     STARTCLUSTER 
     -clusterName clusterName 

Argument Definition
{-url [protocol://]address:port} Specify the listen address and listen port of the Administration Server. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001.
-clusterName clusterName The name of the cluster as specified in the domain's configuration file (config.xml).

 

Example

The following example starts a cluster:

java weblogic.Admin -url AdminHost:7001 
  -username weblogic -password weblogic 
  STARTCLUSTER -clustername GrapeCluster

If the command succeeds, it returns output similar to the following:

Starting servers in cluster GrapeCluster: GrapeMS2,GrapeMS1
All servers in the cluster "GrapeCluster" started successfully. 

 


STOPCLUSTER

Forces all servers in a cluster to shut down without waiting for active sessions to complete. To verify that the command succeeds for a given server instance, refer to the server's local message log and look for the following message:


<BEA-000238> <Shutdown has completed.>

Review the message time stamp to verify that it was generated by the server session for which you issued the stop command.

Syntax

java [ SSL Arguments ] 
     weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
     STOPCLUSTER 
     -clusterName clusterName 

Argument Definition
{-url [protocol://]address:port} Specify the listen address and listen port of the Administration Server. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001.
-clusterName clusterName The name of the cluster as specified in the domain's configuration file (config.xml).

 

Example

The following example stops a cluster:

java weblogic.Admin -url AdminHost:7001 
  -username weblogic -password weblogic 
  STOPCLUSTER -clustername GrapeCluster 

If the command succeeds, it returns output similar to the following:

Shutting down servers in cluster GrapeCluster: GrapeMS2,GrapeMS1
All servers in the cluster "GrapeCluster" were issued the shutdown request.
Look in the server logs to verify the success or failure of the shutdown
request.

 


VALIDATECLUSTERCONFIG

Parses the domain's configuration file and reports any errors in the configuration of cluster-related elements.

You can run this command only on a WebLogic Server host that can access the domain's configuration file through the host's file system.

Syntax

java [ SSL Arguments ] weblogic.Admin 
     [-url URL]
     [ User Credentials Arguments ]
   VALIDATECLUSTERCONFIG 
   -configPath pathname 

Argument Definition
{-url [protocol://]address:port} Specify the listen address and listen port of any active server in the domain, regardless of whether it belongs to a cluster. If you specify a secure listen port, also specify a secure protocol. If you do not specify a value, the command assumes t3://localhost:7001.
-configPath pathname The path and file name of the domain's configuration file. A relative pathname is resolved to the directory in which you issue the VALIDATECLUSTERCONFIG command.

 

Example

The following example validates the cluster-related configuration elements for the Grape domain. In this example, the command is issued from the WL_HOME directory:


java weblogic.Admin -url AdminHost:7001 
  -username weblogic -password weblogic 
  VALIDATECLUSTERCONFIG -configpath
  samples/domains/medrec/config.xml 

If the cluster configuration contains errors, the command returns a message that describes the error. For example:
ERROR:Cluster name:MyCluster has an INVALID Multicast address:null Please pick an address between (224.0.0.1 and 255.255.255.255)

If the cluster configuration is free of errors, the command returns nothing.