Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Excerpt

The gogo commands for Geronimo is an extension of Apache karaf Shell to interact with Geronimo kernel.

Those command names are made up of two parts: <scope>:<name> by convention as listed below. Click each command to learn about its usage.

To enter the karaf shell, press Enter after you start up the Geronimo server using geronimo run command.

Anchor
top
top

Section
Column
width25%

geronimo:stop-server
deploy:assemble-server
deploy:distribute
deploy:install-plugin
deploy:login
deploy:start-module
deploy:unlock-keystore

Column
width25%

geronimo:wait-for-server
deploy:connect
deploy:encrypt
deploy:list-modules
deploy:new-server-instance
deploy:stop-module
equinox:diagnose

Column
width25%

geronimo:start-client
deploy:deploy-module
deploy:install-bundle
deploy:list-plugins
deploy:redeploy-module
deploy:undeploy-module
eba:resolve

Column
width25%

geronimo:start-server
deploy:disconnect
deploy:install-library
deploy:list-targets
deploy:restart-module
deploy:uninstall-bundle
obr:geronimo-refresh

Note that if the <name> portion of the command is unique, then you only need to type it. If not, then you must either type the full <scope>:<name> or arrange the scope search path accordingly. For example, you can use list-modules instead of deploy:list-modules to list all modules in the server repository.

Following options are common to those commands:

Panel
borderStylesolid

generaloptions includes:

indent
0
0
-s or --server, --hostname
indent
1
1
Hostname, default localhost
indent
0
0
-p or --port
indent
1
1
Port, default 1099
indent
0
0
-u or --username
indent
1
1
Specify an Username to start the server
indent
0
0
-w or --password
indent
1
1
Specify the password to start the server
indent
0
0
--help
indent
1
1
Display this help message

geronimo:start-server
Anchor
gogocommandstartserver
gogocommandstartserver

The server can be started through Felix Shell using the geronimo:start-server command. It uses the following syntax:

Panel
borderStylesolid

start-server generaloptions commandoptions

where

commandoptions includes:

indent
0
0
-A or --javaagent
indent
1
1
Use a specific Java Agent, set to _none_ to disable
indent
0
0
-b or --background
indent
1
1
Run the server process in the background
indent
0
0
-D or --property
indent
1
1
Define system properties
indent
0
0
-G or --gproperty
indent
1
1
Define server system properties
indent
0
0
-H or --home
indent
1
1
Use a specific server home directory
indent
0
0
-j or --jvm
indent
1
1
Use a specific Java Virtual Machine for server process
indent
0
0
-J or --javaopt
indent
1
1
Set a Java Virtual Machine flag
indent
0
0
-l or --logfile
indent
1
1
Capture console output to a specified log file
indent
0
0
-m or --modules
indent
1
1
Start up a specific module by name
indent
0
0
-P or --profile
indent
1
1
Specify a configuration profile
indent
0
0
-q or --quite
indent
1
1
Suppress informative and warning messages
indent
0
0
-t or --timeout
indent
1
1
Specify the timeout for the server process in seconds
indent
0
0
-v or --verbose
indent
1
1
Enable verbose output; specify multiple times to increase verbosity
indent
0
0
--secure
indent
1
1
Use secure channel

Back to Top

geronimo:stop-server
Anchor
gogocommandstopserver
gogocommandstopserver

The server can be stopped using the geronimo/stop-server command. It uses the following syntax:

Panel
borderStylesolid

stop-server generaloptions commandoptions

Where

commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel

stop-server command examples

Use this syntax to stop the server.

Panel
borderStylesolid

server> geronimo:stop-server --hostname localhost -p 1099

Back to Top

geronimo:wait-for-server
Anchor
gogocommandwaitforserver
gogocommandwaitforserver

The command is used to verify if the server has started in the given time (in seconds). It uses the following syntax:

Panel
borderStylesolid

wait-for-server generaloptions commandoptions

Where

commandoptions includes:

indent
0
0
-t or --timeout
indent
1
1
Specify the time (in seconds) to wait while verifying the that the server has started. 60 seconds by default

Back to Top

deploy:login
Anchor
gogocommandlogin
gogocommandlogin

The command is used to save the username and password for the current connection to a file to avoid future prompting. This command is used for remote connections only. It has the following syntax:

Panel
borderStylesolid

login generaloptions commandoptions

where

commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel

login command examples

Use this syntax to save the username and password of the current connection so that you will not be prompted for credentials again when you issue other commands via the connection. Make sure you use deploy:connect firstly to connect to a remote instance, then use deploy:login to record the credential.

Panel
borderStylesolid

server> deploy:login

Back to Top

deploy:encrypt
Anchor
gogocommandencrypt
gogocommandencrypt

The command is used to generates an encrypted string using org.apache.geronimo.util.EncryptionManager. It has the following syntax:

Panel
borderStylesolid

encrypt commandoptions string

where

commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel

string is a string to be encrypted

encrypt command examples

Use this syntax to encrypt string passw0rd on an active server so that the encryption settings of that server will be used.

Panel
borderStylesolid

server> deploy:encrypt passw0rd


Online encryption result is shown below:

Panel
borderStylesolid

String to encrypt: passw0rd
Online encryption result:
{Simple}rO0ABXNyABlqYXZheC5jcnlwdG8uU2VhbGVkT2JqZWN0PjY9psO3VHACAARbAA1lbmNv
ZGVkUGFyYW1zdAACW0JbABBlbmNyeXB0ZWRDb250ZW50cQB+AAFMAAlwYXJhbXNBbGd0ABJMamF2YS9s
YW5nL1N0cmluZztMAAdzZWFsQWxncQB+AAJ4cHB1cgACW0Ks8xf4BghU4AIAAHhwAAAAEG2NoqXONCcU
GqfK0reVCpVwdAADQUVT

Back to Top

deploy:assemble-server
Anchor
gogocommandassembleserver
gogocommandassembleserver

The command is used to extract a customized server assembly from the current one. It has the following syntax:

Panel
borderStylesolid

assemble-server generaloptions commandoptions

Where

commandoptions includes:

indent
0
0
-a, or --artifact
indent
1
1
Specify the artifact name of target server
indent
0
0
-f, or --format
indent
1
1
Specify if the assembly is in .zip or tar.gz format
indent
0
0
-g, or --groupId
indent
1
1
Specify the group ID of the library
indent
0
0
-t, or --path
indent
1
1
Specify the assembly location, where your specific plug-ins are stored. The default location is {{<ce_home>/var/temp/}} 
indent
0
0
-l, or --list
indent
1
1
Refresh the plug-in list

assemble-server command examples

Use this syntax to create a custom server assembly, which is placed at <ce_home>/var/temp/.

Panel
borderStylesolid

server> deploy:assemble-server -f zip -g group1 -a assemble1

Back to Top

geronimo:start-client
Anchor
gogocommandstartclient
gogocommandstartclient

The command is used to start a Java EE application client. Note that before starting a client, you have to deploy the application to the server. It has the following syntax:

Panel
borderStylesolid

start-client generaloptions commandoptions

Where

commandoptions includes:

indent
0
0
-A or --javaagent
indent
1
1
Use a specific Java Agent, set to _none_ to disable
indent
0
0
-b or --background
indent
1
1
Run the server process in the background
indent
0
0
-D or --property
indent
1
1
Define system properties
indent
0
0
-G or --gproperty
indent
1
1
Define server system properties
indent
0
0
-H or --home
indent
1
1
Use a specific server home directory
indent
0
0
-j or --jvm
indent
1
1
Use a specific Java Virtual Machine for server process
indent
0
0
-J or --javaopt
indent
1
1
Set a Java Virtual Machine flag
indent
0
0
-l or --logfile
indent
1
1
Capture console output to a specified log file
indent
0
0
-P or --profile
indent
1
1
Specify a configuration profile
indent
0
0
-t or --timeout
indent
1
1
Specify the timeout for the server process in seconds
indent
0
0
-v or --verbose
indent
1
1
Enable verbose output; specify multiple times to increase verbosity

Back to Top

deploy:connect
Anchor
gogocommandconnect
gogocommandconnect

The command is used to connect to an instance of server that is already running. After connected successfully, you can run a series of commands on the remote server. It has the following syntax:

Panel
borderStylesolid

connect generaloptions commandoptions

Where

commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel

Note that you can also use ssh:ssh command provided by Karaf shell to connect to a remote instance.

connect command examples

Use this syntax to connect to a remote server instance:

Panel
borderStylesolid

server> deploy:connect -u system -p manager -s <remote-ip>

Back to Top

deploy:disconnect
Anchor
gogocommanddisconnect
gogocommanddisconnect

The command is used to close the connection to a remote server. Only one instance of the server can be connected at a time, no additional options are needed to specify which server to disconnect from. If you are trying to connect to a second server instance, use this command to disconnect first. It has the following syntax:

Panel
borderStylesolid

disconnect

disconnect command examples

Use this syntax to disconnect a current connection.

Panel
borderStylesolid

server> deploy:disconnect

Back to Top

deploy:deploy-module
Anchor
gogocommanddeploymodule
gogocommanddeploymodule

The command is used to deploy a module to the server. Once deployed, a module is identified by its module ID within the server. It has the following syntax:

Panel
borderStylesolid

deploy-module generaloptions commandoptions <module> <deployment plan>

where

module is a module file, which is required for the command and can be one of the following Java applications:

indent
1
1
* Java EE Enterprise Application Archive (EAR) file
indent
1
1
* Java EE Web Application Archive (WAR) file
indent
1
1
* Java EE Enterprise JavaBean Archive (JAR) file
indent
1
1
* Java EE Java Resource Archive (RAR) file
indent
1
1
* Web Archive Bundle(WAB) file
indent
1
1
* Enterprise Bundle Archive(EBA) file

deployment plan is an optional plan file for Java EE module. If the deployment plan for a Java EE archive file is not in the WEB-INF directory, its location must be specified after the module in the command. See Creating deployment plans for more details.
commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel
indent
0
0
-i or --inPlace
indent
1
1
Add and start an archive or directory to an active server, without the archive or directory being copied into the server directory tree
indent
0
0
-t or --targets
indent
1
1
Specify the target repository to be deployed into. See [list-targets|#gogocommandlisttargets] for the names of repositories available on the server.

deploy-module command examples

Use this syntax to deploy a WAR file.

Panel
borderStylesolid

deploy-module d:/HelloWorld.war

Use this syntax to deploy a WAR file whose deployment plan is located outside of the WEB-INF directory.

Panel
borderStylesolid

server> deploy:deploy-module d:/HelloWorld.war d:/geronimo-web.xml

Back to Top

deploy:distribute-module
Anchor
gogocommanddistribute
gogocommanddistribute

The command works exactly like deploy-modules except the module is not started once it has been deployed into the server and is not marked to be started each time the server starts. It has the same syntax and options as deploy-modules:

Panel
borderStylesolid

distribute-module generaloptions commandoptions <module> <deployment plan>

distribute command examples

Use this syntax to distribute a module whose deployment plan is located outside of the WEB-INF directory.

Panel
borderStylesolid

server> deploy:distribute-module d:/HelloWorld.war d:/geronimo-web.xml

Back to Top

deploy:list-targets
Anchor
gogocommandlisttargets
gogocommandlisttargets

The command is used to list all available target repositories on the server. It has the following syntax:

Panel
borderStylesolid

list-targets generaloptions commandoptions

where

commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel

list-targets command examples

Use this syntax to list all available target repository where you can deploy applications to on the localhost.

Panel
borderStylesolid

server> deploy:list-targets
Available Targets:
org.apache.geronimo.framework/j2ee-system/3.0-SNAPSHOT/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/3.0-SNAPSHOT/car,j2eeType=ConfigurationStore,name=Local

Back to Top

deploy:list-plugins
Anchor
gogocommandlistplugins
gogocommandlistplugins

The command is used to list all of plug-ins in a Geronimortain maven repository. It has the following syntax:

Panel
borderStylesolid

list-plugins generaloptions commandoptions

where

commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel
indent
0
0
-rr or --refresh-repository
indent
1
1
refresh repository
indent
0
0
-r or --repository
indent
1
1
repository URL
indent
0
0
-rl or --refresh-list
indent
1
1
referensh plug-in list

list-plugins command examples

Use this syntax to first access the list of repositories. Select a repository from the list, plug-ins in this repository is displayed.

Panel
borderStylesolid

list-plugins

Use this syntax to display the list of plug-ins in the given repository using secure channel.

Panel
borderStylesolid

server> deploy:list-plugins --secure -r http://geronimo.apache.org/plugins/geronimo-3.0/

Back to Top

deploy:new-server-instance
Anchor
gogocommandnewserverinstance
gogocommandnewserverinstance

The command is used to create a new server instance. It has the following syntax:

Panel
borderStylesolid

new-server-instance generaloptions commandoptions instancename

where

commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel

instancename is the name of the new instance.

new-server-instance command examples

Use this syntax to create a new server instance instance2.

Panel
borderStylesolid

server> deploy:new-server-instance instance2

Back to Top

deploy:redeploy-module
Anchor
gogocommandredeploymodule
gogocommandredeploymodule

The command is used to deploy a newer version of a module onto a server where the older module is already deployed. It has the following syntax:

Panel
borderStylesolid

redeploy-module generaloptions commandoptions <module> <deployment plan> <module id>

where

module is a module file, which is required for the command and can be one of the following Java applications:

indent
1
1
* Java EE Enterprise Application Archive (EAR) file
indent
1
1
* Java EE Web Application Archive (WAR) file
indent
1
1
* Java EE Enterprise JavaBean Archive (JAR) file
indent
1
1
* Java EE Java Resource Archive (RAR) file
indent
1
1
* Web Archive Bundle(WAB) file

deployment plan is an optional plan file for Java EE module. If the deployment plan for a Java EE archive file is not in the WEB-INF directory, its location must be specified after the module in the command. See Understanding deployment plans for more details.
module id is the configuration on the server you want to replace. If you do not specify the module_id, the plan supplied (or plan inside the module) will be used to determine the actual configuration that you wish to redeploy. Redeploying a plan with an existing module ID allows you to modify the configuration of a running module without intermediate undeployment.
commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel

redeploy-module command examples

Use this syntax to deploy a newer version of an existing module .

Panel
borderStylesolid

server> deploy:redeploy-module D:/HelloWorld.war default/HelloWorld/1.0/car

Back to Top

deploy:undeploy-module
Anchor
gogocommandundeploymodule
gogocommandundeploymodule

The command is used to properly remove a module from a server. It has the following syntax:

Panel
borderStylesolid

undeploy-module generaloptions commandoptions <module id>

where

module id is the configuration name you want to remove from the server. It must be provided.
commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel

undeploy-module command examples

Use this syntax to remove an existing module.

Panel
borderStylesolid

server> deploy:undeploy-module default/HelloWorld/1.0/car

Back to Top

deploy:start-module
Anchor
gogocommandstartmodule
gogocommandstartmodule

The command is used to start an existing module on the server which is not running. It use the following syntax:

Panel
borderStylesolid

start-module generaloptions commandoptions <module id>

where

module id is the configuration name you want to start on the server. It must be provided.
commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel

start-module command examples

Use this syntax to start an existing module.

Panel
borderStylesolid

server> deploy:start-module default/HelloWorld/1.0/car

Back to Top

deploy:stop-module
Anchor
gogocommandstopmodule
gogocommandstopmodule

The command is used to stop a running module on the server. It use the following syntax:

Panel
borderStylesolid

start-module generaloptions commandoptions <module id>

where

module id is the configuration name you want to stop on the server. It must be provided.
commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel

stop-module command examples

Use this syntax to stop a running module.

Panel
borderStylesolid

server> deploy:stop-module default/HelloWorld/1.0/car

Back to Top

deploy:restart-module
Anchor
gogocommandrestartmodule
gogocommandrestartmodule

The command is used to restart a module on the server. It has the following syntax:

Panel
borderStylesolid

restart-module generaloptions commandoptions <module id>

where

module id is the configuration name you want to restart on the server. It must be provided.
commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel

restart-module command examples

Use this syntax to restart a module.

Panel
borderStylesolid

server> deploy:restart-module default/HelloWorld/1.0/car

Back to Top

deploy:list-modules
Anchor
gogocommandlistmodules
gogocommandlistmodules

The command is used to list modules in the target repository. It has the following syntax:

Panel
borderStylesolid

list-modules generaloptions commandoptions <targetname>

where

commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel
indent
0
0
-t or --stopped
indent
1
1
Show stopped modules only
indent
0
0
-r or --started
indent
1
1
Show started modules only
indent
0
0
-a or --all
indent
1
1
Show both started and stopped modules, this one is default if you did not specify any parameters

targetname is the name of target repository. See list-targets for more details.

list-modules command examples

Use this syntax to list the started modules in the target repository.

Panel
borderStylesolid

server> deploy:list-modules -r

Back to Top

deploy:install-plugin
Anchor
gogocommandinstallplugin
gogocommandinstallplugin

The command is used to install a geronimo plug-in into the server. It has the following syntax:

Panel
borderStylesolid

install-plugin generaloptions commandoptions <configuration archive>

where

commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel

configuration archive is the fully qualified name of plug-in archive. The archive must be a valid plug-in file with .car suffix.

install-plugin command examples

Use this syntax to deploy a CAR file.

Panel
borderStylesolid

server> deploy:install-plugin d:/HelloWorld-1.0.car

Back to Top

deploy:install-library
Anchor
gogocommandinstalllibrary
gogocommandinstalllibrary

The command is used to install a Java library file into the server. Meanwhile, the library file will be converted into an OSGi by the server. It has the following syntax:

Panel
borderStylesolid

install-library generaloptions commandoptions <configuration archive>

where

commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel
indent
0
0
-g or --groupId 
indent
1
1
Specify the group ID of the library

configuration archive is the fully qualified name of library archive.

If installed successfully, the library will be found in <geronimo_home>/repository. Meanwhile, the library file will be converted into an OSGi by the server.

install-library command examples

Use this syntax to install a java library file.

Panel
borderStylesolid

server> deploy:install-library d:/temp/openejb-ejbd-3.2-SNAPSHOT.jar

Back to Top

deploy:install-bundle
Anchor
gogocommandinstallbundle
gogocommandinstallbundle

The command is used to install an OSGi bundle or a common jar library file into the server(the jar file will be converted into an OSGi bundle), and the bundle information will be recorded in etc/startup.properties file. It has the following syntax:

Panel
borderStylesolid

install-bundle generaloptions commandoptions <bundle file>

where

commandoptions includes:

indent
0
0
--groupId
indent
1
1
Defines a group Id for the bundle.
indent
0
0
--startLevel
indent
1
1
Specifies start level of the bundle.
indent
0
0
--start
indent
1
1
Specifies whether to start the bundle after installation. By default, the bundle is not started.

bundle file is the fully qualified name of bundle to be installed.

install-bundle command examples

Use this syntax to install an OSGi bundle. If the file is a jar library file, the library file will be converted into an OSGi bundle by the server.

Panel
borderStylesolid

server> deploy:install-bundle --groupId myCompany --start --startLevel 100 d:/HelloWorld-1.0.jar

Back to Top

deploy:uninstall-bundle
Anchor
gogocommanduninstallbundle
gogocommanduninstallbundle

The command is used to uninstall a bundle in server. It has the following syntax:

Panel
borderStylesolid

unlinstall-bundle generaloptions commandoptions bundleId

where

commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel

bundleId is id of the bundle to be uninstalled.

uninstall-bundle command examples

Use this syntax to uninstall an OSGi bundle with id 361 in the server.

Panel
borderStylesolid

server> deploy:uninstall-bundle 361

Back to Top

deploy:unlock-keystore
Anchor
gogocommandunlockkeystore
gogocommandunlockkeystore

The command is used to unlock a keystore and private key in server. It has the following syntax:

Panel
borderStylesolid

unlock-keystore generaloptions commandoptions <keystore>

where

commandoptions includes:

indent
0
0
--secure
indent
1
1
Use secure channel

keystore is the name of keystore or private key you want to unlock.

Back to Top

equinox:diagnose
Anchor
gogocommanddiagnose
gogocommanddiagnose

The command is used to diagnose constraints of an installed OSGi bundle and verify if the bundle can be resolved successfully. The command is only available in Equinox OSGi runtime.

Panel
borderStylesolid

diagnose generaloptions commandoptions <bundleIDs>

where
commandoptions includes:

indent
0
0
-s or --simple
indent
1
1
Do not perform deeper analysis of resolver problems

bundleIDs is a list of bundle IDs seperated by whitepaces.

diagnose command examples

Use this syntax to diagnose the resolver problem of a bundle with Id 85.

Panel
borderStylesolid

server> diagnose 85
mvn:org.apache.geronimo.framework/geronimo-service-builder/3.0-SNAPSHOT [85]
No unresolved constraints.

Back to Top

eba:resolve
Anchor
gogocommandresolve
gogocommandresolve

The command is used to resolve constraints of an Aries applications and create the deployment manifest application.MF for the application.

Panel
borderStylesolid

resolve generaloptions commandoptions <AppPath>

where
commandoptions includes:

indent
0
0
-o or --out
indent
1
1
Specify the name of a file to write the application in.

AppPath is location of Aries application to be resolved.

resolve command examples

Use this syntax to resolve an Aries application.

Panel
borderStylesolid

server> eba:resolve d:/temp/myAriesApp.eba
Attempting to resolve myAriesApp application.
Application myAriesApp is now resolved.

Back to Top

obr:geronimo-refresh
Anchor
gogocommandgeronimorefresh
gogocommandgeronimorefresh

The command is used to refresh bundle status in the repository of Geronimo server. This command is useful when you installed a new bundle in to Geronimo server and want the bundle information to be added in to the bundle repository of the server.

Panel
borderStylesolid

geronimo-refresh generaloptions

Back to Top