Search code examples
hyperledger-sawtooth

Event Subscription not working with error interrupted system call


I am trying to establish an event subscription via zmq from my locally running sawtooth network. As soon as I start my event-subscriber container, I get the error "interrupted system call".

I am following the example from here https://github.com/danintel/sawtooth-cookiejar/tree/master/events/go

I have tried using validatorUrl as tcp://localhost:4004 tcp://validator-0:4004

note: validator-0 is my local container name for the validator

Also, have tried with the direct IP of the validator container tcp://<IP>:4004

zmqConnection.RecvMsgWithId() is throwing the error.

The error I am getting is exactly at this line https://github.com/danintel/sawtooth-cookiejar/blob/master/events/go/src/events_client.go#L105

Can someone please help for the probable reasons or the way I can debug this one?


Solution

  • The issue was related to inter-pod communication. So the issue was, my event subscriber client was in a completely different pod than the pod where the validator container was running. In that case, we need to used the FQDN of that pod. Refer to the link below.

    https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-hostname-and-subdomain-fields