首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >大理石,无法在本地网络上安装链码-错误“此身份不是管理员”

大理石,无法在本地网络上安装链码-错误“此身份不是管理员”
EN

Stack Overflow用户
提问于 2018-03-29 09:51:43
回答 1查看 694关注 0票数 2

我正在遵循指南并使用本地网络,我通过fabric-sample/fabcar的3个脚本创建了管理证书,它工作正常。但是当我尝试安装链码时,它给出了下面的错误信息。

代码语言:javascript
复制
info: [fcw] Going to enroll with admin cert!  peer_urls=[grpc://localhost:7051], channel_id=mychannel, uuid=marblesDockerComposeNetworkmychannelOrg1MSPfabricpeerorg1, orderer_url=grpc://localhost:7050, msp_id=Org1MSP
debug: added peer grpc://localhost:7051
debug: [fcw] Successfully got enrollment marblesDockerComposeNetworkmychannelOrg1MSPfabricpeerorg1
---------------------------------------
info: Now we install
---------------------------------------
debug: [fcw] Installing Chaincode
debug: [fcw] Sending install req targets=[grpc.http2.keepalive_time=300, grpc.keepalive_time_ms=300000, grpc.http2.keepalive_timeout=35, grpc.keepalive_timeout_ms=3500, grpc.max_receive_message_length=-1, grpc.max_send_message_length=-1, grpc.primary_user_agent=grpc-node/1.10.0, _url=grpc://localhost:7051, addr=localhost:7051, , _request_timeout=90000, , _name=null], chaincodePath=marbles, chaincodeId=marbles, chaincodeVersion=v4
info: [packager/Golang.js]: packaging GOLANG from marbles
error: [client-utils.js]: sendPeersProposal - Promise is rejected: Error: 2 UNKNOWN: chaincode error (status: 500, message: Authorization for INSTALL has been denied (error-Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]))
    at new createStatusError (/Volumes/dev/qukuailian/marbles-master/node_modules/grpc/src/client.js:64:15)
    at /Volumes/dev/qukuailian/marbles-master/node_modules/grpc/src/client.js:583:15
error: [fcw] Failed to obtain endorsement for transaction. code=2, , details=chaincode error (status: 500, message: Authorization for INSTALL has been denied (error-Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]))
error: [fcw] Error in install catch block object code=2, , details=chaincode error (status: 500, message: Authorization for INSTALL has been denied (error-Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]))
---------------------------------------
info: Install done. Errors: parsed=Blockchain network error - [This identity is not an admin])), raw=[code=2, , details=chaincode error (status: 500, message: Authorization for INSTALL has been denied (error-Failed verifying that proposal's creator satisfies local MSP principal during channelless check policy with policy [Admins]: [This identity is not an admin]))]

connection_profile_local.json配置如下

代码语言:javascript
复制
{
    "name": "Docker Compose Network",
    "x-networkId": "not-important",
    "x-type": "hlfv1",
    "description": "Connection Profile for an Hyperledger Fabric network on a local machine",
    "version": "1.0.0",
    "client": {
        "organization": "Org1MSP",
        "credentialStore": {
            "path": "/Volumes/dev/qukuailian2/fabric-samples/fabcar/hfc-key-store"
        }
    },
    "channels": {
        "mychannel": {
            "orderers": [
                "fabric-orderer"
            ],
            "peers": {
                "fabric-peer-org1": {
                    "endorsingPeer": true,
                    "chaincodeQuery": true,
                    "ledgerQuery": true,
                    "eventSource": true
                }
            },
            "chaincodes": [
                "marbles:v4"
            ],
            "x-blockDelay": 10000
        }
    },
    "organizations": {
        "Org1MSP": {
            "mspid": "Org1MSP",
            "peers": [
                "fabric-peer-org1"
            ],
            "certificateAuthorities": [
                "fabric-ca"
            ],
            "x-certJson": {
                "path": "/Volumes/dev/qukuailian2/fabric-samples/fabcar/hfc-key-store/user1"
            }
        }
    },
    "orderers": {
        "fabric-orderer": {
            "url": "grpc://localhost:7050"
        }
    },
    "peers": {
        "fabric-peer-org1": {
            "url": "grpc://localhost:7051",
            "eventUrl": "grpc://localhost:7053"
        }
    },
    "certificateAuthorities": {
        "fabric-ca": {
            "url": "http://localhost:7054",
            "httpOptions": {
                "verify": true
            },
            "registrar": [
                {
                    "enrollId": "admin",
                    "enrollSecret": "adminpw"
                }
            ],
            "caName": null
        }
    }
}

我的frbric示例版本是v1.0.4,大理石版本是4.0

EN

回答 1

Stack Overflow用户

发布于 2018-11-22 19:11:00

本地对等项的msp文件夹中的admincerts文件夹应包含某个管理员成员的证书(通常为msp/signcerts/cert.pem)。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49546814

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档