centos7.4 hyperLedger fabric 1.3.0 first 네트워크 실행
docker rm $(docker ps -aq)
docker rmi $(docker images -q)
웹 사이트의 예에 따라 실행됩니다. 다음은 대응하는 이미지와 실행하는 docker입니다.
[root@bc1 fabric-test]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
dev-peer0.org2.example.com-mycc-1.0-15b571b3ce849066b7ec74497da3b27e54e0df1345daff3951b94245ce09c42b latest b75ace954a86 29 seconds ago 141MB
dev-peer0.org1.example.com-mycc-1.0-384f11f484b9302df90b453200cfb25174305fce8f53f4e94d45ee3b6cab0ce9 latest 376f30e564c9 31 minutes ago 141MB
hyperledger/fabric-tools latest 0a44f4261a55 11 days ago 1.56GB
hyperledger/fabric-ccenv latest 5b31d55f5f3a 11 days ago 1.43GB
hyperledger/fabric-orderer latest 54f372205580 11 days ago 150MB
hyperledger/fabric-peer latest 304fac59b501 11 days ago 157MB
hyperledger/fabric-baseos amd64-0.4.14 75f5fb1a0e0c 3 months ago 124MB
[root@bc1 fabric-test]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9bc320cc7b14 dev-peer0.org1.example.com-mycc-1.0-384f11f484b9302df90b453200cfb25174305fce8f53f4e94d45ee3b6cab0ce9 "chaincode -peer.add…" 18 minutes ago Up 18 minutes dev-peer0.org1.example.com-mycc-1.0
a4207513da31 hyperledger/fabric-tools:latest "/bin/bash" 20 minutes ago Up 20 minutes cli
22aba3071203 hyperledger/fabric-peer:latest "peer node start" 20 minutes ago Up 20 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com
77c763edc48c hyperledger/fabric-peer:latest "peer node start" 20 minutes ago Up 20 minutes 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com
0704d6a22573 hyperledger/fabric-orderer:latest "orderer" 20 minutes ago Up 20 minutes 0.0.0.0:7050->7050/tcp orderer.example.com
252d050a8294 hyperledger/fabric-peer:latest "peer node start" 20 minutes ago Up 20 minutes 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com
ba81600b3a8c hyperledger/fabric-peer:latest "peer node start" 20 minutes ago Up 20 minutes 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com
또한 org1에 chaincode를 설치해야 할 뿐만 아니라 org2에도 설치해야 한다.체인 코드 정의 org1과 org2 두 조직이 모두 책을 외워야 제출할 수 있기 때문에, 그렇지 않으면 다음과 같은 오류를 보고할 수 있습니다
root@a4207513da31:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode invoke -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n mycc --peerAddresses peer0.org1.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses peer0.org2.example.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"Args":["invoke","a","b","10"]}'
2019-01-21 07:55:05.156 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
2019-01-21 07:55:05.170 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
Error: could not assemble transaction: ProposalResponsePayloads do not match - proposal response: version:1 response:<status:200 > payload:"
\271d\360n\277\200S\302\004\363\250yVF\336F!Ul\3712\324\334\035\036\025
\264\376\272\265\374\022Y
E\022\024
\004lscc\022\014
\004mycc\022\002\010\003\022-
\004mycc\022%
\007
\001a\022\002\010\003
\007
\001b\022\002\010\003\032\007
\001a\032\00290\032\010
\001b\032\003210\032\003\010\310\001\"\013\022\004mycc\032\0031.0" endorsement:<endorser:"
\007Org1MSP\022\246\006-----BEGIN CERTIFICATE-----
MIICJzCCAc6gAwIBAgIQW+yQgjWIwerZW4MHTBJ0dzAKBggqhkjOPQQDAjBzMQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu
b3JnMS5leGFtcGxlLmNvbTAeFw0xOTAxMjEwNzQ0MDBaFw0yOTAxMTgwNzQ0MDBa
MGoxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T
YW4gRnJhbmNpc2NvMQ0wCwYDVQQLEwRwZWVyMR8wHQYDVQQDExZwZWVyMC5vcmcx
LmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEVtuxUYYKZGCk
E7n+mVb7Ct3GZCFl1fmbqk00EemcK1mwsk5EXoo7n7oS2tiQdA5w7oN4Ltevob2F
rnznZSAKZ6NNMEswDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0j
BCQwIoAgeaYMCJ/gSTQb2RJs4QN/4tu54DVGkN4aim0M/S9hWSEwCgYIKoZIzj0E
AwIDRwAwRAIgfmcjYEd+axTlV7QGNO1w6D1f+8mLMtdTR+iFD2H3fSoCIGsRBTYq
TFxmSCoU5ntYJQkmWS1AITt1M6QKtwCYU9oI
-----END CERTIFICATE-----
" signature:"0E\002!\000\216hT.\002\216\301\004r\377\302\206\235\343jz\215\255\302\333\263\003]\006s:\330\213\303@\276\245\002 \032\223R\302\240\303\311)fv`1\242\037?\300:\320DS= >
cli의 bash 창에서 다음 명령을 실행하면 다시 invoke가 정상입니다.
CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/[email protected]/msp CORE_PEER_ADDRESS=peer0.org2.example.com:7051 CORE_PEER_LOCALMSPID="Org2MSP" CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt peer chaincode install -n mycc -v 1.0 -p github.com/chaincode/chaincode_example02/go/
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
WSL과 함께 Windows 11에서 Hyperledger Fabric 테스트 네트워크 사용Windows 11을 실행하는 노트북에서 Hyperledger Fabric Test Network를 시작하려고 시도할 것입니다. 자세한 정보 를 찾을 수 있습니다. 전제 조건을 관리하십시오. 에서 Docker 설치 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.