У меня ошибка при создании канала:
Error: got unexpected status: FORBIDDEN -- implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Writers' sub-policies to be satisfied: permission denied
Заказчица говорит следующее
WARN 025 [channel: testchannel] Rejecting broadcast of config message from 192.168.0.121:39954 because of error: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Writers' sub-policies to be satisfied: permission denied
Я использую эти команды внутри однорангового контейнера:
export CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/crypto-config/peer/msp/users/admin/msp/
peer channel create -c testchannel -f testchannel.tx --outputBlock testchannel.block --tls --cafile /etc/hyperledger/crypto-config/peer/tls-msp/cacerts/192-168-0-114-7054.pem -o 192.168.0.124:7050
Мои правила для канала следующие:
Channel: &ChannelDefaults
# Policies defines the set of policies at this level of the config tree
# For Channel policies, their canonical path is
Policies:
# Who may invoke the 'Deliver' API
Readers:
Type: ImplicitMeta
Rule: "ANY Readers"
# Who may invoke the 'Broadcast' API
Writers:
Type: ImplicitMeta
Rule: "ANY Writers"
# By default, who may modify elements at this config level
Admins:
Type: ImplicitMeta
Rule: "MAJORITY Admins"
# Capabilities describes the channel level capabilities, see the
# dedicated Capabilities section elsewhere in this file for a full
# description
Capabilities:
<<: *ChannelCapabilities
Я использую etcdraft с 3 узлами и v 1.4.1.
РЕДАКТИРОВАТЬ 1:
У меня нет контейнера Cli, должен ли я делать это из этого контейнера Cli? Прямо сейчас я выполняю все эти команды из однорангового контейнера.
Обновлено еще раз:
Если я добавлю папку admincerts с сертификатом администратора в папку msp администратора:
Я получаю сообщение об ошибке:
эта политика требует выполнения 1 из подполитик «Писатели»: разрешение отклонено
Но если я не добавлю его, я получаю сообщение об ошибке:
эта политика требует выполнения 1 из подполитик «Администраторы»: разрешение отклонено
Исправлено, так что это была проблема с политиками. Мне пришлось отредактировать в confitx.yml политики на уровне организации.
Я добавил любого участника в качестве читателя и писателя и только администраторов в качестве администраторов
- &Example
# DefaultOrg defines the organization which is used in the sampleconfig
# of the fabric.git development environment
Name: Example
# ID to load the MSP definition as
ID: ExampleMSP
MSPDir: <pathtomsp>
Policies:
Readers:
Type: Signature
Rule: "OR('ExampleMSP.member')"
Writers:
Type: Signature
Rule: "OR('ExampleMSP.member')"
Admins:
Type: Signature
Rule: "OR('ExampleMSP.admin')"
Я все еще сталкиваюсь с вышеуказанной проблемой даже после упомянутых вами изменений, не могли бы вы поделиться своим измененным файлом configtx.yaml? заранее спасибо