Troubleshooting Instances

Note: This version of Redis for PCF is no longer supported because it has reached the End of General Support phase. To stay up to date with the latest software and security updates, upgrade to a supported version.

Page last updated:

This topic provides basic instructions for app developers troubleshooting Redis On-Demand for Pivotal Cloud Foundry (PCF).

Debugging Using the CF CLI

To debug using the Cloud Foundry Command Line Interface (cf CLI) tool, see the commands below:

To view the… Command
API endpoint, org, and space cf target
Service offerings available in the targeted org and space cf marketplace
Apps deployed to the targeted org and space cf apps
Service instances deployed to the targeted org and space cf services
GUID for a given service instance cf service SERVICE-INSTANCE --guid
Service instance or application logs cf tail SERVICE-INSTANCE/APP


Temporary Outages

Redis for PCF service instances can become temporarily inaccessible during upgrades and VM or network failures.

Errors

You may see an error when using the Cloud Foundry Command-Line Interface (cf CLI) to perform basic operations on a Redis for PCF service instance:

  • cf create
  • cf update
  • cf bind
  • cf unbind
  • cf delete

Parse a Cloud Foundry (CF) Error Message

Failed operations (create, update, bind, unbind, delete) result in an error message. You can retrieve the error message later by running the cf CLI command cf service INSTANCE-NAME.

$ cf service myservice

Service instance: myservice
Service: super-db
Bound apps:
Tags:
Plan: dedicated-vm
Description: Dedicated Instance
Documentation url:
Dashboard:

Last Operation
Status: create failed
Message: Instance provisioning failed: There was a problem completing your request.
     Please contact your operations team providing the following information:
     service: redis-acceptance,
     service-instance-guid: ae9e232c-0bd5-4684-af27-1b08b0c70089,
     broker-request-id: 63da3a35-24aa-4183-aec6-db8294506bac,
     task-id: 442,
     operation: create
Started: 2017-03-13T10:16:55Z
Updated: 2017-03-13T10:17:58Z

Use the information in the Message field to debug further. Provide this information to Pivotal Support when filing a ticket.

The task-id field maps to the BOSH task ID. For more information on a failed BOSH task, use the bosh task TASK-ID.

The broker-request-guid maps to the portion of the On-Demand Broker log containing the failed step. Access the broker log through your syslog aggregator, or access BOSH logs for the broker by typing bosh logs broker 0. If you have more than one broker instance, repeat this process for each instance.

Retrieve Service Instance Information

  1. Log into the space containing the instance or failed instance.

    $ cf login
    

  2. If you do not know the name of the service instance, run cf services to see a listing of all service instances in the space. The service instances are listed in the name column.

    $ cf services
    Getting services in org my-org / space my-space as user@example.com...
    OK
    name          service      plan           bound apps    last operation
    my-instance   p.redis      cache-small                  create succeeded
    

  3. Run cf service SERVICE-INSTANCE-NAME to retrieve more information about a specific instance.

  4. Run cf service SERVICE-INSTANCE-NAME --guid to retrieve the GUID of the instance, which is useful for debugging.

  5. Redis for PCF v1.14 and later: Run cf tail SERVICE-INSTANCE-NAME/APP-NAME to retrieve the service instance of the app logs if the Log Cache CLI plugin is enabled. See Log Cache CLI plugin.

Retrieve the Password for a Redis Service Instance

If you want to access the Redis server for troubleshooting, you can find a Redis service instance password by creating a new service key.

Note: Pivotal recommends that you use this key for troubleshooting only, and that you delete the key after troubleshooting by using the command cf delete-service-key SERVICE-INSTANCE KEY-NAME.

For instructions on how to retrieve the password, see [Retrieve the Password for a Redis Service Instance](./using.html#call). ### Error: Failed to Set Credentials in Credential Store

If you encounter:

error: failed to set credentials in credential store:
The request includes an unrecognized parameter 'mode'.
Please update or remove this parameter and retry your request.

after upgrading from PCF 2.3 to 2.4, it is likely because one or more installed on-demand brokers were not restarted during the upgrade. To clear the cached server version and enable your on-demand brokers to communicate with CredHub v2, do the procedure in Run BOSH Restart on Your On-Demand Service Brokers.

Error Messages from the Redis Client

Certain errors are returned to the Redis client instead of being recorded in the logs. The Redis protocol represents errors as simple strings beginning with a - character.

This section helps to troubleshoot the following errors:

Maximum Number of Clients Reached

Symptom

You receive the following error:

-ERR max number of clients reached


Explanation

This is usually caused by apps opening multiple client connections to Redis.

Solution

Share or pool Redis connections within an app. Redis for PCF configures Redis to accept 10000 client connections. This can be confirmed by running the INFO command using the Redis CLI.

Maxmemory Limit Reached

Symptom

You receive the following error:

-OOM command not allowed when used memory > 'maxmemory'.


Explanation

This occurs when the Redis server has reached its maxmemory limit.

Solution

Consider changing your maxmemory-policy. You can update this using the cf update-service parameters. For how to do this, see Customize an On-Demand Service Instance.

Error When Running the Save Command

Symptom

You receive the following error message when running redis-cli SAVE or issuing the save command using another Redis client:

-ERR


Explanation

This might occur when the Redis server’s disk is full.

Solution

A more informative message might be logged in the syslog. For more information, see Syslog Errors.

Unknown Command Error

Symptom

You receive the following error message when running redis-cli COMMAND or issuing a command using another Redis client:

-ERR unknown command


Explanation

For security reasons, certain commands such as CONFIG, SAVE, and BGSAVE are not available by default.

Solution

Talk to your operator about the availability of the command.

Disabled Service Access to Dedicated VM Service Plans

Symptom

You receive the following error when you try to create a service instance with the dedicated-vm service plan in Redis for PCF v1.14:

$ cf create-service p-redis dedicated-vm my-dedicated-redis
Creating service instance my-dedicated-redis2 in org system / space pivotal-services as admin...
FAILED
Server error, status code: 403, error code: 60010, message: A service instance for the selected plan cannot be created in this organization. The plan is visible because another organization you belong to has access to it.


Explanation

In PCF for Redis v1.14, the dedicated-vm service plan is disabled. Only CF admin users are able to view the dedicated-vm service plan on the Marketplace.

The “broker registrar” errand and the “cleanup metadata if dedicated-vm plan disabled” errand both disable service access to the dedicated-vm service plan. If you have re-enabled the dedicated-vm plan, the service access is disabled again when Ops Manager or an operator runs these errands.

Note: The service access has been restricted because the dedicated-vm service plan will be removed in Redis for PCF v2.0.


Solution
Create a service instance using an on-demand service plan. ## Knowledge Base (Community)

Find the answer to your question and browse product discussions and solutions by searching the Pivotal Knowledge Base.

File a Support Ticket

You can file a support ticket here. Be sure to provide the error message from cf service YOUR-SERVICE-INSTANCE.

To expedite troubleshooting, if possible, provide your service broker logs, service instance logs, and BOSH task output. Your cloud operator should be able to obtain these from your error message.