type=page
status=published
title=start-local-instance
next=stop-cluster.html
prev=start-instance.html
~~~~~~
start-local-instance
====================

[[start-local-instance-1]][[GSRFM00237]][[start-local-instance]]

start-local-instance
--------------------

starts a \{product---name} instance on the host where the subcommand is
run

[[sthref2142]]

Synopsis

[source,oac_no_warn]
----
asadmin [asadmin-options] start-local-instance [--help] 
[--nodedir node-dir] [--node node]
[--debug={false|true}] [--dry-run={true|false}]
[--sync={normal|full|none}]
[--verbose={false|true}] [--watchdog={true|false}] 
[instance-name]
----

[[sthref2143]]

Description

The `start-local-instance` subcommand starts a \{product---name}
instance on the host where the subcommand is run. This subcommand does
not require the Distributed Component Object Model (DCOM) remote
protocol or secure shell (SSH) to be configured. You must run this
command from the host where the instance resides.

The subcommand can start any \{product---name} instance, regardless of
how the instance was created. For example, this subcommand can start an
instance that was created by using the
link:create-instance.html#create-instance-1[`create-instance`(1)]
subcommand.

The `start-local-instance` subcommand does not contact the domain
administration server (DAS) to determine the node on which the instance
resides. To determine the node on which the instance resides, the
subcommand searches the directory that contains the node directories. If
multiple node directories exist, the node must be specified as an option
of the subcommand.

This subcommand is supported in local mode. However, to synchronize the
instance with the DAS, this subcommand must be run in remote mode.

[[sthref2144]]

Options

asadmin-options::
  Options for the `asadmin` utility. For information about these
  options, see the link:asadmin.html#asadmin-1m[`asadmin`(1M)] help page.
`--help`::
`-?`::
  Displays the help text for the subcommand.
`--nodedir`::
  Specifies the directory that contains the instance's node directory.
  The instance's files are stored in the instance's node directory. The
  default is as-install`/nodes`.
`--node`::
  Specifies the node on which the instance resides. This option may be
  omitted only if the directory that the `--nodedir` option specifies
  contains only one node directory. Otherwise, this option is required.
`--debug`::
`-d`::
  Specifies whether the instance is started with
  http://java.sun.com/javase/technologies/core/toolsapis/jpda/[Java
  Platform Debugger Architecture (JPDA)]
  (http://www.oracle.com/technetwork/java/javase/tech/jpda-141715.html)
  debugging enabled. +
  Possible values are as follows: +
  `true`;;
    The instance is started with JPDA debugging enabled and the port
    number for JPDA debugging is displayed.
  `false`;;
    The instance is started with JPDA debugging disabled (default).
`--dry-run`::
`-n`::
  Suppresses actual starting of the instance. Instead,
  `start-local-instance` displays the full command that would be used to
  start the instance, including all options. Reviewing this command can
  be useful when troubleshooting startup issues. +
  The default value is `false`.
`--sync`::
  The type of synchronization between the DAS and the instance's files
  when the instance is started. +
  Possible values are as follows: +
  `none`;;
    The DAS does not synchronize the instance's files with any changes.
    This type of synchronization minimizes the time that is required to
    start the instance.
  `normal`;;
    The DAS synchronizes the instance with changes since the last
    synchronization as follows: +
    * For the `config` directory, the DAS synchronizes the instance with
    all changes.
    * For the `applications` directory and `docroot` directory, only a
    change to a top-level subdirectory causes the DAS to synchronize all
    files under that subdirectory. +
    If a file below a top level subdirectory is changed without a change
    to a file in the top level subdirectory, full synchronization is
    required. In normal operation, files below the top level
    subdirectories of these directories are not changed. If an
    application is deployed and undeployed, full synchronization is not
    necessary to update the instance with the change. +
    This value is the default.
  `full`;;
    The DAS synchronizes the instance with all of the instance's files,
    regardless of whether the files have changed since the last
    synchronization. This type of synchronization might delay the
    startup of the instance while the DAS updates all files in the
    instance's directories. +

[width="100%",cols="100%",]
|=======================================================================
a|
Caution:

If the DAS is not running or is unreachable from the host where you
are running this subcommand, do not set the `--sync` option to
`full`. To perform a full synchronization, the subcommand removes
the instance's cache. If the DAS cannot be contacted to replace the
cache, the subcommand fails and the instance cannot be restarted
until it is resynchronized with the DAS.

|=======================================================================

`--verbose`::
`-v`::
  Specifies whether detailed information about the instance is displayed
  in the console window where the subcommand is run. +
  Possible values are as follows: +
  `true`;;
    Detailed startup messages and log messages about the instance are
    displayed in the console window where the subcommand is run. If the
    instance is later restarted by running the
    link:restart-local-instance.html#restart-local-instance-1[`restart-local-instance`(1)]
    subcommand from a different console window, messages continue to be
    displayed in the original console window. +
    You can kill the \{product---name} process by typing `CTRL-C` in the
    console window. +
    You can kill the \{product---name} process and obtain a thread dump
    for the server by typing one of the following key combinations in
    the console window: +
    * `CTRL-\` on UNIX systems
    * `CTRL-Break` on Windows systems
  `false`;;
    Detailed information is not displayed (default).
`--watchdog`::
`-w`::
  Specifies whether limited information about the instance is displayed
  in the console window where the subcommand is run. The `--watchdog`
  option is similar to `--verbose` but does not display the detailed
  startup messages and log messages. This option is useful when running
  the `asadmin` utility in the background or with no attached console. +
  Possible values are as follows: +
  `true`;;
    Limited information is displayed in the console window.
  `false`;;
    Limited information is not displayed in the console window
    (default).

[[sthref2145]]

Operands

instance-name::
  The name of the instance to start.

[[sthref2146]]

Examples

[[GSRFM763]][[sthref2147]]

Example 1   Starting an Instance Locally

This example starts the instance `yml-i-sj01` on the host where the
subcommand is run.

[source,oac_no_warn]
----
asadmin> start-local-instance --node sj01 yml-i-sj01
Waiting for the server to start .................................
Successfully started the instance: yml-i-sj01
instance Location: /export/glassfish3/glassfish/nodes/sj01/yml-i-sj01
Log File: /export/glassfish3/glassfish/nodes/sj01/yml-i-sj01/logs/server.log
Admin Port: 24849
Command start-local-instance executed successfully.
----

[[sthref2148]]

Exit Status

0::
  command executed successfully
1::
  error in executing the command

[[sthref2149]]

See Also

link:asadmin.html#asadmin-1m[`asadmin`(1M)]

link:create-instance.html#create-instance-1[`create-instance`(1)],
link:create-local-instance.html#create-local-instance-1[`create-local-instance`(1)],
link:delete-instance.html#delete-instance-1[`delete-instance`(1)],
link:delete-local-instance.html#delete-local-instance-1[`delete-local-instance`(1)],
link:restart-instance.html#restart-instance-1[`restart-instance`(1)],
link:restart-local-instance.html#restart-local-instance-1[`restart-local-instance`(1)],
link:start-domain.html#start-domain-1[`start-domain`(1)],
link:start-instance.html#start-instance-1[`start-instance`(1)],
link:stop-domain.html#stop-domain-1[`stop-domain`(1)],
link:stop-instance.html#stop-instance-1[`stop-instance`(1)],
link:stop-local-instance.html#stop-local-instance-1[`stop-local-instance`(1)]

Java Platform Debugger Architecture (JPDA)
(http://www.oracle.com/technetwork/java/javase/tech/jpda-141715.html)


