0

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?

Sanjib
  • 119
  • 1
  • 1
  • 15

2 Answers2

0

I do not know, but one possible cause is this example was recently updated to a new version of Go, 1.11 (from 1.9) after your posting: https://github.com/danintel/sawtooth-cookiejar/pull/9

Because of this error: Loading input failed: unsupported version of go: exit status 2: flag provided but not defined: -compiled

Dan Anderson
  • 2,265
  • 1
  • 9
  • 20
  • Thanks, Dan for the comment. Though the above PR is not related to the issue I was facing, I could resolve my issue. It was related to inter-pod communication – Sanjib Oct 07 '19 at 20:35
0

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

Sanjib
  • 119
  • 1
  • 1
  • 15