eventing: Channels reply doesn't work on minikube
Describe the bug
The channels reply functionality doesn’t work. I tried both InMemoryChannel and KafkaChannel. After the subscriber service replies, the dispatcher receives the message but it fails to forward it. Dispatcher log (IMC):
{"level":"info","ts":"2019-10-14T13:33:22.723Z","logger":"inmemorychannel_dispatcher.in-memory-channel-dispatcher","caller":"channel/message_dispatcher.go:112","msg":"Dispatching message to http://example-inbound-channel.default.svc.cluster.local","knative.dev/controller":"in-memory-channel-dispatcher"}
{"level":"error","ts":"2019-10-14T13:33:52.715Z","logger":"inmemorychannel_dispatcher.in-memory-channel-dispatcher","caller":"fanout/fanout_handler.go:121","msg":"Fanout had an error","knative.dev/controller":"in-memory-channel-dispatcher","error":"Failed to forward reply Post http://example-inbound-channel.default.svc.cluster.local: dial tcp 10.108.102.77:80: i/o timeout","stacktrace":"knative.dev/eventing/pkg/channel/fanout.(*Handler).dispatch\n\t/home/prow/go/src/knative.dev/eventing/pkg/channel/fanout/fanout_handler.go:121\nknative.dev/eventing/pkg/channel/fanout.createReceiverFunction.func1.1\n\t/home/prow/go/src/knative.dev/eventing/pkg/channel/fanout/fanout_handler.go:95"}
Dispatcher log (KafkaChannel master version):
{"level":"info","ts":"2019-10-14T10:18:04.993Z","logger":"controller","caller":"channel/message_dispatcher.go:116","msg":"Dispatching message to http://example-inbound-channel.default.svc.cluster.local"}
{"level":"warn","ts":"2019-10-14T10:18:34.993Z","logger":"controller","caller":"dispatcher/dispatcher.go:213","msg":"Error in consumer group","error":"Failed to forward reply Post http://example-inbound-channel.default.svc.cluster.local: dial tcp 10.98.216.68:80: i/o timeout"}
The ip you see in the logs is the dispatcher cluster ip
Expected behavior I apply a subscription like:
apiVersion: messaging.knative.dev/v1alpha1
kind: Subscription
metadata:
name: sub-1
namespace: default
spec:
channel:
apiVersion: messaging.knative.dev/v1alpha1
kind: InMemoryChannel
name: example-inbound-channel
reply:
channel:
apiVersion: messaging.knative.dev/v1alpha1
kind: InMemoryChannel
name: example-outbound-channel
subscriber:
ref:
apiVersion: serving.knative.dev/v1alpha1
kind: Service
name: example-service
And I subscribe a logger service to example-outbound-channel. The example-service just forwards what it receives. It’s tested and it works correctly.
I expect that when i send a message to the inbound channel, the logger correctly publishes the event, but it doesn’t
Knative release version Knative Serving/Eventing 0.9.0 Kubernetes 1.16 Istio 1.1.7 Minikube 1.4.0
Additional context Since sequences creates subscriptions like above, they are broken too. Example Sequence:
apiVersion: messaging.knative.dev/v1alpha1
kind: Sequence
metadata:
name: sequence
spec:
channelTemplate:
apiVersion: messaging.knative.dev/v1alpha1
kind: InMemoryChannel
steps:
- ref:
apiVersion: serving.knative.dev/v1alpha1
kind: Service
name: example-service
- ref:
apiVersion: serving.knative.dev/v1alpha1
kind: Service
name: event-display
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 30 (22 by maintainers)
FYI I’ve created a little script to run kind + knative: https://gist.github.com/slinkydeveloper/193b44e8b15492c8584863411e1bc53e
Indeed it’s related, this fixed it for me. https://github.com/kubernetes/minikube/issues/1568#issuecomment-308674617
I’m facing this very same issue:
There’s a strange networking bug in minikube where a pod cannot reach itself through a service. I think that’s what’s happening here. (For reference https://github.com/kubernetes/minikube/issues/2460 & https://github.com/kubernetes/minikube/issues/1568)
ah: https://knative.slack.com/archives/C9JP909F0/p1568723863013900
I had the same problem a while ago. I switched to kind