Troubleshooting

This section describes some of the most common issues that can occur when working with the Kafka API.

117: Invalid consumer name

{
    "error_code": 117,
    "message": "Invalid consumer name"
}

The consumer name specified is not valid.

See Consumers for more information.

119: Topic not found

{
    "error_code": 119,
    "message": "Topic not found"
}

The topic specified could not be found. This can occur when:

Possible reason Solution
The topic specified in the request does not exist. Call the Get partitions endpoint to make sure you are specifying the correct topic name.
Event logs are not enabled for your application. Please contact your Nuance representative to request event logs.
The token specified in the request is not correct. When you create a valid authorization token, it provides access to the event logs associated with the client ID specified in the authorization request. To solve the issue:
  1. In the Mix dashboard, click the Manage tab.
  2. From the menu on the left, select Applications.
  3. Select the application.
  4. Click the settings icon .
  5. Click the App ID tab.
Make sure that the client ID specified when requesting a token corresponds to the App ID for which you are trying to get logs.

121: Invalid client name

{
    "error_code": 121,
    "message": "Invalid client name."
}

The client name specified in the consumer group name is not valid.

See Consumer groups for more information.

401: Unauthorized

{
  "error":
  {
    "code": 401,
    "status": "Unauthorized",
    "message": "The request could not be authorized"
  }
}

The credentials specified are incorrect or expired.

Make sure that you have generated the access token and that you are providing the credentials as described in Authorization. Note that the token needs to be regenerated regularly. See Access token lifetime for details.

40403: Consumer instance not found

{
    "error_code": 40403,
    "message": "Consumer instance not found."
}

The default inactivity time for a consumer instance is 2 minutes. If the consumer is not active for more than 2 minutes, the consumer is deleted. This ensures that customer instances that are not used do not take server resources.

To solve this issue:

  • Keep the consumer instance alive by using the Get Records endpoint at regular intervals (using a loop is recommended, as described in Consumer lifecycle)
  • Recreate the consumer

40903: Illegal state: No current assignment for partition

{
  "error_code": 40903,
  "message": "Illegal state: No current assignment for partition ..."
}

This error indicates that the consumer is trying to access a partition that is not assigned to it.

To solve the issue, call the Get Assigned Partitions endpoint to get the list of partitions assigned to the consumer instance.

40903: Illegal state: Subscription to topics, partitions and pattern are mutually exclusive

{
  "error_code": 40903,
  "message": "Illegal state: Subscription to topics, partitions and pattern are mutually exclusive"
}

This error indicates that both the Subscribe endpoint and the Assign Partitions endpoint were used to assign partitions for the consumer.

Use either the Subscribe endpoint (to assign partitions automatically) or the Assign Partitions endpoint (to manually assign partitions).

Consumer gets stuck or times out

This may occur if the consumer instance is not deleted during shutdown. A consumer instance remains alive in the server until the consumer times out. In this scenario, the orphan consumer instance keeps a partition blocked until the timeout period is reached and the consumer is deleted. Any new consumer created during this period may get stuck since the partition is blocked by the orphan consumer.

Make sure to manage the lifecycle of consumer instances as recommended in Consumer lifecycle.