Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jetstream Dispatcher error: panic: runtime error: invalid memory address or nil pointer dereference #622

Open
darylangg opened this issue Nov 12, 2024 · 0 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@darylangg
Copy link

darylangg commented Nov 12, 2024

Describe the bug
When trying to setup channels using the Knative bookstore example, received the error as per title when sending messages into the channel.

Expected behavior
Expected to see the sequence executed and output being passed back via trigger

To Reproduce

  • Using configs as per this repo
  • Using v1.16 manifest
  • Created Sequence as follows:
apiVersion: flows.knative.dev/v1
kind: Sequence
metadata:
  name: sequence
spec:
  channelTemplate: # Under the hood, the Sequence will create a Channel for each step in the Sequence
    apiVersion: messaging.knative.dev/v1alpha1
    kind: NatsJetStreamChannel
  steps:
    - ref: # This is the first step of the Sequence, it will send the event to the bad-word-filter service
        apiVersion: serving.knative.dev/v1
        kind: Service
        name: bad-word-filter
    - ref: # This is the second step of the Sequence, it will send the event to the sentiment-analysis-app service
        apiVersion: serving.knative.dev/v1
        kind: Service
        name: sentiment-analysis-app
  reply: # This is the last step of the Sequence, it will send the event back to the Broker as reply
    ref:
      kind: Broker
      apiVersion: eventing.knative.dev/v1
      name: knative-rabbitmq-broker
  • Initially, kubectl get natsjetstreamchannels showed that all channels were ready
  • After sending a message, error reported

Knative release version
1.16.0

Observations

  • After sending the CE, the message is sent to the first stream KN_DEFAULT__SEQUENCE_KN_SEQUENCE_0. We can observe this by using the nats cli.
kubectl run nats-client --rm -it --image=synadia/nats-box --restart=Never --
nats consumer add --server nats://<nats-server-ip>:4222 --deliver=all
  • We can then consume the message
nats consumer next --server nats://<nats-server-ip>:4222 KN_DEFAULT__SEQUENCE_KN_SEQUENCE_0  <consumer-name> --ack

Conclusion
The message is being sent to the NATS stream and stays there, but when the Jetstream Dispatcher attempts to consume the message it seems to throw the error reported.

@darylangg darylangg added the kind/bug Categorizes issue or PR as related to a bug. label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

1 participant