Hyperledger Fabric fabcar-对等链码&500个访问错误-CLI [英] Hyperledger Fabric fabcar - peer chaincode & 500 Access Errors - CLI

查看:120
本文介绍了Hyperledger Fabric fabcar-对等链码&500个访问错误-CLI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我执行对等方的docker容器,并尝试CLI命令进行对等方链代码和对等方生命周期,但是它们失败了.我知道这是--cafile问题,但是我尝试了几种组合,但没有任何效果.这是带有2.0的fabcar示例,没有任何更改.有人对此有任何想法吗?

I exec into the docker container for the peer and try the CLI commands for peer chaincode and peer lifecycle but they fail. I understand this is a --cafile issue but I tried a few combinations and nothing worked. This is the fabcar example with 2.0, without any changes. Does anyone have any ideas about this?

这里是示例-

/opt/gopath/src/github.com/hyperledger/fabric/peer#对等生命周期链码查询已安装错误:查询失败,状态:500-失败由于ACL检查失败而授权调用:验证失败提案的创建者在无频道期间满足本地MSP负责人使用策略[管理员]检查策略:[身份不是管理员此MSP [Org2MSP]:身份不包含OU [ADMIN],MSP:[Org2MSP]]

/opt/gopath/src/github.com/hyperledger/fabric/peer # peer lifecycle chaincode queryinstalled Error: query failed with status: 500 - Failed to authorize invocation due to failed ACL check: Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [The identity is not an admin under this MSP [Org2MSP]: The identity does not contain OU [ADMIN], MSP: [Org2MSP]]

/opt/gopath/src/github.com/hyperledger/fabric/peer#对等链代码list --installed错误:错误的响应:500-拒绝访问[getinstalledchaincodes]:无法验证提案的创建者在无信道检查策略期间满足本地MSP主体策略[管理员]:[此身份不是此MSP下的管理员[Org2MSP]:身份不包含OU [ADMIN],MSP:[Org2MSP]]

/opt/gopath/src/github.com/hyperledger/fabric/peer # peer chaincode list --installed Error: bad response: 500 - access denied for [getinstalledchaincodes]: Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [The identity is not an admin under this MSP [Org2MSP]: The identity does not contain OU [ADMIN], MSP: [Org2MSP]]

和环境-

CORE_PEER_GOSSIP_ORGLEADER = false HOSTNAME = 6bc772022b6bCORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD =CORE_PEER_TLS_KEY_FILE =/etc/hyperledger/fabric/tls/server.keyCORE_PEER_GOSSIP_BOOTSTRAP = peer0.org2.example.com:9051 SHLVL = 1HOME =/root CORE_PEER_CHAINCODELISTENADDRESS = 0.0.0.0:9052CORE_PEER_TLS_ROOTCERT_FILE =/etc/hyperledger/fabric/tls/ca.crtCORE_LEDGER_STATE_COOKHDBCONFIG_COUCHDBADDRESS = couchdb1:5984CORE_PEER_PROFILE_ENABLED = true CORE_PEER_ID = peer0.org2.example.comCORE_PEER_CHAINCODEADDRESS = peer0.org2.example.com:9052CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE = net_testFABRIC_LOGGING_SPEC = INFOCORE_PEER_GOSSIP_EXTERNALENDPOINT = peer0.org2.example.com:9051TERM = xterm CORE_PEER_GOSSIP_USELEADERELECTION = trueFABRIC_CFG_PATH =/etc/hyperledger/fabric路径=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binCORE_LEDGER_STATE_COUGHDBCONFIG_USERNAME = CORE_PEER_LOCALMSPID = Org2MSPCORE_VM_ENDPOINT = unix:///host/var/run/docker.sockCORE_LEDGER_STATE_STATEDATABASE = CouchDBCORE_PEER_LISTENADDRESS = 0.0.0.0:9051PWD =/opt/gopath/src/github.com/hyperledger/fabric/peerCORE_PEER_TLS_CERT_FILE =/etc/hyperledger/fabric/tls/server.crtCORE_PEER_TLS_ENABLED =真CORE_PEER_ADDRESS = peer0.org2.example.com:9051/opt/gopath/src/github.com/hyperledger/fabric/peer#

CORE_PEER_GOSSIP_ORGLEADER=false HOSTNAME=6bc772022b6b CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:9051 SHLVL=1 HOME=/root CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:9052 CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb1:5984 CORE_PEER_PROFILE_ENABLED=true CORE_PEER_ID=peer0.org2.example.com CORE_PEER_CHAINCODEADDRESS=peer0.org2.example.com:9052 CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_test FABRIC_LOGGING_SPEC=INFO CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:9051 TERM=xterm CORE_PEER_GOSSIP_USELEADERELECTION=true FABRIC_CFG_PATH=/etc/hyperledger/fabric PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= CORE_PEER_LOCALMSPID=Org2MSP CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock CORE_LEDGER_STATE_STATEDATABASE=CouchDB CORE_PEER_LISTENADDRESS=0.0.0.0:9051 PWD=/opt/gopath/src/github.com/hyperledger/fabric/peer CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt CORE_PEER_TLS_ENABLED=true CORE_PEER_ADDRESS=peer0.org2.example.com:9051 /opt/gopath/src/github.com/hyperledger/fabric/peer #

推荐答案

答案需要使用env vars来解决问题.该问题被否定投票,因此我将不发布答案详细信息,因为没人需要它们.

The answer needs to use env vars to solve the problem. The question was voted negative so I will not post the answer details as no one needs them.

这篇关于Hyperledger Fabric fabcar-对等链码&500个访问错误-CLI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆