JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1-3.1.1 Reference Manual
search filter icon
search icon

Document Information

Preface

Oracle GlassFish Server 3.1 Section 1: asadmin Utility Subcommands

add-resources(1)

apply-http-lb-changes(1)

backup-domain(1)

change-admin-password(1)

change-master-broker(1)

change-master-password(1)

collect-log-files(1)

configure-jms-cluster(1)

configure-lb-weight(1)

configure-ldap-for-admin(1)

copy-config(1)

create-admin-object(1)

create-application-ref(1)

create-audit-module(1)

create-auth-realm(1)

create-backup-config(1)

create-cluster(1)

create-connector-connection-pool(1)

create-connector-resource(1)

create-connector-security-map(1)

create-connector-work-security-map(1)

create-custom-resource(1)

create-domain(1)

create-file-user(1)

create-http(1)

create-http-health-checker(1)

create-http-lb(1)

create-http-lb-config(1)

create-http-lb-ref(1)

create-http-listener(1)

create-http-redirect(1)

create-iiop-listener(1)

create-instance(1)

create-jacc-provider(1)

create-javamail-resource(1)

create-jdbc-connection-pool(1)

create-jdbc-resource(1)

create-jmsdest(1)

create-jms-host(1)

create-jms-resource(1)

create-jndi-resource(1)

create-jvm-options(1)

create-lifecycle-module(1)

create-local-instance(1)

create-message-security-provider(1)

create-network-listener(1)

create-node-config(1)

create-node-ssh(1)

create-password-alias(1)

create-profiler(1)

create-protocol(1)

create-protocol-filter(1)

create-protocol-finder(1)

create-resource-adapter-config(1)

create-resource-ref(1)

create-schedule(1)

create-service(1)

create-ssl(1)

create-system-properties(1)

create-threadpool(1)

create-transport(1)

create-virtual-server(1)

delete-admin-object(1)

delete-application-ref(1)

delete-audit-module(1)

delete-auth-realm(1)

delete-backup-config(1)

delete-cluster(1)

delete-config(1)

delete-connector-connection-pool(1)

delete-connector-resource(1)

delete-connector-security-map(1)

delete-connector-work-security-map(1)

delete-custom-resource(1)

delete-domain(1)

delete-file-user(1)

delete-http(1)

delete-http-health-checker(1)

delete-http-lb(1)

delete-http-lb-config(1)

delete-http-lb-ref(1)

delete-http-listener(1)

delete-http-redirect(1)

delete-iiop-listener(1)

delete-instance(1)

delete-jacc-provider(1)

delete-javamail-resource(1)

delete-jdbc-connection-pool(1)

delete-jdbc-resource(1)

delete-jmsdest(1)

delete-jms-host(1)

delete-jms-resource(1)

delete-jndi-resource(1)

delete-jvm-options(1)

delete-lifecycle-module(1)

delete-local-instance(1)

delete-message-security-provider(1)

delete-network-listener(1)

delete-node-config(1)

delete-node-ssh(1)

delete-password-alias(1)

delete-profiler(1)

delete-protocol(1)

delete-protocol-filter(1)

delete-protocol-finder(1)

delete-resource-adapter-config(1)

delete-resource-ref(1)

delete-schedule(1)

delete-ssl(1)

delete-system-property(1)

delete-threadpool(1)

delete-transport(1)

delete-virtual-server(1)

deploy(1)

deploydir(1)

disable(1)

disable-backup-config(1)

disable-http-lb-application(1)

disable-http-lb-server(1)

disable-monitoring(1)

disable-secure-admin(1)

disable-secure-admin-internal-user(1)

disable-secure-admin-principal(1)

enable(1)

enable-backup-config(1)

enable-http-lb-application(1)

enable-http-lb-server(1)

enable-monitoring(1)

enable-secure-admin(1)

enable-secure-admin-internal-user(1)

enable-secure-admin-principal(1)

export(1)

export-http-lb-config(1)

export-sync-bundle(1)

flush-connection-pool(1)

flush-jmsdest(1)

freeze-transaction-service(1)

generate-jvm-report(1)

get(1)

get-client-stubs(1)

get-health(1)

import-sync-bundle(1)

install-node(1)

jms-ping(1)

list(1)

list-admin-objects(1)

list-application-refs(1)

list-applications(1)

list-audit-modules(1)

list-auth-realms(1)

list-backup-configs(1)

list-backups(1)

list-clusters(1)

list-commands(1)

list-components(1)

list-configs(1)

list-connector-connection-pools(1)

list-connector-resources(1)

list-connector-security-maps(1)

list-connector-work-security-maps(1)

list-containers(1)

list-custom-resources(1)

list-domains(1)

list-file-groups(1)

list-file-users(1)

list-http-lb-configs(1)

list-http-lbs(1)

list-http-listeners(1)

list-iiop-listeners(1)

list-instances(1)

list-jacc-providers(1)

list-javamail-resources(1)

list-jdbc-connection-pools(1)

list-jdbc-resources(1)

list-jmsdest(1)

list-jms-hosts(1)

list-jms-resources(1)

list-jndi-entries(1)

list-jndi-resources(1)

list-jvm-options(1)

list-lifecycle-modules(1)

list-log-attributes(1)

list-log-levels(1)

list-message-security-providers(1)

list-modules(1)

list-network-listeners(1)

list-nodes(1)

list-nodes-config(1)

list-nodes-ssh(1)

list-password-aliases(1)

list-persistence-types(1)

list-probes(1)

list-protocol-filters(1)

list-protocol-finders(1)

list-protocols(1)

list-resource-adapter-configs(1)

list-resource-refs(1)

list-schedules(1)

list-secure-admin-internal-users(1)

list-secure-admin-principals(1)

list-sub-components(1)

list-supported-cipher-suites(1)

list-system-properties(1)

list-threadpools(1)

list-timers(1)

list-transports(1)

list-virtual-servers(1)

list-web-context-param(1)

list-web-env-entry(1)

login(1)

migrate-timers(1)

monitor(1)

multimode(1)

ping-connection-pool(1)

ping-node-ssh(1)

recover-transactions(1)

redeploy(1)

restart-domain(1)

restart-instance(1)

restart-local-instance(1)

restore-domain(1)

resume-domain(1)

rollback-transaction(1)

rotate-log(1)

run-script(1)

set(1)

set-log-attributes(1)

set-log-levels(1)

setup-ssh(1)

set-web-context-param(1)

set-web-env-entry(1)

show-component-status(1)

start-cluster(1)

start-database(1)

start-domain(1)

start-instance(1)

start-local-instance(1)

stop-cluster(1)

stop-database(1)

stop-domain(1)

stop-instance(1)

stop-local-instance(1)

suspend-domain(1)

undeploy(1)

unfreeze-transaction-service(1)

uninstall-node(1)

unset(1)

unset-web-context-param(1)

unset-web-env-entry(1)

update-admin-server-coordinates(1)

update-admin-server-local-coordinates(1)

update-connector-security-map(1)

update-connector-work-security-map(1)

update-file-user(1)

update-node-config(1)

update-node-ssh(1)

update-password-alias(1)

uptime(1)

validate-multicast(1)

verify-domain-xml(1)

version(1)

Oracle GlassFish Server 3.1 Section 1M: Utility Commands

Oracle GlassFish Server 3.1 Section 5ASC: GlassFish Server Concepts

Oracle GlassFish Server 3.1 Section 5GFP: Events

Index

create-instance

- creates a GlassFish Server instance

Synopsis

create-instance [--help] --node node-name 
[--config config-name | --cluster cluster-name] 
[--lbenabled={true|false}]
[--portbase=port-number] [--checkports={true|false}]
[--systemproperties (name=value)[:name=value]* ] 
instance-name

Description

The create-instance subcommand creates a GlassFish Server instance. This subcommand requires secure shell (SSH) to be configured on the host where the domain administration server (DAS) is running and on the host that is represented by the node where the instance is to reside.


Note - SSH is not required if the instance is to reside on a node of type CONFIG that represents the local host. A node of type CONFIG is not enabled for communication over SSH.


You may run this command from any host that can contact the DAS.

A GlassFish Server instance is a single Virtual Machine for the Java platform (Java Virtual Machine or JVM machine) on a single node in which GlassFish Server is running. A node defines the host where the GlassFish Server instance resides. The JVM machine must be compatible with the Java Platform, Enterprise Edition (Java EE).

A GlassFish Server instance requires a reference to the following items:

Each GlassFish Server instance is one of the following types of instance:

Standalone instance

A standalone instance does not share its configuration with any other instances or clusters. A standalone instance is created if either of the following conditions is met:

  • No configuration or cluster is specified in the command to create the instance.

  • A configuration that is not referenced by any other instances or clusters is specified in the command to create the instance.

When no configuration or cluster is specified, a copy of the default-config configuration is created for the instance. The name of this configuration is instance-name-config, where instance-name represents the name of an unclustered server instance.

Shared instance

A shared instance shares its configuration with other instances or clusters. A shared instance is created if a configuration that is referenced by other instances or clusters is specified in the command to create the instance.

Clustered instance

A clustered instance inherits its configuration from the cluster to which the instance belongs and shares its configuration with other instances in the cluster. A clustered instance is created if a cluster is specified in the command to create the instance.

Any instance that is not part of a cluster is considered an unclustered server instance. Therefore, standalone instances and shared instances are unclustered server instances.

By default, this subcommand attempts to resolve possible port conflicts for the instance that is being created. The subcommand also assigns ports that are currently not in use and not already assigned to other instances on the same node. The subcommand assigns these ports on the basis of an algorithm that is internal to the subcommand. Use the --systemproperties option to resolve port conflicts for additional instances on the same node. System properties of an instance can be manipulated by using the create-system-properties(1) subcommand and the delete-system-property(1) subcommand.

This subcommand is supported in remote mode only.

Options

--help
-?

Displays the help text for the subcommand.

--node

The name of the node that defines the host where the instance is to be created. The node must already exist. If the instance is to be created on the host where the domain administration server (DAS) is running, use the predefined node localhost-domain.

--config

Specifies the named configuration that the instance references. The configuration must exist and must not be named default-config or server-config. Specifying the --config option creates a shared instance.

The --config option and the --cluster option are mutually exclusive. If both options are omitted, a standalone instance is created.

--cluster

Specifies the cluster from which the instance inherits its configuration. Specifying the --cluster option creates a clustered instance.

The --config option and the --cluster option are mutually exclusive. If both options are omitted, a standalone instance is created.

--lbenabled

Specifies whether the instance is enabled for load balancing. Possible values are as follows:

true

The instance is enabled for load balancing (default).

When an instance is enabled for load balancing, a load balancer sends requests to the instance.

false

The instance is disabled for load balancing.

When an instance is disabled for load balancing, a load balancer does not send requests to the instance.

--portbase

Determines the number with which the port assignment should start. An instance uses a certain number of ports that are statically assigned. The portbase value determines where the assignment should start. The values for the ports are calculated as follows:

  • Administration port: portbase + 48

  • HTTP listener port: portbase + 80

  • HTTPS listener port: portbase + 81

  • JMS port: portbase + 76

  • IIOP listener port: portbase + 37

  • Secure IIOP listener port: portbase + 38

  • Secure IIOP with mutual authentication port: portbase + 39

  • JMX port: portbase + 86

  • JPA debugger port: portbase + 9

  • Felix shell service port for OSGi module management: portbase + 66

When the --portbase option is specified, the output of this subcommand includes a complete list of used ports.

--checkports

Specifies whether to check for the availability of the administration, HTTP, JMS, JMX, and IIOP ports. The default value is true.

--systemproperties

Defines system properties for the instance. These properties override property definitions for port settings in the instance's configuration. Predefined port settings must be overridden if, for example, two clustered instances reside on the same host. In this situation, port settings for one instance must be overridden because both instances share the same configuration.

The following properties are available:

ASADMIN_LISTENER_PORT

This property specifies the port number of the HTTP port or HTTPS port through which the DAS connects to the instance to manage the instance. Valid values are 1–65535. On UNIX, creating sockets that listen on ports 1–1024 requires superuser privileges.

HTTP_LISTENER_PORT

This property specifies the port number of the port that is used to listen for HTTP requests. Valid values are 1–65535. On UNIX, creating sockets that listen on ports 1–1024 requires superuser privileges.

HTTP_SSL_LISTENER_PORT

This property specifies the port number of the port that is used to listen for HTTPS requests. Valid values are 1–65535. On UNIX, creating sockets that listen on ports 1–1024 requires superuser privileges.

IIOP_LISTENER_PORT

This property specifies the port number of the port that is used for IIOP connections. Valid values are 1–65535. On UNIX, creating sockets that listen on ports 1–1024 requires superuser privileges.

IIOP_SSL_LISTENER_PORT

This property specifies the port number of the port that is used for secure IIOP connections. Valid values are 1–65535. On UNIX, creating sockets that listen on ports 1–1024 requires superuser privileges.

IIOP_SSL_MUTUALAUTH_PORT

This property specifies the port number of the port that is used for secure IIOP connections with client authentication. Valid values are 1–65535. On UNIX, creating sockets that listen on ports 1–1024 requires superuser privileges.

JAVA_DEBUGGER_PORT

This property specifies the port number of the port that is used for connections to the Java Platform Debugger Architecture (JPDA) debugger. Valid values are 1–65535. On UNIX, creating sockets that listen on ports 1–1024 requires superuser privileges.

JMS_PROVIDER_PORT

This property specifies the port number for the Java Message Service provider. Valid values are 1–65535. On UNIX, creating sockets that listen on ports 1–1024 requires superuser privileges.

JMX_SYSTEM_CONNECTOR_PORT

This property specifies the port number on which the JMX connector listens. Valid values are 1–65535. On UNIX, creating sockets that listen on ports 1–1024 requires superuser privileges.

OSGI_SHELL_TELNET_PORT

This property specifies the port number of the port that is used for connections to the Apache Felix Remote Shell. This shell uses the Felix shell service to interact with the OSGi module management subsystem. Valid values are 1–65535. On UNIX, creating sockets that listen on ports 1–1024 requires superuser privileges.

Operands

instance-name

The name of the instance that is being created.

The name must meet the following requirements:

  • The name may contain only ASCII characters.

  • The name must start with a letter, a number, or an underscore.

  • The name may contain only the following characters:

    • Lowercase letters

    • Uppercase letters

    • Numbers

    • Hyphen

    • Period

    • Underscore

  • The name must be unique in the domain and must not be the name of another GlassFish Server instance, a cluster, a named configuration, or a node.

  • The name must not be domain, server, or any other keyword that is reserved by GlassFish Server.

Examples

Example 1 Creating a Standalone GlassFish Server Instance

This example creates the standalone GlassFish Server instance pmdsainst in the domain domain1 on the local host.

asadmin> create-instance --node localhost-domain1 pmdsainst
Port Assignments for server instance pmdsainst: 
JMX_SYSTEM_CONNECTOR_PORT=28688
JMS_PROVIDER_PORT=27678
ASADMIN_LISTENER_PORT=24850
HTTP_LISTENER_PORT=28082
IIOP_LISTENER_PORT=23702
IIOP_SSL_LISTENER_PORT=23822
HTTP_SSL_LISTENER_PORT=28183
IIOP_SSL_MUTUALAUTH_PORT=23922

Command create-instance executed successfully.

Example 2 Creating a Standalone GlassFish Server Instance With Custom Port Assignments

This example creates the standalone GlassFish Server instance pmdcpinst in the domain domain1 on the local host. Custom port numbers are assigned to the following ports:

asadmin> create-instance --node localhost-domain1
--systemproperties HTTP_LISTENER_PORT=58294:
HTTP_SSL_LISTENER_PORT=58297:
IIOP_LISTENER_PORT=58300:
IIOP_SSL_LISTENER_PORT=58303:
IIOP_SSL_MUTUALAUTH_PORT=58306:
JMX_SYSTEM_CONNECTOR_PORT=58309 pmdcpinst
Port Assignments for server instance pmdcpinst: 
JMS_PROVIDER_PORT=27679
ASADMIN_LISTENER_PORT=24851

Command create-instance executed successfully.

Example 3 Creating a Shared GlassFish Server Instance

This example creates the shared GlassFish Server instance pmdsharedinst1 in the domain domain1 on the local host. The shared configuration of this instance is pmdsharedconfig.

asadmin create-instance --node localhost-domain1 --config pmdsharedconfig 
pmdsharedinst1
Port Assignments for server instance pmdsharedinst1: 
JMX_SYSTEM_CONNECTOR_PORT=28687
JMS_PROVIDER_PORT=27677
ASADMIN_LISTENER_PORT=24849
HTTP_LISTENER_PORT=28081
IIOP_LISTENER_PORT=23701
IIOP_SSL_LISTENER_PORT=23821
HTTP_SSL_LISTENER_PORT=28182
IIOP_SSL_MUTUALAUTH_PORT=23921

Command create-instance executed successfully.

Example 4 Creating a Clustered GlassFish Server Instance

This example creates the clustered GlassFish Server instance pmdinst1 in the domain domain1 on the local host. The instance is a member of the cluster pmdclust1.

asadmin> create-instance --node localhost-domain1 --cluster pmdclust pmdinst1
Port Assignments for server instance pmdinst1: 
JMX_SYSTEM_CONNECTOR_PORT=28686
JMS_PROVIDER_PORT=27676
HTTP_LISTENER_PORT=28080
ASADMIN_LISTENER_PORT=24848
IIOP_SSL_LISTENER_PORT=23820
IIOP_LISTENER_PORT=23700
HTTP_SSL_LISTENER_PORT=28181
IIOP_SSL_MUTUALAUTH_PORT=23920

Command create-instance executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

See Also

create-local-instance(1), create-node-config(1), create-node-ssh(1), create-system-properties(1), delete-instance(1), delete-system-property(1), list-instances(1), setup-ssh(1), start-instance(1), stop-instance(1)

asadmin(1M)