### install-node-ssh Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/install-node-ssh.html Example of installing Payara Server software on multiple hosts using the `install-node-ssh` command with default options. ```APIDOC ## Example: Installing Payara Server Software at the Default Location This example installs Payara Server software on the hosts `sj03.example.com` and `sj04.example.com` at the default location. ```bash asadmin> install-node-ssh sj03.example.com sj04.example.com ``` **Output Example**: ``` Created installation zip /home/gfuser/glassfish2339538623689073993.zip Successfully connected to gfuser@sj03.example.com using keyfile /home/gfuser /.ssh/id_rsa Copying /home/gfuser/glassfish2339538623689073993.zip (81395008 bytes) to sj03.example.com:/export/payara7 Installing glassfish2339538623689073993.zip into sj03.example.com:/export/payara7 Removing sj03.example.com:/export/payara7/glassfish2339538623689073993.zip Fixing file permissions of all files under sj03.example.com:/export/payara7/bin Successfully connected to gfuser@sj04.example.com using keyfile /home/gfuser /.ssh/id_rsa Copying /home/gfuser/glassfish2339538623689073993.zip (81395008 bytes) to sj04.example.com:/export/payara7 Installing glassfish2339538623689073993.zip into sj04.example.com:/export/payara7 Removing sj04.example.com:/export/payara7/glassfish2339538623689073993.zip Fixing file permissions of all files under sj04.example.com:/export/payara7/bin Command install-node-ssh executed successfully ``` ## Exit Status - `0`: command executed successfully - `1`: error in executing the command **See Also**: * `asadmin` * `install-node` * `uninstall-node` * `uninstall-node-ssh` ``` -------------------------------- ### Start a Domain via CLI Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/General%20Administration/Administering%20Domains.html Starts a domain using the asadmin utility from the installation bin directory. ```shell as-install/bin/asadmin start-domain domain-name ``` -------------------------------- ### Start Local Instance with Full Synchronization (Single Mode) Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/High%20Availability/Administering%20Payara%20Server%20Instances.html This example shows starting a local instance 'yml-i1' on node 'sj01' with a full synchronization, after determining it was stopped. It includes output indicating the instance is starting and has been successfully started. ```shell > asadmin start-local-instance --node sj01 --sync full yml-i1 Removing all cached state for instance yml-i1. Waiting for yml-i1 to start ............... Successfully started the instance: yml-i1 instance Location: /export/payara7/glassfish/nodes/sj01/yml-i1 Log File: /export/payara7/glassfish/nodes/sj01/yml-i1/logs/server.log Admin Port: 24849 Command start-local-instance executed successfully. ``` -------------------------------- ### Create CONFIG Node Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/High%20Availability/Administering%20Payara%20Server%20Nodes.html This example creates a CONFIG node named 'cfg01'. The host and installation directory will be determined when instances are added to this node. Ensure the DAS is running. ```shell asadmin> create-node-config cfg01 Command create-node-config executed successfully. ``` -------------------------------- ### Starting multiple domains Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/start-domains.html Example of starting domain1 and testy simultaneously using the asadmin utility. ```shell asadmin> start-domains domain1,testy Waiting for domain1 to start .............................. Successfully started the domain : domain1 domain Location: /myhome/payara7/glassfish/domains/domain1 Log File: /myhome/payara7/glassfish/domains/domain1/logs/server.log Admin Port: 4848 Started domain domain1 Waiting for testy to start ............................... Successfully started the domain : testy domain Location: /myhome/payara7/glassfish/domains/testy Log File: /myhome/payara7/glassfish/domains/domain1/logs/server.log Admin Port: 6048 Started domain testy Command start-domains executed successfully. ``` -------------------------------- ### Listing Protocols Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/list-protocols.html Example output when listing all protocols for the default server instance. ```shell asadmin> list-protocols admin-listener http-1 http-listener-1 http-listener-2 Command list-protocols executed successfully. ``` -------------------------------- ### Get current monitoring service configuration example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/get-monitoring-service-configuration.html Example output showing the enabled status of various monitoring components. ```shell asadmin get-monitoring-service-configuration Monitoring Enabled AMX Enabled MBeans Enabled DTrace Enabled true true true false Command get-monitoring-service-configuration executed successfully. ``` -------------------------------- ### Migrating Timers Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/migrate-timers.html An example demonstrating the migration of timers from instance1 to instance2. ```shell asadmin> migrate-timers --target instance2 instance1 This command was successfully executed. ``` -------------------------------- ### Start Domain from Different Installation Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Upgrade%20Guide/Domain%20and%20Node%20Directories%20Method.html After changing to a new Payara Server installation directory, use this command to start an existing domain using the new version. The `--domaindir` option is crucial for specifying the domain's location. ```shell /opt/payara/payara-7.2025.2/payara7 bin/asadmin start-domain --domaindir /tmp myTempDomain ``` -------------------------------- ### Listing Libraries Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/list-libraries.html Example showing how to list libraries in the application-specific class loader directory. ```shell asadmin> list-libraries --type app mylib.jar xlib.jar ylib.jar zlib.jar Command list-libraries executed successfully. ``` -------------------------------- ### Start a Server Instance Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/High%20Availability/Configuring%20HA%20Session%20Persistence%20and%20Failover.html Starts a specific server instance by name. ```shell asadmin> start-instance instance-name ``` -------------------------------- ### Equivalent Start Command for Dev Mode Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Ecosystem/Project%20Management%20Tools/Maven%20Plugin/Payara%20Server%20Maven%20Plugin.html This command demonstrates the equivalent configuration for starting Payara Server in development mode using the 'start' goal with specific properties enabled. ```shell mvn payara-server:start -DautoDeploy=true -DliveReload=true -Dexploded=true -DkeepState -DtrimLog=true ``` -------------------------------- ### Start Domain with Specific Version Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Upgrade%20Guide/Domain%20and%20Node%20Directories%20Method.html Demonstrates starting a domain using different Payara Server versions by specifying the domain directory with the `--domaindir` option from the respective installation's `asadmin` command. ```shell /opt/payara/7.2025.1/payara7/bin/asadmin start-domain --domaindir /opt/payara/domains myDomain ``` ```shell /opt/payara/7.2025.2/payara7/bin/asadmin start-domain --domaindir /opt/payara/domains myDomain ``` ```shell /opt/payara/7.2026.1/payara7/bin/asadmin start-domain --domaindir /opt/payara/domains myDomain ``` -------------------------------- ### Listing JNDI Resources Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/list-jndi-resources.html Example output when listing JNDI resources on the default server instance. ```shell asadmin> list-jndi-resources jndi_resource1 jndi_resource2 jndi_resource3 Command list-jndi-resources executed successfully ``` -------------------------------- ### Start the Domain Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/General%20Administration/Administering%20Domains.html Starts the specified domain after configuration changes. ```shell $ start-domain [domain-name] ``` -------------------------------- ### JMX Startup Log Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/General%20Administration/Administering%20the%20Monitoring%20Service.html Example of the JMX service URL emitted in the server logs during startup. ```shell [#|2009-12-03T10:25:17.737-0800|INFO|glassfishv3.0| x..system.tools.admin.org.glassfish.server|_ThreadID=20; _ThreadName=Thread-26;|JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://localhost:8686/jndi/rmi://localhost:8686/jmxrmi|#] ``` -------------------------------- ### Configure glassfish-application.xml example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Application%20Deployment/Deployment%20Descriptor%20Files.html A basic example of a glassfish-application.xml file referencing the required DTD. ```xml 67488732739338240 ``` -------------------------------- ### Start a Cluster with Verbose Output Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/start-cluster.html Starts the specified cluster and displays detailed status information for each instance being started. This is useful for monitoring the startup process. ```shell asadmin> start-cluster --verbose ymlcluster start-instance yml-i-sr1-usca-02 start-instance yml-i-sr1-usca-01 The command start-instance executed successfully for: yml-i-sr1-usca-02 yml-i-sr1-usca-01 Command start-cluster executed successfully. ``` -------------------------------- ### Generate encryption key execution example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/generate-encryption-key.html Example of running the command and providing the required master password. ```shell asadmin> generate-encryption-key Enter the current master password> Command generate-encryption-key executed successfully. ``` -------------------------------- ### Show Component Status Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/show-component-status.html Example demonstrating how to check the status of a specific component named MEjbApp. ```shell asadmin> show-component-status MEjbApp Status of MEjbApp is enabled Command show-component-status executed successfully. ``` -------------------------------- ### List Network Listeners Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/list-http-listeners.html Example output when listing all network listeners for the default server instance. ```shell asadmin> list-http-listeners http-listener-1 http-listener-2 admin-listener Command list-http-listeners executed successfully. ``` -------------------------------- ### Restarting a Domain Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/restart-domain.html Example command to restart a specific domain named mydomain4. ```shell asadmin> restart-domain mydomain4 Successfully restarted the domain Command restart-domain executed successfully. ``` -------------------------------- ### List Resource Adapter Configurations Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/list-resource-adapter-configs.html Example output showing the listing of current resource adapter configurations. ```shell asadmin> list-resource-adapter-configs ra1 ra2 Command list-resource-adapter-configs executed successfully ``` -------------------------------- ### Start an Embedded Payara Server Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Embedded%20Documentation/Payara%20Server%20Embedded%20Guide.html Bootstraps the GlassFish runtime and starts the server instance with specified properties. ```java import org.glassfish.embeddable.*; public class EmbeddedRunner{ public static void main(String... args){ var glassfishProperties = new GlassFishProperties(); glassfishProperties.setPort("http-listener", 8080); glassfishProperties.setPort("https-listener", 8181); var server = GlassFishRuntime.bootstrap().newGlassFish(glassfishProperties); server.start(); } } ``` -------------------------------- ### Example setup-ssh execution Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/High%20Availability/Enabling%20Centralized%20Administration%20of%20Server%20Instances.html A practical example of generating and distributing an SSH key for a specific user across multiple target hosts. ```shell asadmin> setup-ssh --generatekey=true sua01 sua02 Enter SSH password for gfuser@sua01> Created directory /home/gfuser/.ssh /usr/bin/ssh-keygen successfully generated the identification /home/gfuser/.ssh/id_rsa Copied keyfile /home/gfuser/.ssh/id_rsa.pub to gfuser@sua01 Successfully connected to gfuser@sua01 using keyfile /home/gfuser/.ssh/id_rsa Copied keyfile /home/gfuser/.ssh/id_rsa.pub to gfuser@sua02 Successfully connected to gfuser@sua02 using keyfile /home/gfuser/.ssh/id_rsa Command setup-ssh executed successfully. ``` -------------------------------- ### List Connector Resources Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/list-connector-resources.html Example output showing the execution of the command to list all existing connector resources. ```shell asadmin> list-connector-resources jms/qConnFactory Command list-connector-resources executed successfully. ``` -------------------------------- ### Listing Servlet Context-Initialization Parameters Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/list-web-context-param.html Example output when listing parameters for the basic-ezcomp application. ```shell asadmin> list-web-context-param basic-ezcomp javax.faces.STATE_SAVING_METHOD = client ignoreDescriptorItem=false //The location where the application's state is preserved javax.faces.PROJECT_STAGE = null ignoreDescriptorItem=true //null Command list-web-context-param executed successfully. ``` -------------------------------- ### Install Payara Server via SSH Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/install-node-ssh.html Installs Payara Server software on specified hosts using SSH. This example installs to the default location on hosts sj03.example.com and sj04.example.com. ```shell asadmin> install-node-ssh sj03.example.com sj04.example.com Created installation zip /home/gfuser/glassfish2339538623689073993.zip Successfully connected to gfuser@sj03.example.com using keyfile /home/gfuser /.ssh/id_rsa Copying /home/gfuser/glassfish2339538623689073993.zip (81395008 bytes) to sj03.example.com:/export/payara7 Installing glassfish2339538623689073993.zip into sj03.example.com:/export/payara7 Removing sj03.example.com:/export/payara7/glassfish2339538623689073993.zip Fixing file permissions of all files under sj03.example.com:/export/payara7/bin Successfully connected to gfuser@sj04.example.com using keyfile /home/gfuser /.ssh/id_rsa Copying /home/gfuser/glassfish2339538623689073993.zip (81395008 bytes) to sj04.example.com:/export/payara7 Installing glassfish2339538623689073993.zip into sj04.example.com:/export/payara7 Removing sj04.example.com:/export/payara7/glassfish2339538623689073993.zip Fixing file permissions of all files under sj04.example.com:/export/payara7/bin Command install-node-ssh executed successfully ``` -------------------------------- ### List authentication realms example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/list-auth-realms.html Example output showing the list of available authentication realms after executing the command. ```shell asadmin> list-auth-realms file ldap certificate db Command list-auth-realms executed successfully ``` -------------------------------- ### Start Default Payara Domain Source: https://docs.payara.fish/community/docs/7.2026.2/General%20Info/Getting%20Started.html Execute this command to start the default 'domain1' of Payara Server. Ensure you replace `{PAYARA_INSTALL_DIR}` with your actual installation path. ```shell $ {PAYARA_INSTALL_DIR}/bin/asadmin start-domain ``` -------------------------------- ### Execute HelloWorld Client Application Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Extensions/gRPC%20Support/Usage.html Build the project and run this command to execute the client application. Ensure the server is running before executing the client. ```shell mvn compile exec:java -Dexec.mainClass="fish.payara.samples.grpc.GrpcClient" ``` -------------------------------- ### Start JConsole Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/General%20Administration/Administering%20the%20Monitoring%20Service.html Command to launch the JConsole utility from the JDK installation directory. ```shell /usr/java/bin/jconsole ``` -------------------------------- ### Create Virtual Server Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/create-virtual-server.html This command creates a virtual server named 'sampleServer' and associates it with the specified hosts and authentication realm. ```shell asadmin> create-virtual-server --hosts pigeon,localhost --property authRealm=ldap sampleServer Command create-virtual-server executed successfully. ``` -------------------------------- ### Get Help for asadmin Subcommand Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/asadmin.html Use this command to obtain detailed help information for a specific `asadmin` subcommand. For example, to get help for `start-domain`, use `asadmin help start-domain`. ```shell asadmin help start-domain ``` -------------------------------- ### Upgrade Advisor Output Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Ecosystem/Jakarta%20EE%20Upgrade%20Advisor.html Sample output showing detected issues in source files with line numbers and expressions. ```log [INFO] Showing Advisories [INFO] *************** [INFO] Line of code: 14 | Expression: public String registerConfigProvider(String s, Map map, String s1, String s2, String s3) Source file: TestAuthConfigFactory.java Jakarta Authentication 3.0 Issue # 87 jakarta.security.auth.message.config.AuthConfigFactory.registerConfigProvider was changed from String registerConfigProvider(String className, Map properties, String layer, String appContext, String description) to String registerConfigProvider(String className, Map properties, String layer, String appContext, String description) This issue won't affect your application. The recommendation is to take care of the generic version. [INFO] Line of code: 20 | Expression: public Class[] getSupportedMessageTypes() Source file: TestAuthModule.java Jakarta Authentication 3.0 Issue # 87 jakarta.security.auth.message.module.ServerAuthModule.getSupportedMessageTypes was changed from Class[] getSupportedMessageTypes() to Class[] getSupportedMessageTypes() This issue won't affect your application. The recommendation is to take care of the generic version. ``` -------------------------------- ### Start Payara Micro Programmatically (getInstance) Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Micro%20Documentation/Payara%20Micro%20Configuration%20and%20Management/Micro%20Management/Stopping%20and%20Starting%20Instances/Starting%20Instance.html An alternative way to start Payara Micro programmatically by first getting an instance and then calling bootstrap(). This is functionally equivalent to calling bootstrap() directly. ```java import fish.payara.micro.BootstrapException; import fish.payara.micro.PayaraMicro; public class EmbeddedPayara{ public static void main(String[] args) throws BootstrapException{ PayaraMicro.getInstance().bootStrap(); } } ``` -------------------------------- ### Get Configuration Directory Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/get-config-dir.html Retrieves the directory configuration source for a specific cluster target. ```shell asadmin get-config-dir --target=myAppCluster ``` -------------------------------- ### Equivalent Start Command for Dev Mode Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Ecosystem/Project%20Management%20Tools/Maven%20Plugin/Payara%20Micro%20Maven%20Plugin.html This command demonstrates the equivalent configuration for the `start` goal to achieve the same development environment as the `dev` goal. ```bash mvn payara-micro:start -DautoDeploy=true -DliveReload=true -DdeployWar=true -Dexploded=true -DkeepState -DtrimLog=true ``` -------------------------------- ### Start Local Instance with Specific Node Directory Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Upgrade%20Guide/Domain%20and%20Node%20Directories%20Method.html Shows how to start a local Payara Server instance using a specific node directory with the `--nodedir` option. This allows for managing nodes independently of the server installation. ```shell /opt/payara/7.2025.1/payara7/bin/asadmin start-local-instance --nodedir /opt/payara/nodes myLocalNode ``` ```shell /opt/payara/7.2025.2/payara7/bin/asadmin start-local-instance --nodedir /opt/payara/nodes myLocalNode ``` ```shell /opt/payara/7.2026.1/payara7/bin/asadmin start-local-instance --nodedir /opt/payara/nodes myLocalNode ``` -------------------------------- ### Running a Remote Shell Command Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/osgi-shell.html Example of executing the 'lb' command within the shell to list installed OSGi bundles. ```shell asadmin> osgi-shell Use "exit" to exit and "help" for online help. gogo$ lb START LEVEL 2 ID|State |Level|Name 0|Active | 0|System Bundle 1|Active | 1|Metro Web Services API OSGi Bundle 2|Active | 1|jakarta.annotation API 3|Active | 1|jaxb-api ... gogo$ ``` -------------------------------- ### Initialize and Deploy Separately during Bootstrap Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Micro%20Documentation/Payara%20Micro%20Configuration%20and%20Management/Micro%20Management/Deploying%20Applications/Deploy%20Applications%20Programmatically.html Demonstrates splitting instance initialization and deployment configuration into multiple method calls. ```java import fish.payara.micro.BootstrapException; import fish.payara.micro.PayaraMicro; public class EmbeddedPayara{ public static void main(String[] args) throws BootstrapException{ PayaraMicro micro = PayaraMicro.getInstance(); micro.addDeployment("/home/user/example.war"); micro.bootStrap(); } } ``` -------------------------------- ### Listing Deployment Groups Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/list-deployment-groups.html Example output showing the list of deployment groups currently registered in the domain. ```shell asadmin list-deployment-groups List of Deployment Groups: test-dgroup1 test-dgroup2 Command list-deployment-groups executed successfully. ``` -------------------------------- ### Common asadmin get Usage Patterns Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/get.html Examples of using wildcards with dotted names to retrieve specific sets of attributes. ```shell get **** ``` ```shell get *. ``` ```shell get domain* ``` ```shell get domain*.* ``` ```shell get **config**.**.** ``` ```shell get domain.j2ee-applications.**.ejb-module.**.* ``` ```shell get **web-modules.**.* ``` ```shell get **.**.**.** ``` -------------------------------- ### Get current JMX monitoring service configuration Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/get-jmx-monitoring-configuration.html Example output showing the current JMX monitoring service configuration settings. ```shell asadmin get-jmx-monitoring-configuration JMX Monitoring Enabled JMX Log Frequency JMX Log Frequency Unit true 5 MINUTES Name Notifier Enabled slack-notifier false snmp-notifier false teams-notifier false datadog-notifier false jms-notifier false newrelic-notifier false log-notifier true cdieventbus-notifier false eventbus-notifier false email-notifier false discord-notifier false Object Name Attribute Description java.lang:type=Memory HeapMemoryUsage.used ``` -------------------------------- ### Get MicroProfile Fault Tolerance Configuration Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/get-fault-tolerance-configuration.html This example retrieves the current configuration of the Fault Tolerance service on a specific instance. Ensure the `asadmin` utility is in your PATH. ```shell asadmin get-fault-tolerance-configuration --target=instance1 ``` -------------------------------- ### Display help for create-jvm-option Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/create-jvm-option.html Use the `--help` option to display the help text for the `create-jvm-option` subcommand. ```shell asadmin create-jvm-option --help ``` -------------------------------- ### Configure mod_jk for GlassFish Request Routing Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/General%20Administration/Administering%20Web%20Applications.html Use JkMount to route specific URL paths to a load balancer. This example directs all requests starting with /glassfish-test/ to the loadbalancer. ```apache JkMount /glassfish-test/* loadbalancer ``` -------------------------------- ### List CONFIG Nodes with Details Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/High%20Availability/Administering%20Payara%20Server%20Nodes.html Use `list-nodes-config --long=true` to get detailed information about all CONFIG nodes, including name, type, host, install directory, and referenced by. ```shell asadmin> list-nodes-config --long=true NODE NAME TYPE NODE HOST INSTALL DIRECTORY REFERENCED BY localhost-domain1 CONFIG localhost /export/payara cfg01 CONFIG cfg01.example.com /export/payara yml-i1 cfg02 CONFIG cfg02.example.com /export/payara yml-i2 Command list-nodes-config executed successfully. ``` -------------------------------- ### List Application References for a Server Instance Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/list-application-refs.html Example showing how to list application references for a specific server instance named NewServer. ```shell asadmin> list-application-refs NewServer ClientSessionMDBApp MEjbApp __ejb_container_timer_app Command list-application-refs executed successfully. ``` -------------------------------- ### Get All GMS Configuration Settings Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/High%20Availability/Administering%20Payara%20Server%20Clusters.html Use this command to retrieve all Group Management Service (GMS) configuration settings for a specific configuration, such as 'mycfg'. This helps in understanding the current GMS setup. ```shell asadmin> get "configs.config.mycfg.group-management-service.*" ``` -------------------------------- ### Redirect to Original URL After OIDC Callback Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Public%20API/OpenID%20Connect%20Support.html After handling the OpenID Connect callback, redirect the user back to the originally requested page. This example shows basic redirect support for GET requests, only preserving the URL and query parameters. ```java @WebServlet("/callback") public class CallbackServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // handling the OpenIdContext information. See previous example // Now return to original requested page response.sendRedirect(request.getSession().getAttribute(OpenIdConstant.ORIGINAL_REQUEST).toString()); } } ``` -------------------------------- ### Create Profiler Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/create-profiler.html Example of creating a profiler named 'sample_profiler' with specified classpath, native library path, enablement, and properties. The server must be restarted for changes to take effect. ```shell asadmin> create-profiler --classpath /home/appserver/ --nativelibpath /u/home/lib --enabled=false --property defaultuser=admin:password=adminadmin sample_profiler Created Profiler with id = sample_profiler ``` -------------------------------- ### Example XML Resource Representation for a Node Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/General%20Administration/Using%20REST%20Interfaces%20for%20Server%20Administration.html This XML shows the representation of a node resource, including its properties, supported methods (GET, POST), and associated commands like delete-node and update-node. It details the DAS host and port, and the node's configuration. ```xml ``` -------------------------------- ### Start Local Payara Server Instance Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/High%20Availability/Administering%20Payara%20Server%20Instances.html Use the `start-local-instance` subcommand to start an individual Payara Server instance. Log in to the host where the instance resides. ```shell $ asadmin start-local-instance [--node node-name] instance-name ``` ```shell $ asadmin start-local-instance --node sj01 yml-i1 Waiting for yml-i1 to start ............... Successfully started the instance: yml-i1 instance Location: /export/payara7/glassfish/nodes/sj01/yml-i1 Log File: /export/payara7/glassfish/nodes/sj01/yml-i1/logs/server.log Admin Port: 24849 Command start-local-instance executed successfully. ``` -------------------------------- ### Start a domain Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Security%20Guide/Administering%20System%20Security.html Starts the specified Payara domain. ```shell asadmin start-domain ``` -------------------------------- ### Execute Deployment Script at Startup Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Application%20Deployment/Deploying%20Applications.html Uses the post-boot command file option to trigger the deployment script. ```shell asadmin start-domain --postbootCommandFile=deployment-script.asadmin ``` -------------------------------- ### Start SSH Server Daemon Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/High%20Availability/Enabling%20Centralized%20Administration%20of%20Server%20Instances.html Start the SSH server daemon `sshd` using the `net start` command. Ensure the service is running before proceeding. ```shell $ net start sshd ``` -------------------------------- ### Start Local Payara Instance Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/start-local-instance.html Starts a Payara Server instance on the host where the subcommand is run. This command does not require SSH configuration and can start any instance. ```shell asadmin 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}] [--timeout timeout] [instance-name] ``` -------------------------------- ### Synopsis for start-domains Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/start-domains.html The command syntax for starting domains with optional timeout configurations. ```shell asadmin start-domains [--help] [--domainTimeout timeout] [--timeout timeout] [domain-name] ``` -------------------------------- ### Start a remote instance Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Security%20Guide/Administering%20System%20Security.html Starts a previously created instance from the DAS. ```shell asadmin start-instance ``` -------------------------------- ### Start a Deployment Group with Instance Timeout Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/start-deployment-group.html Starts a deployment group named 'test-dgroup' with a specific instance timeout of 30 seconds. This is useful for controlling how long each individual instance has to start. ```shell asadmin start-deployment-group --instanceTimeout 30 test-dgroup 50%: start-deployment-group: Executing start-instance on 1 instances. Command start-deployment-group executed successfully. ``` -------------------------------- ### Deploying a WAR file from a Scattered Archive Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Embedded%20Documentation/Payara%20Server%20Embedded%20Guide.html This example demonstrates creating a WAR file from a scattered archive, adding classpaths and metadata, and then deploying it. Ensure the 'target/classes' directory and 'resources' directory with 'payara-web.xml' and 'web.xml' exist. ```java import java.io.File; import org.glassfish.embeddable.*; public class EmbeddedRunner{ public static void main(String... args){ var glassfishProperties = new GlassFishProperties(); glassfishProperties.setPort("http-listener", 9090); var server = GlassFishRuntime.bootstrap().newGlassFish(glassfishProperties); server.start(); var deployer = glassfish.getDeployer(); var archive = new ScatteredArchive("testapp", ScatteredArchive.Type.WAR); // target/classes directory contains complied servlets archive.addClassPath(new File("target", "classes")); // resources/payara-web.xml is the WEB-INF/payara-web.xml archive.addMetadata(new File("resources", "payara-web.xml")); // resources/web.xml is the WEB-INF/web.xml archive.addMetadata(new File("resources", "web.xml")); // Deploy the scattered web archive. var appName = deployer.deploy(archive.toURI(), "--contextroot=hello"); deployer.undeploy(appName); server.stop(); server.dispose(); } } ``` -------------------------------- ### Create and Deploy Scattered Enterprise Archive Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Embedded%20Documentation/Payara%20Server%20Embedded%20Guide.html This example demonstrates creating a scattered web application and a scattered enterprise archive, then deploying it. It shows how to add classpaths, metadata, and other archives to the main EAR. Ensure the referenced files like 'resources/payara-web.xml', 'src/application.xml', 'lib/mylibrary.jar', etc., exist in their specified locations. ```java import java.io.File; import org.glassfish.embeddable.*; public class EmbeddedRunner{ public static void main(String... args){ var glassfishProperties = new GlassFishProperties(); glassfishProperties.setPort("http-listener", 9090); var server = GlassFishRuntime.bootstrap().newGlassFish(glassfishProperties); server.start(); var deployer = glassfish.getDeployer(); // Create a scattered web application. var webmodule = new ScatteredArchive("testweb", ScatteredArchive.Type.WAR); // target/classes directory contains my complied servlets webmodule.addClassPath(new File("target", "classes")); // resources/payara-web.xml is my WEB-INF/payara-web.xml webmodule.addMetadata(new File("resources", "payara-web.xml")); // Create a scattered enterprise archive. var archive = new ScatteredEnterpriseArchive("testapp"); // src/application.xml is my META-INF/application.xml archive.addMetadata(new File("src", "application.xml")); // Add scattered web module to the scattered enterprise archive. // src/application.xml references Web module as "scattered.war". //Hence specify the name while adding the archive. archive.addArchive(webmodule.toURI(), "scattered.war"); // lib/mylibrary.jar is a library JAR file. archive.addArchive(new File("lib", "mylibrary.jar")); // target/ejbclasses contain my compiled EJB module. // src/application.xml references EJB module as "ejb.jar". //Hence specify the name while adding the archive. archive.addArchive(new File("target", "ejbclasses"), "ejb.jar"); // Deploy the scattered enterprise archive. var appName = deployer.deploy(archive.toURI()); deployer.undeploy(appName); server.stop(); server.dispose(); } } ``` -------------------------------- ### Start SSH service on macOS Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/High%20Availability/Enabling%20Centralized%20Administration%20of%20Server%20Instances.html Start the OpenSSH daemon using launchctl. ```shell $ sudo launchctl start com.openssh.sshd ``` -------------------------------- ### Start a Domain Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/start-domain.html Starts a specific domain by name using the asadmin utility. ```shell asadmin> start-domain mydomain4 Waiting for DAS to start. ........... Started domain: mydomain4 Domain location: /myhome/payara7/glassfish/domains/mydomain4 Log file: /myhome/payara7/glassfish/domains/mydomain4/logs/server.log Admin port for the domain: 4848 Command start-domain executed successfully. ``` -------------------------------- ### Create Resource Adapter Configuration Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/create-resource-adapter-config.html Example of creating a configuration for a resource adapter named ra1 with specific properties and a thread pool. ```shell asadmin> create-resource-adapter-config --property foo=bar --threadpoolid mycustomerthreadpool ra1 Command create-resource-adapter-config executed successfully ``` -------------------------------- ### Update a JMS Host Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/General%20Administration/Administering%20the%20Java%20Message%20Service.html Example of updating the host attribute for the default_JMS_host. ```shell asadmin> set configs.config.server-config.jms-service.jms-host.default_JMS_host.host="server1.middleware.example.com" ``` -------------------------------- ### Executing add-resources Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/Command%20Reference/add-resources.html Example of running the add-resources command using a local XML file. ```shell asadmin> add-resources resource.xml Command : Connector connection pool jms/testQFactoryPool created. Command : Administered object jms/testQ created. Command : Connector resource jms/testQFactory created. Command : Resource adapter config myResAdapterConfig created successfully Command : JDBC connection pool DerbyPoolA created successfully. Command : JDBC resource jdbc/__defaultA created successfully. Command add-resources executed successfully. ``` -------------------------------- ### List JMS Hosts Example Source: https://docs.payara.fish/community/docs/7.2026.2/Technical%20Documentation/Payara%20Server%20Documentation/General%20Administration/Administering%20the%20Java%20Message%20Service.html Example of listing all existing JMS hosts. ```shell asadmin> list-jms-hosts default_JMS_host MyNewHost Command list-jmsdest executed successfully ```