- The NATS module is not in a
Readystate. - The Eventing module reports that it cannot connect to the NATS backend.
- NATS Pods are in a
CrashLoopBackOfforPendingstate.
Issues with the NATS module can stem from misconfigurations in the NATS custom resource (CR), problems with the underlying Kubernetes Nodes, or storage issues with Persistent Volume Claims (PVCs).
-
To verify the health of the NATS cluster, check the NATS CR.
kubectl get nats -n kyma-system -
Look for
STATE: Ready. If the state isErrororProcessing, inspect the CR for detailed error messages.kubectl get nats {NATS_CR_NAME} -n kyma-system -o yaml -
Review the
status.conditionsto understand the root cause.
-
Ensure all NATS Pods are running correctly.
kubectl get pods -n kyma-system -l nats_cluster=eventing-nats -
If any Pods are not in the
Runningstate, usekubectl describe podandkubectl logsto investigate further.
-
If you use file storage, a common issue is a problem with the PVCs.
kubectl get pvc -n kyma-system -l nats_cluster=eventing-nats -
Check the
STATUScolumn. If a PVC isPending, there may be no available Persistent Volume that satisfies its request. If it isBound, check if it is full by referring to the NATS Backend Storage Is Full guide.
If the cluster appears healthy, you can inspect the JetStream components directly using the NATS CLI.
-
Ensure that you have access to the NATS server (see Accessing the NATS Server Using CLI).
-
Port-forward to a NATS Pod.
kubectl -n kyma-system port-forward svc/eventing-nats 4222 -
Verify that the
kymastream exists.$ nats stream ls ╭────────────────────────────────────────────────────────────────────────────╮ │ Streams │ ├──────┬─────────────┬─────────────────────┬──────────┬───────┬──────────────┤ │ Name │ Description │ Created │ Messages │ Size │ Last Message │ ├──────┼─────────────┼─────────────────────┼──────────┼───────┼──────────────┤ │ sap │ │ 2022-05-03 00:00:00 │ 0 │ 318 B │ 5.80s │ ╰──────┴─────────────┴─────────────────────┴──────────┴───────┴──────────────╯ -
If the stream exists, check the timestamp of the
Last Messagethat the stream received. A recent timestamp would mean that the event was published correctly. -
Check if the consumers were created and have the expected configurations.
nats consumer infoTo correlate the consumer to the Subscription and the specific event type, check the
descriptionfield of the consumer. -
If the PVC storage is fully consumed and matches the stream size as shown above, the stream can no longer receive messages. Either increase the PVC storage size (see NATS Backend Storage Is Full) or set the
MaxBytesproperty which removes the old messages.