# How Does Capstorm License Management Work?

This article explains how Capstorm license management works and provides tips on diagnosing license management problems.

When a Capstorm product connects to Salesforce it also checks for a valid product license in the file “license.txt”. The “license.txt” file will be located in the same directory as the script used to launch the Capstorm product. If a license.txt file is not found or a valid non-expired license is not found in the file, the Capstorm product will issue a request to the Capstorm license service to retrieve (or generate) a license.

When issuing the license request to the Capstorm license server, the [CapstormCustomerKey.txt](/best-practices/customer-key-file-management.md) file will be used to identify the installation. If the CapstormCustomerKey.txt file is not valid, a message indicating the issue will be shown.

If a Capstorm product fails to retrieve/generate a license it is usually because the connection is blocked by a firewall rule. Diagnosing and confirming this condition can be done using a web browser. Here’s how.

To retrieve or generate a license, a Capstorm product makes a https request in the following form:

* <https://license.capstorm.com/LicenseStore/GetLicense?sfdcOrg=salesforceOrgId&product=productName&version=productVersion&instanceType=sandbox>

Where:

* salesforceOrgId is the full 18 character unique identifier of your Salesforce organization.
* productName is the name of the product for which a license is desired.
* productVersion is the version number of the product.

For example:

* <https://license.capstorm.com/LicenseStore/GetLicense?sfdcOrg=CAPSTORMTEST000000&product=CopyStorm/MySQL&version=Test&instanceType=sandbox>

If the request is successful the license server will return a JSON string in the following form:

{% code overflow="wrap" %}

```json
{“license”:{“id”:1,”ipAddress”:”38.114.70.254″,”licenseKey”:”2520b633-13fd-4488-800e-449526035835″,”product”:”CopyStorm/MySQL”,”version”:”Test”,”sfdcOrganization”:”CAPSTORMTEST000000″,”grantDate”:”2013-08-10″,”createdDate”:”2013-08-10″,”modifiedDate”:”2014-04-02″,”lock”:”q/nI2XtrIaof6u0CdEVSe28EDxjiUUW21uB8h9mpQfE\u003d”,”note”:””,”ipOrganization”:”Capstorm”,”ipDomain”:”wisperisp.com”,”ipCity”:”Edwardsville”,”ipCountry”:”United States”,”ipRegion”:”Illinois”},”successful”:true}
```

{% endcode %}

Information from the JSON string will be added to the product’s license.txt file.

If a firewall is blocking access to the Capstorm license server then pasting a license request into a browser will almost always provide a meaningful message. If you receive a “Connection Refused” response then a firewall is likely blocking access to license.capstorm.com. You need to tell your network administrator to open ports 80 and 443 to license.capstorm.com (75.2.67.235).

Here are a few URLs you can click on to test the connection to the license manager:

| Product              | Test URL                                                                                                                                           |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| CopyStorm/MySQL      | <https://license.capstorm.com/LicenseStore/GetLicense?sfdcOrg=CAPSTORMTEST000000&product=CopyStorm/MySQL&version=Test&instanceType=sandbox>        |
| CopyStorm/SQL Server | <https://license.capstorm.com/LicenseStore/GetLicense?sfdcOrg=CAPSTORMTEST000000&product=CopyStorm/SQL%20Server&version=Test&instanceType=sandbox> |
| CopyStorm/Oracle     | <https://license.capstorm.com/LicenseStore/GetLicense?sfdcOrg=CAPSTORMTEST000000&product=CopyStorm/Oracle&version=Test&instanceType=sandbox>       |
| CopyStorm/PostgreSQL | <https://license.capstorm.com/LicenseStore/GetLicense?sfdcOrg=CAPSTORMTEST000000&product=CopyStorm/PostgreSQL&version=Test&instanceType=sandbox>   |
| CopyStorm/H2         | <https://license.capstorm.com/LicenseStore/GetLicense?sfdcOrg=CAPSTORMTEST000000&product=CopyStorm/H2&version=Test&instanceType=sandbox>           |
| CopyStorm/Restore    | <https://license.capstorm.com/LicenseStore/GetLicense?sfdcOrg=CAPSTORMTEST000000&product=CopyStorm/Restore&version=Test&instanceType=sandbox>      |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.capstorm.com/frequently-asked-questions/how-does-copystorm-work/how-does-capstorm-license-management-work.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
