Hyperledger fabric 无法使用loacl版本部署网络?

Hyperledger fabric 无法使用loacl版本部署网络?,hyperledger-fabric,hyperledger-composer,Hyperledger Fabric,Hyperledger Composer,问题:我对区块链的东西非常陌生。我启动本地结构并创建一个PeerAdmin卡,然后通过在我的windows机器中发出命令composer playerd启动本地游乐场。在操场上,我试图通过提供管理员姓名、ID和密码来部署一个示例marbles网络。然后它会通知我这个错误 Error: Error trying to start business network. Error: Unable to initalize channel. Attempted to contact 1 Peers.

问题:
我对区块链的东西非常陌生。我启动本地结构并创建一个PeerAdmin卡,然后通过在我的windows机器中发出命令
composer playerd
启动本地游乐场。在操场上,我试图通过提供管理员姓名、ID和密码来部署一个示例marbles网络。然后它会通知我这个错误

Error: Error trying to start business network.
Error: Unable to initalize channel. Attempted to contact 1 Peers. 
Last error was Error: Error: 2 UNKNOWN: access denied:
 channel [composerchannel] creator org [Org1MSP]
这是我启动结构时的输出

TharinduSA@LP-HQ-15957 MINGW64 ~/Desktop/fabric-dev-servers
$ ./startFabric.sh
Development only script for Hyperledger Fabric control
Running 'startFabric.sh'
FABRIC_VERSION is unset, assuming hlfv12
FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)
Removing peer0.org1.example.com ... done
Removing orderer.example.com    ... done
Removing ca.org1.example.com    ... done
Removing couchdb                ... done
Removing network composer_default
Creating network "composer_default" with the default driver
Creating ca.org1.example.com ... done
Creating orderer.example.com ... done
Creating couchdb             ... done
Creating peer0.org1.example.com ... done
sleeping for 15 seconds to wait for fabric to complete start up
2018-11-01 05:07:09.804 UTC [viperutil] getKeysRecursively -> DEBU 001 Found map[string]interface{} value for peer.BCCSP
2018-11-01 05:07:09.805 UTC [viperutil] unmarshalJSON -> DEBU 002 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
2018-11-01 05:07:09.805 UTC [viperutil] getKeysRecursively -> DEBU 003 Found real value for peer.BCCSP.Default setting to string SW
2018-11-01 05:07:09.806 UTC [viperutil] getKeysRecursively -> DEBU 004 Found map[string]interface{} value for peer.BCCSP.SW
2018-11-01 05:07:09.806 UTC [viperutil] getKeysRecursively -> DEBU 005 Found map[string]interface{} value for peer.BCCSP.SW.FileKeyStore
2018-11-01 05:07:09.806 UTC [viperutil] unmarshalJSON -> DEBU 006 Unmarshal JSON: value cannot be unmarshalled: unexpected end of JSON input
2018-11-01 05:07:09.806 UTC [viperutil] getKeysRecursively -> DEBU 007 Found real value for peer.BCCSP.SW.FileKeyStore.KeyStore setting to string
2018-11-01 05:07:09.807 UTC [viperutil] unmarshalJSON -> DEBU 008 Unmarshal JSON: value cannot be unmarshalled: invalid character 'S' looking for beginning of value
2018-11-01 05:07:09.807 UTC [viperutil] getKeysRecursively -> DEBU 009 Found real value for peer.BCCSP.SW.Hash setting to string SHA2
2018-11-01 05:07:09.807 UTC [viperutil] unmarshalJSON -> DEBU 00a Unmarshal JSON: value is not a string: 256
2018-11-01 05:07:09.807 UTC [viperutil] getKeysRecursively -> DEBU 00b Found real value for peer.BCCSP.SW.Security setting to int 256
2018-11-01 05:07:09.808 UTC [viperutil] getKeysRecursively -> DEBU 00c Found map[string]interface{} value for peer.BCCSP.PKCS11
2018-11-01 05:07:09.808 UTC [viperutil] unmarshalJSON -> DEBU 00d Unmarshal JSON: value is not a string: <nil>
2018-11-01 05:07:09.808 UTC [viperutil] getKeysRecursively -> DEBU 00e Found real value for peer.BCCSP.PKCS11.Label setting to <nil> <nil>
2018-11-01 05:07:09.809 UTC [viperutil] unmarshalJSON -> DEBU 00f Unmarshal JSON: value is not a string: <nil>
2018-11-01 05:07:09.809 UTC [viperutil] getKeysRecursively -> DEBU 010 Found real value for peer.BCCSP.PKCS11.Pin setting to <nil> <nil>
2018-11-01 05:07:09.810 UTC [viperutil] unmarshalJSON -> DEBU 011 Unmarshal JSON: value is not a string: <nil>
2018-11-01 05:07:09.811 UTC [viperutil] getKeysRecursively -> DEBU 012 Found real value for peer.BCCSP.PKCS11.Hash setting to <nil> <nil>
2018-11-01 05:07:09.811 UTC [viperutil] unmarshalJSON -> DEBU 013 Unmarshal JSON: value is not a string: <nil>
2018-11-01 05:07:09.812 UTC [viperutil] getKeysRecursively -> DEBU 014 Found real value for peer.BCCSP.PKCS11.Security setting to <nil> <nil>
2018-11-01 05:07:09.813 UTC [viperutil] getKeysRecursively -> DEBU 015 Found map[string]interface{} value for peer.BCCSP.PKCS11.FileKeyStore
2018-11-01 05:07:09.813 UTC [viperutil] unmarshalJSON -> DEBU 016 Unmarshal JSON: value is not a string: <nil>
2018-11-01 05:07:09.814 UTC [viperutil] getKeysRecursively -> DEBU 017 Found real value for peer.BCCSP.PKCS11.FileKeyStore.KeyStore setting to <nil> <nil>
2018-11-01 05:07:09.814 UTC [viperutil] unmarshalJSON -> DEBU 018 Unmarshal JSON: value is not a string: <nil>
2018-11-01 05:07:09.814 UTC [viperutil] getKeysRecursively -> DEBU 019 Found real value for peer.BCCSP.PKCS11.Library setting to <nil> <nil>
2018-11-01 05:07:09.814 UTC [viperutil] EnhancedExactUnmarshalKey -> DEBU 01a map[peer.BCCSP:map[Default:SW SW:map[FileKeyStore:map[KeyStore:] Hash:SHA2 Security:256] PKCS11:map[Label:<nil> Pin:<nil> Hash:<nil> Security:<nil> FileKeyStore:map[KeyStore:<nil>] Library:<nil>]]]
2018-11-01 05:07:09.817 UTC [bccsp_sw] openKeyStore -> DEBU 01b KeyStore opened at [/etc/hyperledger/peer/msp/keystore]...done
2018-11-01 05:07:09.818 UTC [bccsp] initBCCSP -> DEBU 01c Initialize BCCSP [SW]
2018-11-01 05:07:09.818 UTC [msp] getPemMaterialFromDir -> DEBU 01d Reading directory /etc/hyperledger/peer/msp/signcerts
2018-11-01 05:07:09.821 UTC [msp] getPemMaterialFromDir -> DEBU 01e Inspecting file /etc/hyperledger/peer/msp/signcerts/peer0.org1.example.com-cert.pem
2018-11-01 05:07:09.823 UTC [msp] getPemMaterialFromDir -> DEBU 01f Reading directory /etc/hyperledger/peer/msp/cacerts
2018-11-01 05:07:09.826 UTC [msp] getPemMaterialFromDir -> DEBU 020 Inspecting file /etc/hyperledger/peer/msp/cacerts/ca.org1.example.com-cert.pem
2018-11-01 05:07:09.832 UTC [msp] getPemMaterialFromDir -> DEBU 021 Reading directory /etc/hyperledger/peer/msp/admincerts
2018-11-01 05:07:09.840 UTC [msp] getPemMaterialFromDir -> DEBU 022 Inspecting file /etc/hyperledger/peer/msp/admincerts/Admin@org1.example.com-cert.pem
2018-11-01 05:07:09.843 UTC [msp] getPemMaterialFromDir -> DEBU 023 Reading directory /etc/hyperledger/peer/msp/intermediatecerts
2018-11-01 05:07:09.844 UTC [msp] getMspConfig -> DEBU 024 Intermediate certs folder not found at [/etc/hyperledger/peer/msp/intermediatecerts]. Skipping. [stat /etc/hyperledger/peer/msp/intermediatecerts: no such file or directory]
2018-11-01 05:07:09.844 UTC [msp] getPemMaterialFromDir -> DEBU 025 Reading directory /etc/hyperledger/peer/msp/tlscacerts
2018-11-01 05:07:09.847 UTC [msp] getPemMaterialFromDir -> DEBU 026 Inspecting file /etc/hyperledger/peer/msp/tlscacerts/tlsca.org1.example.com-cert.pem
2018-11-01 05:07:09.850 UTC [msp] getPemMaterialFromDir -> DEBU 027 Reading directory /etc/hyperledger/peer/msp/tlsintermediatecerts
2018-11-01 05:07:09.851 UTC [msp] getMspConfig -> DEBU 028 TLS intermediate certs folder not found at [/etc/hyperledger/peer/msp/tlsintermediatecerts]. Skipping. [stat /etc/hyperledger/peer/msp/tlsintermediatecerts: no such file or directory]
2018-11-01 05:07:09.851 UTC [msp] getPemMaterialFromDir -> DEBU 029 Reading directory /etc/hyperledger/peer/msp/crls
2018-11-01 05:07:09.853 UTC [msp] getMspConfig -> DEBU 02a crls folder not found at [/etc/hyperledger/peer/msp/crls]. Skipping. [stat /etc/hyperledger/peer/msp/crls: no such file or directory]
2018-11-01 05:07:09.855 UTC [msp] getMspConfig -> DEBU 02b MSP configuration file not found at [/etc/hyperledger/peer/msp/config.yaml]: [stat /etc/hyperledger/peer/msp/config.yaml: no such file or directory]
2018-11-01 05:07:09.855 UTC [msp] newBccspMsp -> DEBU 02c Creating BCCSP-based MSP instance
2018-11-01 05:07:09.855 UTC [msp] New -> DEBU 02d Creating Cache-MSP instance
2018-11-01 05:07:09.855 UTC [msp] loadLocaMSP -> DEBU 02e Created new local MSP
2018-11-01 05:07:09.856 UTC [msp] Setup -> DEBU 02f Setting up MSP instance Org1MSP
2018-11-01 05:07:09.856 UTC [msp/identity] newIdentity -> DEBU 030 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICQjCCAemgAwIBAgIQDJbOh88U+tlJ9He5sjUwBDAKBggqhkjOPQQDAjBzMQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu
b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjYxMjQ5MjZaFw0yNzA2MjQxMjQ5MjZa
MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T
YW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQD
ExNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE
kQ216YBD8kks+IzKJyBmdLqh/L/sEZ5twTqYpsK1ztNhIUDplsletAFOJQWRH+kb
hzFFNvS1qwveGRU6ztN5haNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYG
BFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgGatlq7sEgH2tEuTAqaqm
ZJ5who46vQIXoyLYnkfhpq4wCgYIKoZIzj0EAwIDRwAwRAIgCyrj/lUjtBYaEgMt
x98l5z+iLU6r+gp4CsdcDYzKLugCIGXlcU56avWSUtRAGn8Avpb6TOxtkrKIpeTE
QfM8VsS/
-----END CERTIFICATE-----
2018-11-01 05:07:09.857 UTC [msp/identity] newIdentity -> DEBU 031 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICGjCCAcCgAwIBAgIRANuOnVN+yd/BGyoX7ioEklQwCgYIKoZIzj0EAwIwczEL
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG
cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh
Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNjI2MTI0OTI2WhcNMjcwNjI0MTI0OTI2
WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN
U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMS5leGFtcGxlLmNvbTBZ
MBMGByqGSM49AgEGCCqGSM49AwEHA0IABGu8KxBQ1GkxSTMVoLv7NXiYKWj5t6Dh
WRTJBHnLkWV7lRUfYaKAKFadSii5M7Z7ZpwD8NS7IsMdPR6Z4EyGgwKjTTBLMA4G
A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIBmrZau7BIB9
rRLkwKmqpmSecIaOOr0CF6Mi2J5H4aauMAoGCCqGSM49BAMCA0gAMEUCIQC4sKQ6
CEgqbTYe48az95W9/hnZ+7DI5eSnWUwV9vCd/gIgS5K6omNJydoFoEpaEIwM97uS
XVMHPa0iyC497vdNURA=
-----END CERTIFICATE-----
2018-11-01 05:07:09.890 UTC [msp/identity] newIdentity -> DEBU 032 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICGTCCAb+gAwIBAgIQTx2TvwYtAf62KKQliP6UoTAKBggqhkjOPQQDAjBzMQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu
b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjYxMjQ5MjZaFw0yNzA2MjQxMjQ5MjZa
MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T
YW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMC5vcmcxLmV4YW1wbGUuY29tMFkw
EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEPPHUp7+EYb2xIbleWfRClMgqbtQqRmIS
2a5F8T0L3J6IZp9wm7K+w4LIBIgw1Cz9D8nqHW6f4OYBrbp0cSGnR6NNMEswDgYD
VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgGatlq7sEgH2t
EuTAqaqmZJ5who46vQIXoyLYnkfhpq4wCgYIKoZIzj0EAwIDSAAwRQIhAK4i2Hz2
K398TvjJk62neDoenYhkMY7rBN3BN/GI0G0SAiAOTx36wuy9/4BBV8NVBCZ9V+Iw
msdI9CyZ59oVMVmNYQ==
-----END CERTIFICATE-----
2018-11-01 05:07:09.897 UTC [bccsp_sw] loadPrivateKey -> DEBU 033 Loading private key [dfb17cf51dc061d585b4850599be0e4b8b7cc8cc363a67c23bc03c6c5393b0e0] at [/etc/hyperledger/peer/msp/keystore/dfb17cf51dc061d585b4850599be0e4b8b7cc8cc363a67c23bc03c6c5393b0e0_sk]...
2018-11-01 05:07:09.901 UTC [msp/identity] newIdentity -> DEBU 034 Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICGTCCAb+gAwIBAgIQTx2TvwYtAf62KKQliP6UoTAKBggqhkjOPQQDAjBzMQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu
b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjYxMjQ5MjZaFw0yNzA2MjQxMjQ5MjZa
MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T
YW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMC5vcmcxLmV4YW1wbGUuY29tMFkw
EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEPPHUp7+EYb2xIbleWfRClMgqbtQqRmIS
2a5F8T0L3J6IZp9wm7K+w4LIBIgw1Cz9D8nqHW6f4OYBrbp0cSGnR6NNMEswDgYD
VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgGatlq7sEgH2t
EuTAqaqmZJ5who46vQIXoyLYnkfhpq4wCgYIKoZIzj0EAwIDSAAwRQIhAK4i2Hz2
K398TvjJk62neDoenYhkMY7rBN3BN/GI0G0SAiAOTx36wuy9/4BBV8NVBCZ9V+Iw
msdI9CyZ59oVMVmNYQ==
-----END CERTIFICATE-----
2018-11-01 05:07:09.902 UTC [msp] setupSigningIdentity -> DEBU 035 Signing identity expires at 2027-06-24 12:49:26 +0000 UTC
2018-11-01 05:07:09.902 UTC [msp] Validate -> DEBU 036 MSP Org1MSP validating identity
2018-11-01 05:07:09.903 UTC [msp] GetDefaultSigningIdentity -> DEBU 037 Obtaining default signing identity
2018-11-01 05:07:09.903 UTC [grpc] Printf -> DEBU 038 parsed scheme: ""
2018-11-01 05:07:09.903 UTC [grpc] Printf -> DEBU 039 scheme "" not registered, fallback to default scheme
2018-11-01 05:07:09.903 UTC [grpc] Printf -> DEBU 03a ccResolverWrapper: sending new addresses to cc: [{orderer.example.com:7050 0  <nil>}]
2018-11-01 05:07:09.903 UTC [grpc] Printf -> DEBU 03b ClientConn switching balancer to "pick_first"
2018-11-01 05:07:09.904 UTC [grpc] Printf -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc4201fe4f0, CONNECTING
2018-11-01 05:07:09.908 UTC [grpc] Printf -> DEBU 03d pickfirstBalancer: HandleSubConnStateChange: 0xc4201fe4f0, READY
2018-11-01 05:07:09.908 UTC [channelCmd] InitCmdFactory -> INFO 03e Endorser and orderer connections initialized
Error: channel create configuration tx file not found open C:/Program Files/Git/etc/hyperledger/configtx/composer-channel.tx: no such file or directory
我在网上搜索了很多关于这方面的信息。但我无法找到解决办法。有人能帮我解决一个问题吗

谢谢

您可以尝试以下方法:

将这一行插入
fabric tools\hlfv11\startFabric.sh

export MSYS_NO_PATHCONV=1
以前

# Create the channel
docker exec peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c composerchannel -f /etc/hyperledger/configtx/composer-channel.tx
在此之后,运行
fabric tools
目录中的命令:

./stopFabric.sh
./teardownFabric.sh
./startFabric.sh

然后,教程中的
composer network install
composer network start
步骤应正确运行。

我看到您使用的是windows,不幸的是,windows不是hyperledger composer支持的平台。推荐的方法是使用虚拟机监控程序,如virtualbox、vmware或hyperV,并在其中运行linux发行版。Windows确实有针对linux的Windows子系统,但您不能将其用作完整的linux发行版,因为它也会有问题。

您可以发布
docker ps
的输出吗?听起来你的布料好像不合身。另请参阅。您能否提供有关如何启动本地结构的详细信息,并在启动本地结构时粘贴到收到的输出中。@PaulO'Mahony我已使用docker ps命令输出更新了该问题。@dwp抱歉,我忘了放置假定要添加的行。
export MSYS_NO_PATHCONV=1
# Create the channel
docker exec peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c composerchannel -f /etc/hyperledger/configtx/composer-channel.tx
./stopFabric.sh
./teardownFabric.sh
./startFabric.sh