Salesforce

Running the Magic xpi GSA Service (Magic xpi 4.13)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Running the Magic xpi GSA Service (Magic xpi 4.13)

When you install Magic xpi 4.x, it is highly recommended that you select to install an OS service called Magic xpi GSA (Grid Service Agent). This is loaded as an OS service (Windows) or as an init daemon (UNIX), depending on the operating system that you are using.

The Magic xpi GSA service is responsible for first loading the grid and then deploying the Magic Space, in that order. These two modules (the grid and the Magic Space) are GigaSpaces infrastructure modules. A Magic xpi 4.x project cannot run if these two modules are also not running.

Manually Installing the GSA Service

If you did not choose to install the GigaSpaces GSA service automatically during the installation, you can install and uninstall the service manually by running the following commands:

  • Install_GSA_service.bat (to install the GSA)

  • Uninstall_GSA_service.bat (to uninstall the GSA)

These files are located under the following path:

<Magic xpi installation>\Runtime\OS_Service\scripts

With some operating systems, such as Windows 7 and above, you must run these commands using administrator credentials.

Configuring the Magic xpi GSA Service to Automatically Run at Startup

It is recommended that you use the dedicated OS service to start the GSA service automatically when your computer starts. To start the GSA service automatically, follow these steps:

  1. Click Start, and then Run. The Run dialog box opens.

  2. In the Run dialog box, enter services.msc. The Services dialog box opens.

  3. In the Services dialog box, double-click on Magic xpi 4.x GSA. The Magic xpi 4.x GSA Properties (Local Computer) dialog box opens.

  4. In the Magic xpi 4.x GSA Properties (Local Computer) dialog box's Startup type parameter, select Automatic from the drop-down list.

  5. Click OK to finish.

Running the Magic xpi GSA Service Directly via the Command Line

To run the GSA service in a command line, and then deploy the Space:

  • Run the magicxpi_gs-agent.bat file to load the grid. If the Magic xpi GSA service is configured to automatically deploy, then it will automatically deploy the Space as well. If not, use the Magicxpi_deploy.bat file to deploy the Magic Space.

These files are located under the following path:

<Magic xpi installation>\Runtime\GigaSpaces-xpi\bin

Loading the GigaSpaces Grid

When the Magic xpi GSA service starts on a specific machine, it loads the grid locally and searches the LAN for other grid components with the same Lookup Locator names. If any such components are found, the local grid is considered to be part of that Lookup Locator. In this way, a single unified grid is established in the network.

It is important to remember that the Magic xpi engines run under the user that is defined for the GSA service and not by the logged in user. By default, the user defined for the service is the Local System account. For running Magic xpi on a single machine, this is usually fine. However, on a clustered environment, the service should run as a user who has privileges to access network resources.

To verify that the grid is running:

  1. From the installation shortcuts, run GigaSpaces UI. A GS utility with several tabs will open.

  2. If the grid has started properly, you should see your machine listed in the Hosts tab. When you select the Development Machine check box during installation (the default option), under the machine name you should have one GSA, one GSC, one GSM, and one LUS. If the grid has failed to start properly, you should verify that the LookupGroupName= flag and the LookupLocators= flag are configured correctly. Click here for more information.

Deploying the Magic Space

Once the grid is up and running, the Magic xpi GSA service automatically deploys the Magic Space on the grid. How the Magic Space is deployed on the grid, such as how many partitions and backups to use, is defined (by default) in the magicxpi_sla.xml file, which is located under:

<Magic xpi installation>\Runtime\config

Starting the GigaSpaces Management Console in Local Mode

GigaSpaces has a provision to start the Management Console in Local mode instead of the Cluster-Mode. To enable this, the following configuration is required:

· Navigate to <Magic xpi 4.xx Installation>\Runtime\Gigaspaces-xpi\bin.

· Locate the magicxpi-setenv.bat file. Open it in a text editor.

· Search the file for variables GS_NIC_ADDRESS and GS_LOOKUP_LOCATORS and change the value for both the variables to the localhost.

· Next, open the magicxpi-gs-agent.bat file in a text editor.

· Go to the end of the file and comment the call gs host run-agent command.

· Add the new command to this file as given below:

call gs host run-agent --custom gsc=2 --auto --custom mgmirror=1 --custom mgdeploy=1 --custom mginfo=1

Once the GSA is started successfully with the Auto installation option, the user needs to do the following steps to start the Magic Monitor:

· Navigate to <Magic xpi Installation>\Runtime\RTView\magicmonitor folder.

· Open the runwebmonitor.bat file in a text editor and set LookupLocators=localhost.

· Navigate to <Magic xpi Installation>\Runtime folder.

· Open the mgreq.ini file in a text editor and set LookupLocators=localhost.

To start the projects:

· Navigate to the folder where you have saved the project.

· Open the start.xml file in a text editor and change the value of host under the Server tag to localhost as <Server host="localhost" alternateHosts="">

To start the Debugger:

· Navigate to <Magic xpi Installation>\Runtime\scripts\config folder.

· Open the mgreq.ini file in a text editor and set LookupLocators=localhost.

The GS Web interface can now be auto-started in the Local mode. The GigaSpaces Management Console can be accessed using the URL, http://localhost:8099/

There is no clustering support in Local mode.

(Since version: 4.13)

Reference
Attachment 
Attachment