How to pass JVM options to Ranger KMS services

You can pass JVM options to Ranger KMS, service-wide or to a specific role within Ranger KMS service.

There are two ways you can pass JVM options to Ranger KMS.
  • Recommended : Using the Ranger KMS Client Java Opts field.
  • Adding key/value pairs to the Ranger KMS Service Environment Advanced Configuration Snippet (Safety Valve).

Recommended : Using the Ranger KMS Client Java Opts field.

  1. In Cloudera Manager , select Ranger_KMS, then choose Configuration.
  2. On Configuration, in Search, type ranger_kms_client_java_opts.
  3. Enter the required JVM options in the Ranger KMS Client Java Opts.
    You can pass multiple JVM Options, each separated by a space : -XX:MetaspaceSize=100m -XX:MaxMetaspaceSize=256m Duser.timezone=UTC represent some JVM options passed to the Ranger KMS service.
  4. Click Save Changes.

    After saving changes, the Stale Configuration icon appears on the Cloudera Manager UI. Optionally, click Stale Configuration to view details.

  5. Select Actions > Restart.

Ranger KMS Service Environment Advanced Configuration Snippet

Ranger KMS Service Environment Advanced Configuration Snippet (Safety Valve) applies the values across all roles in the Ranger KMS service except client configurations. Ranger KMS Server Environment Advanced Configuration Snippet applies configurations to the Ranger KMS Server Admin Default Group role only.

  1. In Cloudera Manager, select Ranger_KMS, then choose Configuration.
  2. On Configuration, in Search, type Ranger KMS Service Environment Advanced Configuration Snippet.
  3. In RANGER_KMS_service_env_safety_valve, click + (Add).
  4. Add a key-value pair that configures a JVM option for Ranger KMS.
    Key
    JAVA_OPTS
    Value

    -XX:ErrorFile=file.log

    You can pass multiple JVM Options, each separated by a space, in the Value field. -XX:MetaspaceSize=100m -XX:MaxMetaspaceSize=200m represent default JVM options passed to the Ranger KMS service.

  5. Click Save Changes.
    After saving changes, the Stale Configuration icon appears on the Cloudera Manager UI. Optionally, click Stale Configuration to view details.
  6. Select Actions > Restart.