Error Messages

This topic explains error messages you may encounter when using Consul-Terraform-Sync (CTS).

Example error log messages

If you configured the CTS cluster to run in high availability mode and the the local module is missing, then the following message appears in the log:

  1. [ERROR] ha.compat: error="compatibility check failure: stat ./example-module: no such file or directory"

The resolution is to add the missing local module on the incompatible CTS instance. Refer to the module documentation in the CTS configuration reference for additional information.

Example API and CLI error messages

Error:

  1. {
  2. "error": {
  3. "message": "redirect requests to leader 'cts-01' at cts-01.example.com:8558"
  4. }
  5. }

Conditions:

Resolution:

Redirect the request to the leader instance, for example:

  1. $ curl --request GET cts-01.example.com:8558/v1/tasks

Error:

  1. {
  2. "error": {
  3. "message": "redirect requests to leader 'cts-01'"
  4. }
  5. }

Conditions:

Resolution:

Identify the leader instance address and redirect the request to the leader. You can identify the leader by calling the status/cluster API endpoint or by checking the logs for the following entry:

  1. [INFO] ha: acquired leadership lock: id=<ID-OF-CTS-INSTANCE>.
  2. We recommend deploying a cluster that has three instances.
  3. ---
  4. **Error**:
  5. ```json
  6. {
  7. "error": {
  8. "message": "redirect requests to leader"
  9. }
  10. }

Conditions:

  • The CTS instance you sent the request to is not the leader.
  • The CTS is unable to determine the leader.
  • Note that these conditions are rare.

Resolution:

Identify and send the request to the leader CTS instance. You can identify the leader by calling the status/cluster API endpoint or by checking the logs for the following entry:

  1. [INFO] ha: acquired leadership lock: id=<ID-OF-CTS-INSTANCE>

Error:

  1. {
  2. "error": {
  3. "message": "this endpoint is only available with high availability configured"
  4. }
  5. }

Conditions:

Resolution:

Configure CTS to run in high availability mode.


Error:

  1. {
  2. "error": {
  3. "message": "example error message: unsupported status parameter value"
  4. }
  5. }

Conditions:

  • You sent a request to the status API endpoint.
  • The request included an unsupported parameter value.

Resolution:

Send a new request and verify that all of the parameter values are correct.