2017-08-02 56 views
0

我下面鏈接如下設置我的第一個網絡 http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html無法同行中hyperledger面料上Hyperledger面料連接通道

的任何步驟在此設置中提到的我是非常能夠做到所有。 問題是不是當我嘗試加入其他同行的通道,使用以下指令

你可以讓其他同行加入該頻道在必要時通過在四個環境變量 適當的更改。

我導出以下變量

export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp 
export CORE_PEER_ADDRESS=peer1.org1.example.com:8051 
export CORE_PEER_LOCALMSPID="Org1MSP" 
export CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt 

,然後我跑

peer channel join -b mychannel.block 

我得到以下錯誤

2017-08-02 06:38:12.375 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 
2017-08-02 06:38:12.376 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 
2017-08-02 06:38:12.379 UTC [grpc] Printf -> DEBU 003 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp 172.19.0.2:8051: getsockopt: connection refused"; Reconnecting to {peer1.org1.example.com:8051 <nil>} 
2017-08-02 06:38:13.379 UTC [grpc] Printf -> DEBU 004 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp 172.19.0.2:8051: getsockopt: connection refused"; Reconnecting to {peer1.org1.example.com:8051 <nil>} 
2017-08-02 06:38:15.085 UTC [grpc] Printf -> DEBU 005 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp 172.19.0.2:8051: getsockopt: connection refused"; Reconnecting to {peer1.org1.example.com:8051 <nil>} 
Error: Error getting endorser client channel: PER:404 - Error trying to connect to local peer 
/opt/gopath/src/github.com/hyperledger/fabric/peer/common/common.go:116 github.com/hyperledger/fabric/peer/common.GetEndorserClient 
/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/channel.go:149 github.com/hyperledger/fabric/peer/channel.InitCmdFactory 
/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/join.go:138 github.com/hyperledger/fabric/peer/channel.join 
/opt/gopath/src/github.com/hyperledger/fabric/peer/channel/join.go:42 github.com/hyperledger/fabric/peer/channel.joinCmd.func1 
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:599 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute 
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:689 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC 
/opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:648 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute 
/opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:118 main.main 
/opt/go/src/runtime/proc.go:192 runtime.main 
/opt/go/src/runtime/asm_amd64.s:2087 runtime.goexit 
Caused by: context deadline exceeded 
Usage: 
    peer channel join [flags] 

Flags: 
    -b, --blockpath string Path to file containing genesis block 

ORG1 peer0我能夠連接,但沒有其他節點

泊塢ps的輸出

enter image description here

回答

2

我想也許港口的問題。

您設置

export CORE_PEER_ADDRESS=peer1.org1.example.com:8051

雖然同行在7051聽,因此,你需要改變CORE_PEER_ADDRESS到

export CORE_PEER_ADDRESS=peer1.org1.example.com:7051

+0

謝謝..這工作,但我無法承受,爲什麼它不通過8051連接,因爲它是暴露的端口。可能需要閱讀Docker文檔。 – Katiyman

+2

8051是一個端口映射,用於在docker網絡內部使用筆記本電腦的情況下訪問容器。因爲沒有人在該端口上偵聽,所以它仍然保持7051和8051不可訪問。 –

+0

謝謝... – Katiyman

相關問題