Commands for troubleshooting

The following commands can help investigate problems with the MobileFirst Server web applications.

The show-info command

The show-info command shows basic information about the MobileFirst administration services that can be returned without accessing any runtime nor database. This command can be used to test whether the MobileFirst administration services are running at all. It has the following attributes:
Table 1. show-info command attributes
Attribute Description Required Default
output Name of output file. No  
outputproperty Name of Ant property for the output. No  

Example:

<show-info/>

The show-versions command

The show-versions command displays the MobileFirst versions of various components:
  • wladmVersion: the exact MobileFirst Server version number from which worklight-ant-deployer.jar is taken.
  • productVersion: the exact MobileFirst Server version number from which worklightadmin.war is taken.
And for every project WAR file:
  • serverVersion: the exact MobileFirst Server version number from which worklight-jee-library.jar is taken.
  • platformVersion: the exact version number of the MobileFirst development tools (Studio) that built the project WAR file.
It has the following attributes:
Table 2. show-versions command attributes
Attribute Description Required Default
output Name of output file. No  
outputproperty Name of Ant property for the output. No  

Example:

<show-versions/>

The list-runtimes command

The list-runtimes command returns a list of the deployed runtimes (MobileFirst projects). It has the following attributes:
Table 3. list-runtimes command attributes
Attribute Description Required Default
inDatabase Whether to look in the database instead of via MBeans. No false
output Name of output file. No  
outputproperty Name of Ant property for the output. No  

Examples:

<list-runtimes/>

<list-runtimes inDatabase="true"/>

This command is based on the Runtimes (GET) REST service.

The show-runtime command

The show-runtime command shows information about a given deployed runtime (MobileFirst project). It has the following attributes:
Table 4. show-runtime command attributes
Attribute Description Required Default
runtime Name of the runtime web application or MobileFirst project. Yes Not available
output Name of output file. No  
outputproperty Name of Ant property for the output. No  

Example:

<show-runtime runtime="worklight"/>

This command is based on the Runtime (GET) REST service.

The delete-runtime command

The delete-runtime command deletes the runtime, including its apps and adapters, from the database. It is only possible to delete a runtime when its web application is stopped. It has the following attributes:
Table 5. delete-runtime command attributes
Attribute Description Required Default
runtime Name of the runtime web application or MobileFirst project. Yes Not available
condition Condition when to delete it: empty or always (dangerous!) No  

Example:

<delete-runtime runtime="worklight" condition="empty"/>

This command is based on the Runtime (DELETE) REST service.

The list-farm-members command

The list-farm-members command returns a list of the farm member servers on which a given runtime is deployed. It has the following attributes:
Table 6. list-farm-members command attributes
Attribute Description Required Default
runtime Name of the runtime web application or MobileFirst project. Yes Not available
output Name of output file. No  
outputproperty Name of Ant property for the output. No  

Example:

<list-farm-members runtime="worklight"/>

This command is based on the Farm topology members (GET) REST service.

The remove-farm-member command

The remove-farm-member command removes a server from the list of farm members on which a given runtime is deployed. This command should be used when the server has become unavailable or disconnected. It has the following attributes:
Table 7. remove-farm-member command attributes
Attribute Description Required Default
runtime Name of the runtime web application or MobileFirst project. Yes Not available
serverId Identifier of the server. Yes Not available
force Force removal of a farm member, even if it is available and connected. No false

Example:

<remove-farm-member runtime="worklight" serverId="srvlx15"/>

This command is based on the Farm topology members (DELETE) REST service.