Docker Hyperledger Composer-网络管理员#管理员对网络没有读取权限
在学习本教程之后 当我使用命令时:Docker Hyperledger Composer-网络管理员#管理员对网络没有读取权限,docker,hyperledger-fabric,hyperledger,hyperledger-composer,Docker,Hyperledger Fabric,Hyperledger,Hyperledger Composer,在学习本教程之后 当我使用命令时: composer network start --networkName my-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file my-network-admin.card 我已成功创建卡并使用以下命令导入它: composer card import --file my-ne
composer network start --networkName my-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file my-network-admin.card
我已成功创建卡并使用以下命令导入它:
composer card import --file my-network-admin.card
composer network ping --card admin@my-network
但是,问题在于使用以下命令:
composer card import --file my-network-admin.card
composer network ping --card admin@my-network
我收到以下错误:
返回的事务失败:AccessException:参与者“org.hyperledger.composer.system.NetworkAdmin#admin”没有对资源“org.hyperledger.composer.system.Network#my”的“读取”访问权限-network@0.0.1'
命令失败
我查看了文档,尝试重新启动整个过程几次都没有成功。我甚至尝试将以下内容添加到我的权限.acl
文件中:
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
rule Default {
description: "Grant all access by default"
participant: "org.hyperledger.composer.system.Participant"
operation: ALL
resource: "**"
action: ALLOW
}
rule NetworkAdminUser {
description: "Grant business network administrators full access to user resources"
participant: "org.hyperledger.composer.system.NetworkAdmin"
operation: ALL
resource: "**"
action: ALLOW
}
rule NetworkAdminSystem {
description: "Grant business network administrators full access to system resources"
participant: "org.hyperledger.composer.system.NetworkAdmin"
operation: ALL
resource: "org.hyperledger.composer.system.**"
action: ALLOW
}
编辑:
当我运行composer卡片列表-c时admin@my-网络
,我得到以下信息:
userName: admin
description:
businessNetworkName: my-network
identityId: fc63d3e4b3b3d73a2be2943a0c422e7af862207f9489fc1ce3707e8769efc99b
roles:
- PeerAdmin
connectionProfile:
name: hlfv1
x-type: hlfv1
credentials: Credentials set
Command succeeded