事件订阅不适用于错误中断的系统调用
Event Subscription not working with error interrupted system call
我正在尝试通过 zmq 从本地 运行 锯齿网络建立事件订阅。一旦启动我的事件订阅者容器,我就会收到错误 "interrupted system call".
我正在按照此处的示例进行操作 https://github.com/danintel/sawtooth-cookiejar/tree/master/events/go
我试过将 validatorUrl 用作 tcp://localhost:4004
tcp://validator-0:4004
注意:validator-0 是验证器的本地容器名称
此外,已尝试使用验证器容器的直接 IP tcp://<IP>:4004
zmqConnection.RecvMsgWithId() 抛出错误。
我得到的错误正是在这一行https://github.com/danintel/sawtooth-cookiejar/blob/master/events/go/src/events_client.go#L105
有人可以帮助我解决可能的原因或调试方法吗?
我不知道,但一个可能的原因是这个例子在您发布后最近更新到 Go 的新版本 1.11(从 1.9 开始): https://github.com/danintel/sawtooth-cookiejar/pull/9
由于这个错误:
Loading input failed: unsupported version of go: exit status 2: flag provided but not defined: -compiled
该问题与 pod 间通信有关。所以问题是,我的事件订阅者客户端与验证器容器 运行 所在的容器完全不同。在这种情况下,我们需要使用该 pod 的 FQDN。参考下面的link。