hyperledger: ошибка при создании транзакции конфигурации канала - PullRequest
0 голосов
/ 07 июня 2018

Я перешел по этой ссылке: http://hyperledger -fabric.readthedocs.io / en / latest / build_network.html # Устранение неполадок для запуска моей первой сети, используя файл byfn.sh, и выполнилвсе шаги до

export CHANNEL_NAME=mychannel  && ../bin/configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $CHANNEL_NAME

Я получаю ошибку:

himani@himani-HP-Notebook:~/fabric-samples/first-network$ export CHANNEL_NAME=mychannelthis  && ../bin/configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $CHANNEL_NAME2018-06-07 11:42:00.552 IST [common/tools/configtxgen] main -> INFO 001 Loading configuration
2018-06-07 11:42:00.560 IST [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 002 Generating new channel configtx
2018-06-07 11:42:00.560 IST [msp] getMspConfig -> INFO 003 Loading NodeOUs
2018-06-07 11:42:00.561 IST [msp] getMspConfig -> INFO 004 Loading NodeOUs
2018-06-07 11:42:00.579 IST [common/tools/configtxgen] main -> CRIT 005 Error on outputChannelCreateTx: config update generation failure: could not parse application to application group: setting up the MSP manager failed: the supplied identity is not valid: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.org1.example.com")

Я пробовал варианты команды,

export CHANNEL_NAME=mychannelanother  && ../bin/configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $CHANNEL_NAME

export CHANNEL_NAME=mychannelanother  && ../bin/configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $mychannelanother

export CHANNEL_NAME=mychannel  && ../bin/configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $mychannel

Я даже пытался создатьканал без использования файла byfn.sh, но получил другую ошибку

himani@himani-HP-Notebook:~/fabric-samples/first-network$ peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
No command 'peer' found, did you mean:
 Command 'pear' from package 'php-pear' (main)
 Command 'pee' from package 'moreutils' (universe)
 Command 'peet' from package 'pipexec' (universe)
 Command 'beer' from package 'gerstensaft' (universe)
peer: command not found
himani@himani-HP-Notebook:~/fabric-samples/first-network$ peer channel create -o orderer.example.com:7050 -c mychannelthis -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
No command 'peer' found, did you mean:
 Command 'pear' from package 'php-pear' (main)
 Command 'pee' from package 'moreutils' (universe)
 Command 'beer' from package 'gerstensaft' (universe)
 Command 'peet' from package 'pipexec' (universe)
peer: command not found

Я изменил пример / home / himani / fabric-samples / first-network / crypto-config / ordererOrganizations /.com / tlsca / tlsca.example.com-cert.pem doc, перейдя по этой ссылке: https://gerrit.hyperledger.org/r/#/c/18177/ и выполнив команду еще раз, но безрезультатно.

Являются ли мои сертификатыустарели?Где я могу найти нужные?Является ли проблема чем-то еще?

ОБНОВЛЕНИЕ: После обращения к решению, предоставленному для аналогичной проблемы, Учебник по Hyperledger Fabric v1.1.0 byfn в Ubuntu 16.04 , я принесв моей сети и пытался очистить артефакты, но я не мог выполнить эти команды.Папка артефактов канала пуста.

Мне не удалось выполнить эти команды

Ответы [ 2 ]

0 голосов
/ 30 мая 2019

Я не знаю, решили вы это или нет, но там есть некоторые ошибки.

himani@himani-HP-Notebook:~/fabric-samples/first-network$ export CHANNEL_NAME=mychannelthis  && ../bin/configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $CHANNEL_NAME2018-06-07 11:42:00.552 IST [common/tools/configtxgen] main -> INFO 001 Loading configuration
2018-06-07 11:42:00.560 IST [common/tools/configtxgen] doOutputChannelCreateTx -> INFO 002 Generating new channel configtx
2018-06-07 11:42:00.560 IST [msp] getMspConfig -> INFO 003 Loading NodeOUs
2018-06-07 11:42:00.561 IST [msp] getMspConfig -> INFO 004 Loading NodeOUs
2018-06-07 11:42:00.579 IST [common/tools/configtxgen] main -> CRIT 005 Error on outputChannelCreateTx: config update generation failure: could not parse application to application group: setting up the MSP manager failed: the supplied identity is not valid: x509: certificate signed by unknown authority (possibly because of "x509: ECDSA verification failure" while trying to verify candidate authority certificate "ca.org1.example.com")

если вы следуете руководству, CHANNEL_NAME должно быть mychannel.

для 3-х вариантов, это должно быть примерно таким:

export CHANNEL_NAME=mychannel  && ../bin/configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $CHANNEL_NAME

для создания канала, создание равноправного канала можно отправить только внутри контейнера докера.Если вы отправляете напрямую из командной строки, попробуйте это

docker exec -it yourCliContainerName peer channel create -o orderer.example.com:7050 -c mychannelthis -f ./channel-artifacts/channel.tx --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

, но не забудьте сначала запустить контейнер.

надеюсь, это поможет

0 голосов
/ 07 июня 2018

Эта команда предназначена для добавления файлов в папку channel-artifacts, но по какой-то причине папка не была создана автоматически.При его создании с соответствующими разрешениями была выполнена команда и создан блок genesis.

...