Troubleshooting — NATS
NATS is not yet available as self-service in the Hikube console. To provision an instance or change its configuration, contact support.
The diagnostics below are run from the nats CLI (see the quick start to save a connection context). When an action is needed on the platform side (resources, storage, restart, server logs), contact support, stating the project and the instance name.
Lost messages (no JetStream)
Cause: JetStream is not enabled or no stream is configured to capture the messages. Without JetStream, NATS runs in fire-and-forget mode: messages are only delivered to subscribers connected at the time of publication.
Solution:
- Check that JetStream is available for your account:
If JetStream is not enabled on the instance, contact support.nats account info
- Create a stream to capture the messages of the subjects you need:
nats stream add --subjects "orders.>" --storage file --replicas 3 --retention limits orders-stream
- Check that the stream has been created and is capturing messages:
nats stream info orders-stream
Consumer does not receive messages
Cause: the consumer is subscribed to a subject that does not match the one used by the producer. Common mistakes include a typo in the subject name, misuse of wildcards, or an incorrect queue group configuration.
Solution:
- Check the exact subject used by the producer and the consumer — subjects are case-sensitive.
- Test reception with a diagnostic subscription:
This shows all messages your user is allowed to receive.nats sub ">"
- Check the wildcards used:
orders.*does not matchorders.new.urgent(useorders.>for sub-levels). - If you use queue groups, check that the consumer is a member of the expected group and that the group name is identical.
JetStream storage full
Cause: the JetStream volume has reached its maximum capacity. New messages can no longer be persisted and publications fail.
Solution:
- Check JetStream storage usage:
nats account info
- Identify the largest streams:
nats stream list
- Purge old messages from the streams that allow it:
nats stream purge <stream-name>
- Adjust the stream retention policy — use
limitswithmax-ageto delete old messages automatically:nats stream edit <stream-name> --max-age 72h - If needed, request an increase of the JetStream volume. This option is not offered in the console; contact support.
Insufficient memory
Cause: the NATS server consumes more memory than the allocated limit, often because of a high number of connections, large messages (high max_payload), or in-memory JetStream streams.
Solution:
- Prefer
filestorage overmemoryfor large streams. - Reduce the size of published messages if very large messages are not needed.
- If the problem persists, request a larger preset or an adjustment of
max_payload. This option is not offered in the console; contact support.
Connection refused
Cause: wrong URL or port, wrong credentials, or a connection attempt from outside the platform without external access enabled.
Solution:
- Check that you are using the URL and credentials provided by support.
- Test the connection:
nats server check connection --server <nats-url> --user <user> --password <password>
- An
Authorization Violationerror indicates incorrect credentials; ask support to check or renew the password. - If you are connecting from outside the platform, check with support that external access is enabled on the instance.