Configuring JVM options and system properties for Ranger services

You can configure JVM options and system properties for Ranger, service-wide or to a specific Ranger role.

Adding key/value pairs to the Ranger Service Environment Advanced Configuration Snippet (Safety Valve) applies the values across all roles in the Ranger service except client configurations.

The -D option is used to set system properties in Java. System properties are key-value pairs that can be accessed by the Java application through the System.getProperty(key) method. Multiple -D params can be specified in the value field (space separated).

To configure JVM options or system properties for a specific role level, search and edit the following configurations:
Ranger Admin Environment Advanced Configuration Snippet
applies configurations to the Ranger Admin Default Group role only
Ranger Tagsync Environment Advanced Configuration Snippet
applies configurations to the Ranger Tagsync Default Group role only
Ranger Usersync Environment Advanced Configuration Snippet
applies configurations to the Ranger Usersync Default Group role only
  1. To set JVM options, in Cloudera Manager Home > Ranger > Configuration > Search, type Ranger Service Environment Advanced Configuration Snippet.
  2. In RANGER_service_env_safety_valve, click + (Add).
  3. Add a key-value pair that configures a JVM option for Ranger.
    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 service.

    Stale Configs after passing JVM options - Restart Ranger
  4. To set system properties using the -D option: On Configuration, in Filters, choose Ranger Admin, in Search, type RANGER_ADMIN_Role.
  5. In RANGER_ADMIN_role_env_safety_valve, click + (Add).
  6. Add a key-value pair that configures system properties for the Ranger Admin role.
    Key
    JAVA_OPTS
    Value

    -Dproperty.name=value

    You can pass multiple -D options, each separated by a space, in the Value field.

    -Dcom.sun.management.jmxremote.ssl=true -Dcom.sun.management.jmxremoteregistry.ssl=true -Dcom.sun.management.jmxremote.ssl.need.client.auth=true -Dcom.sun.management.jmxremote.ssl.enabled.protocols=TLS

    represent example system property values for the Ranger Admin role, two of which appear in the following example:

  7. After completing configuration changes, click Save Changes.

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

  8. Select Actions > Restart.