Hyperledger Fabric 通道 queryInfo 抛出拒绝访问错误

Hyperledger Fabric channel queryInfo throws access denied error

我正在尝试使用节点 sdk 查询频道信息 (https://fabric-sdk-node.github.io/release-1.4/Channel.html - channel.queryInfo())。

我有两个网络设置(网络设置不是我做的。所以,我不知道有什么区别)。 在一个网络中,我能够成功查询。 在另一个中,我收到此错误:

Error: access denied for [GetChainInfo][ ]: [failed evaluating policy on signed data during check policy [/Channel/Application/Readers]: [Failed to reach implicit threshold of 1 sub-policies, required 1 remaining]]

但是,当我使用 useAdmin=true 调用时,即 channel.queryInfo(undefined, true) 它起作用了。我想知道是什么导致了一个网络出现这样的错误,而另一个网络却没有。在创建通道时是否有任何参数传递给 allow/disallow 非管理员查询?

频道的ACL默认字段为

        #ACL policy for qscc's "GetChainInfo" function
        qscc/GetChainInfo: /Channel/Application/Readers

并且每个组织的 Reader 在 configtx.yaml 中定义,例如

          Policies: &org1Policies
            Readers:
                Type: Signature
                Rule: "OR('org1.example.com.member')"

看来您的问题可能出在这里。确保 Readers 是 .member 而不是 OrgMSP 的 .admin