Hyperledger Fabric docker-compose-2org-4peers.yaml Error
lanshanwanghao opened this issue · 11 comments
Environment
Any environment information, e.g., os, tool versions, image version.
`uname -a
Linux greenvm-w11516v1 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@greenvm-w11516v1 1.0]# docker --version
Docker version 17.06.0-ce, build 02c1d87`
[root@greenvm-w11516v1 1.0]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
dev-peer0.org1.example.com-mycc-1.0 latest 265ab25b6fa9 6 hours ago 966MB
hyperledger/fabric-peer latest 3ea035438fc2 2 days ago 987MB
hyperledger/fabric-tools latest 3ea035438fc2 2 days ago 987MB
yeasy/hyperledger-fabric-peer latest 3ea035438fc2 2 days ago 987MB
yeasy/hyperledger-fabric-orderer latest 8504e81ca419 2 days ago 976MB
hyperledger/fabric-orderer latest 8504e81ca419 2 days ago 976MB
hyperledger/fabric-baseimage x86_64-0.3.1 0ccecf9a0663 2 days ago 951MB
hyperledger/fabric-baseos x86_64-0.3.1 0ccecf9a0663 2 days ago 951MB
hyperledger/fabric-baseos x86_64-1.0.0 0ccecf9a0663 2 days ago 951MB
hyperledger/fabric-ccenv x86_64-1.0.0-preview 0ccecf9a0663 2 days ago 951MB
hyperledger/fabric-ccenv x86_64-1.0.0-rc1 0ccecf9a0663 2 days ago 951MB
yeasy/hyperledger-fabric-base latest 0ccecf9a0663 2 days ago 951MB
hyperledger/fabric-ca latest 4dde1946860e 3 days ago 845MB
yeasy/hyperledger-fabric-ca latest 4dde1946860e 3 days ago 845MB
hyperledger/fabric-kafka latest dbb5796d915f 13 days ago 1.3GB
hyperledger/fabric-kafka x86_64-1.0.0-rc1 dbb5796d915f 13 days ago 1.3GB
hyperledger/fabric-zookeeper latest d2efbb01a999 13 days ago 1.31GB
hyperledger/fabric-zookeeper x86_64-1.0.0-rc1 d2efbb01a999 13 days ago 1.31GB
hyperledger/fabric-couchdb x86_64-1.0.0-beta 31bbbec3d853 4 weeks ago 1.48GB
How to repeat the problem?
Detailed steps to repeat the problem.
1 the images is newest :
https://hub.docker.com/r/yeasy/hyperledger-fabric-peer/
2
https://github.com/yeasy/docker-compose-files/tree/master/hyperledger/1.0
docker-compose -f docker-compose-2orgs-4peers.yaml up
the error is occur:
`orderer.example.com | 2017-07-07 11:59:53.171 UTC [cauthdsl] func1 -> DEBU 225 0xc42000e008 gate 1499428793170656297 evaluation succeeds
orderer.example.com | 2017-07-07 11:59:53.171 UTC [orderer/common/sigfilter] Apply -> DEBU 226 Forwarding validly signed message for policy &{%!s(*common.ImplicitMetaPolicy=&{Readers 0}) %!s(int=1) [%!s(*policies.implicitMetaPolicy=&{0xc42029efa0 1 [0xc4201a83c0]}) %!s(*policies.implicitMetaPolicy=&{0xc42029f680 1 [0xc4201a84f0 0xc4201a8428]})]}
orderer.example.com | 2017-07-07 11:59:53.171 UTC [orderer/common/deliver] Handle -> DEBU 227 [channel: businesschannel] Received seekInfo (0xc420373140) start:<specified:<number:3 > > stop:<specified:<number:18446744073709551615 > >
peer1.org1.example.com | 2017-07-07 11:59:53.175 UTC [deliveryClient] StopDeliverForChannel -> DEBU 333 This peer will stop pass blocks from orderer service to other peers
peer1.org1.example.com | 2017-07-07 11:59:53.175 UTC [blocksProvider] DeliverBlocks -> WARN 334 [businesschannel] Receive error: Client is closing
3 but docker containers is up :
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0797987ed204 dev-peer0.org1.example.com-mycc-1.0 "chaincode -peer.a..." 6 hours ago Created dev-peer0.org1.example.com-mycc-1.0
93f7d390ff39 hyperledger/fabric-tools "bash -c 'while tr..." 6 hours ago Up 47 seconds 7051/tcp fabric-cli
13126d489428 hyperledger/fabric-peer "peer node start" 6 hours ago Up 48 seconds 7050/tcp, 7054-7059/tcp, 0.0.0.0:7051-7053->7051-7053/tcp peer0.org1.example.com
cf901b3bd8f1 hyperledger/fabric-peer "peer node start" 6 hours ago Up 49 seconds 7050/tcp, 7054-7059/tcp, 0.0.0.0:10051->7051/tcp, 0.0.0.0:10052->7052/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com
828caf0c6427 hyperledger/fabric-ca "fabric-ca-server ..." 6 hours ago Up 48 seconds 0.0.0.0:7054->7054/tcp fabric-ca
1e2a561dd563 hyperledger/fabric-peer "peer node start" 6 hours ago Up 49 seconds 7050/tcp, 7054-7059/tcp, 0.0.0.0:8051->7051/tcp, 0.0.0.0:8052->7052/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com
5d950897ad45 hyperledger/fabric-orderer "orderer start" 6 hours ago Up 48 seconds 0.0.0.0:7050->7050/tcp orderer.example.com
7802ef83abad hyperledger/fabric-peer "peer node start" 6 hours ago Up 49 seconds 7050/tcp, 7054-7059/tcp, 0.0.0.0:9051->7051/tcp, 0.0.0.0:9052->7052/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com
4
docker exec -it fabric-cli bash
peer chaincode install -v 1.0 -n test_cc -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02
2017-07-07 12:47:53.235 UTC [chaincodeCmd] install -> DEBU 00d Installed remotely response:<status:200 payload:"OK" > `
but the next action will occur error:
peer chaincode instantiate -v 1.0 -n test_cc -c '{"Args":["init","a","100","b","200"]}' -o orderer0:7050 2017-07-07 12:48:29.439 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP 2017-07-07 12:48:29.440 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity 2017-07-07 12:48:29.490 UTC [grpc] Printf -> DEBU 003 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup orderer0 on 127.0.0.11:53: no such host"; Reconnecting to {orderer0:7050 <nil>} 2017-07-07 12:48:30.464 UTC [grpc] Printf -> DEBU 004 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup orderer0 on 127.0.0.11:53: no such host"; Reconnecting to {orderer0:7050 <nil>} 2017-07-07 12:48:32.013 UTC [grpc] Printf -> DEBU 005 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: lookup orderer0 on 127.0.0.11:53: no such host"; Reconnecting to {orderer0:7050 <nil>} Error: Error getting broadcast client: Error connecting to orderer0:7050 due to context deadline exceeded
What solutions have u tried?
Potential solutions you have tried, e.g., search Google or restart the computer.
i dont know why,all is the newest,and i do @yeasy @ @qiang0723
Other Information
Other information u think can help to fix the problem.
-
check the images refer download_images.sh.
I see your old and new versions mixed together,All the images and docker-compose-file use the latest, and it didn't support backward version.
for example
"""
hyperledger/fabric-ccenv x86_64-1.0.0-preview 0ccecf9a0663 2 days ago 951MB
hyperledger/fabric-ccenv x86_64-1.0.0-rc1 0ccecf9a0663 2 days ago 951MB
"""
the second is correct. -
the command
peer chaincode instantiate -o orderer0:7050
, it should be-o orderer.example.com
, this part refer./scripts/initialize.sh
thanks for you reply.
I have remove all the images,and use scripts/download_images.sh downloading the images.
i modified the ./script/download_images.sh
the section of newest shell is :
`
ARCH=x86_64
BASEIMAGE_RELEASE=0.3.1
BASE_VERSION=1.0.0
PROJECT_VERSION=1.0.0-rc1
### IMG_VERSION=latest # v1.0.0-rc1 --->latest w11516
docker pull yeasy/hyperledger-fabric-base:$IMG_VERSION
&& docker pull yeasy/hyperledger-fabric-peer:$IMG_VERSION
&& docker pull yeasy/hyperledger-fabric-orderer:$IMG_VERSION
&& docker pull yeasy/hyperledger-fabric-ca:$IMG_VERSION
&& docker pull hyperledger/fabric-couchdb:$ARCH-1.0.0-beta
&& docker pull hyperledger/fabric-kafka:$ARCH-$PROJECT_VERSION
&& docker pull hyperledger/fabric-zookeeper:$ARCH-$PROJECT_VERSION
the images is :
[root@greenvm-w11516v1 1.0]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hyperledger/fabric-peer latest 3ea035438fc2 2 days ago 987MB
hyperledger/fabric-tools latest 3ea035438fc2 2 days ago 987MB
yeasy/hyperledger-fabric-peer latest 3ea035438fc2 2 days ago 987MB
hyperledger/fabric-orderer latest 8504e81ca419 2 days ago 976MB
yeasy/hyperledger-fabric-orderer latest 8504e81ca419 2 days ago 976MB
hyperledger/fabric-baseimage x86_64-0.3.1 0ccecf9a0663 2 days ago 951MB
hyperledger/fabric-baseos x86_64-0.3.1 0ccecf9a0663 2 days ago 951MB
hyperledger/fabric-ccenv x86_64-1.0.0-rc1 0ccecf9a0663 2 days ago 951MB
yeasy/hyperledger-fabric-base latest 0ccecf9a0663 2 days ago 951MB
hyperledger/fabric-ca latest 4dde1946860e 3 days ago 845MB
yeasy/hyperledger-fabric-ca latest 4dde1946860e 3 days ago 845MB
hyperledger/fabric-kafka latest dbb5796d915f 13 days ago 1.3GB
hyperledger/fabric-kafka x86_64-1.0.0-rc1 dbb5796d915f 13 days ago 1.3GB
hyperledger/fabric-zookeeper latest d2efbb01a999 13 days ago 1.31GB
hyperledger/fabric-zookeeper x86_64-1.0.0-rc1 d2efbb01a999 13 days ago 1.31GB
hyperledger/fabric-couchdb x86_64-1.0.0-beta 31bbbec3d853 4 weeks ago 1.48GB
containers is :
[root@greenvm-w11516v1 1.0]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
382e7445de63 hyperledger/fabric-tools "bash -c 'while tr..." 35 minutes ago Up 35 minutes 7051/tcp fabric-cli
69c327db02d0 hyperledger/fabric-peer "peer node start" 35 minutes ago Up 35 minutes 7050/tcp, 7054-7059/tcp, 0.0.0.0:9051->7051/tcp, 0.0.0.0:9052->7052/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com
3295f1191cb1 hyperledger/fabric-peer "peer node start" 35 minutes ago Up 35 minutes 7050/tcp, 7054-7059/tcp, 0.0.0.0:8051->7051/tcp, 0.0.0.0:8052->7052/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com
3a129ddedbc2 hyperledger/fabric-peer "peer node start" 35 minutes ago Up 35 minutes 7050/tcp, 7054-7059/tcp, 0.0.0.0:10051->7051/tcp, 0.0.0.0:10052->7052/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com
6c0f5ea6b049 hyperledger/fabric-ca "fabric-ca-server ..." 35 minutes ago Up 35 minutes 0.0.0.0:7054->7054/tcp fabric-ca
e3f16dfac1db hyperledger/fabric-orderer "orderer start" 35 minutes ago Up 35 minutes 0.0.0.0:7050->7050/tcp orderer.example.com
9a957e63f1b9 hyperledger/fabric-peer "peer node start" 35 minutes ago Up 35 minutes 7050/tcp, 7054-7059/tcp, 0.0.0.0:7051-7053->7051-7053/tcp peer0.org1.example.com
`
`
[root@greenvm-w11516v1 1.0]# docker exec -it fabric-cli bash
root@fabric-cli:/go/src/github.com/hyperledger/fabric/peer# bash scripts/initialize.sh
it occurred Error:`
`Instantiating chaincode on peer0/org1...
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key
CORE_PEER_LOCALMSPID=Org1MSP
CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt
CORE_PEER_TLS_ENABLED=false
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
CORE_PEER_ID=fabric-cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
2017-07-07 13:07:33.944 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2017-07-07 13:07:33.944 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2017-07-07 13:07:33.945 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2017-07-07 13:07:33.945 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2017-07-07 13:07:33.946 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A9B070A6D08031A0C08958FFECA0510...324D53500A04657363630A0476736363
2017-07-07 13:07:33.946 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: 85D1D7B6077FE4F6F34785C7CE822335CAD0B597EF58758A3DF3DF615142F9CD
Error: Error endorsing chaincode: rpc error: code = Unknown desc = Error starting container: API error (500): {"message":"oci runtime error: container_linux.go:262: starting container process caused "process_linux.go:339: container init caused \"\""\n"}
`
2
the command peer chaincode instantiate -o orderer0:7050, it should be -o orderer.example.com , this part refer ./scripts/initialize.sh
Where is the command?
Pls follow the doc to use the docker-compose-2orgs-4peers.yaml to bootup.
@lanshanwanghao If the above method doesn't work, then don't use latest images first, it maybe needs some modifications.
thanks for you reply.
i download the files from:
https://github.com/yeasy/docker-compose-files/tree/master/hyperledger/1.0
and i modified the ./scripts/download_images.sh:
v1.0.0-rc1 --->latest
the steps are:
1 bash ./scripts/download_images.sh
2 docker-compose -f docker-compose-2orgs-4peers.yaml up -d
3 bash ./scripts/initialize.sh
# should i need remove all the images,and dont modify the ./scripts/download_images.sh ?
@qiang0723 @yeasy
hi,both
i removed all the images ,and use ./scripts/download_images.sh without modify.
@lanshanwanghao
From the log "recreating ...."
I think you may be forgotten clean containers.
@qiang0723
thanks .
i removed the images without stop containers.
i am cleaning the containers.
i will use the ./scripts/download_images.sh without modify for testing.
thanks
@qiang0723
you say clean containers, but i do not know how to clean containers,please tell me ,thank you