Hyperledger Fabric: Add Orderer in running raft network - hyperledger-fabric
I want to add a new orderer node in a running hyperledger-fabric network. I've used etcdraft as consensus between the orderers.
I've followed step by step process of this accepted answer. In step #15, it is mentioned that, I've to fetch the latest config block from the system channel and use this block as genesis block of the new ordering service.
So, I've copied the config block to the channel-artifacts folder [file name: config_block.pb] and then spin up a new container using a docker-compose.yaml file. As a reference I am posting the docker-compose.yaml file here:
version: '2'
volumes:
orderer6.example.com:
networks:
byfn:
services:
orderer6.example.com:
image: hyperledger/fabric-orderer:latest
environment:
- FABRIC_LOGGING_SPEC=INFO
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
# enabled TLS
- ORDERER_GENERAL_TLS_ENABLED=true
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
- ORDERER_KAFKA_TOPIC_REPLICATIONFACTOR=1
- ORDERER_KAFKA_VERBOSE=true
- ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt
- ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key
- ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
working_dir: /opt/gopath/src/github.com/hyperledger/fabric
command: orderer
container_name: orderer6.example.com
networks:
- byfn
volumes:
- ./channel-artifacts/config_block.pb:/var/hyperledger/orderer/orderer.genesis.block
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer6.example.com/msp:/var/hyperledger/orderer/msp
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer6.example.com/tls/:/var/hyperledger/orderer/tls
- orderer6.example.com:/var/hyperledger/production/orderer
ports:
- 13050:7050
Finally, I'm running the orderer service using:
docker-compose -f orderer6.yaml up
The container starts and after a few seconds it crashes. Log file of the container shows:
orderer6.example.com | 2020-01-07 09:03:12.363 UTC [orderer.common.cluster.replication] obtainStream -> INFO 03f Sending request for block [2] to orderer.example.com:7050
orderer6.example.com | 2020-01-07 09:03:12.365 UTC [orderer.common.cluster.replication] pullBlocks -> INFO 040 Got block [2] of size 47 KB from orderer.example.com:7050
orderer6.example.com | 2020-01-07 09:03:12.377 UTC [orderer.common.cluster] appendBlock -> PANI 041 Failed to write block [2]: unexpected Previous block hash. Expected PreviousHash = [1c99accab83de7a415061120831519badf4807c97a0195ab5f42bab979a7dc09], PreviousHash referred in the latest block= [37f11444fb0b1ca51419b5f1a95fab616d5179ed44a87716677f1b706c0b1854]
orderer6.example.com | panic: Failed to write block [2]: unexpected Previous block hash. Expected PreviousHash = [1c99accab83de7a415061120831519badf4807c97a0195ab5f42bab979a7dc09], PreviousHash referred in the latest block= [37f11444fb0b1ca51419b5f1a95fab616d5179ed44a87716677f1b706c0b1854]
orderer6.example.com |
orderer6.example.com | goroutine 1 [running]:
orderer6.example.com | github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc00014db80, 0x0, 0x0, 0x0)
orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x546
orderer6.example.com | github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc000010a58, 0xc00004ae04, 0x1548ed8, 0x1e, 0xc00030b458, 0x2, 0x2, 0x0, 0x0, 0x0)
orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0x101
orderer6.example.com | github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(...)
orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159
orderer6.example.com | github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panicf(...)
orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:74
orderer6.example.com | github.com/hyperledger/fabric/orderer/common/cluster.(*Replicator).appendBlock(0xc000089bc0, 0xc0002e4a80, 0x16b8760, 0xc00068d0e0, 0xc000571f60, 0x10)
orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/cluster/replication.go:253 +0x283
orderer6.example.com | github.com/hyperledger/fabric/orderer/common/cluster.(*Replicator).pullChannelBlocks(0xc000089bc0, 0xc000571f60, 0x10, 0xc00053e2a0, 0x3, 0x16b8760, 0xc00068d0e0, 0x0, 0x0)
orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/cluster/replication.go:221 +0xd8
orderer6.example.com | github.com/hyperledger/fabric/orderer/common/cluster.(*Replicator).PullChannel(0xc000089bc0, 0xc000571f60, 0x10, 0x0, 0x0)
orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/cluster/replication.go:207 +0x411
orderer6.example.com | github.com/hyperledger/fabric/orderer/common/cluster.(*Replicator).ReplicateChains(0xc000089bc0, 0xc00030ba88, 0x1, 0x1)
orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/cluster/replication.go:163 +0x3ed
orderer6.example.com | github.com/hyperledger/fabric/orderer/common/server.(*replicationInitiator).replicateNeededChannels(0xc000214180, 0xc00011ce00)
orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/onboarding.go:102 +0x19a
orderer6.example.com | github.com/hyperledger/fabric/orderer/common/server.(*replicationInitiator).replicateIfNeeded(0xc000214180, 0xc00011ce00)
orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/onboarding.go:48 +0x9a
orderer6.example.com | github.com/hyperledger/fabric/orderer/common/server.Start(0x15309fe, 0x5, 0xc000394900)
orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:124 +0x11c8
orderer6.example.com | github.com/hyperledger/fabric/orderer/common/server.Main()
orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/common/server/main.go:91 +0x208
orderer6.example.com | main.main()
orderer6.example.com | /opt/gopath/src/github.com/hyperledger/fabric/orderer/main.go:15 +0x20
orderer6.example.com exited with code 2
Details log of the orderer is in here.
What's the problem in my approach? I've used byfn network as my test bed by running:
./byfn up -o etcdraft
There is an issue with respect to the volumes being mount to the new orderer container. It is using an existing volume for the new orderer, because probably you kept pulling down the "byfn.sh" script and just used it again to up the network.
Go to the docker-compose file which is used to bring up the new orderer node. Check the volumes section at the top of the file as well as within the container definition where it is actually mounted:
volumes:
orderer6.example.com:
and
- orderer6.example.com:/var/hyperledger/production/orderer.
Change the name of the volume being created and mounted to completely new name. Every step mentioned in the official documentation just works fine thereafter.
Related
3DES vulnerability for 5061 port
How can I solve "64-bit block cipher 3DES vulnerable to SWEET32 attack" and "Key exchange (dh 1024) of lower strength than certificate key" problems for 5061 port on centOS7? PORT STATE SERVICE 5061/tcp open sip-tls | ssl-enum-ciphers: | TLSv1.2: | ciphers: | TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA (dh 1024) - D | TLS_DHE_RSA_WITH_AES_128_CBC_SHA (dh 1024) - A | TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 (dh 1024) - A | TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (dh 1024) - A | TLS_DHE_RSA_WITH_AES_256_CBC_SHA (dh 1024) - A | TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 (dh 1024) - A | TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 (dh 1024) - A | TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA (secp256r1) - C | TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (secp256r1) - A | TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (secp256r1) - A | TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (secp256r1) - A | TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (secp256r1) - A | TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 (secp256r1) - A | TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (secp256r1) - A | TLS_RSA_WITH_3DES_EDE_CBC_SHA (rsa 2048) - C | TLS_RSA_WITH_AES_128_CBC_SHA (rsa 2048) - A | TLS_RSA_WITH_AES_128_CBC_SHA256 (rsa 2048) - A | TLS_RSA_WITH_AES_128_GCM_SHA256 (rsa 2048) - A | TLS_RSA_WITH_AES_256_CBC_SHA (rsa 2048) - A | TLS_RSA_WITH_AES_256_CBC_SHA256 (rsa 2048) - A | TLS_RSA_WITH_AES_256_GCM_SHA384 (rsa 2048) - A | compressors: | NULL | cipher preference: client | warnings: | 64-bit block cipher 3DES vulnerable to SWEET32 attack | Key exchange (dh 1024) of lower strength than certificate key |_ least strength: D
I guess you are asking a question as an administrator of a sip service. You should offer a different cipher suite and configure it based on your security requirements. This is an example of cipher suite for a pretty strong service: cipher_list = HIGH:!COMPLEMENTOFDEFAULT:!kRSA:!PSK:!SRP If you wish to keep your current cipher suite and just remove 3DES, you can do so by only disabling 3DES cipher_list = YOURCURRENTCIPHERSUITE:!3DES Example above, of course, are showing typical configuration when openssl is used. You need to adapt them if you are using another system. You should also have some way to set a DH PARAMETER in your configuration and you need to configure it to a higher number of bits. For example: $> openssl dhparam -out dhparam.pem 3072 The result would be this one: PORT STATE SERVICE 5061/tcp open sip-tls | ssl-enum-ciphers: | TLSv1.2: | ciphers: | TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (secp256r1) - A | TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 (dh 3072) - A | TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (secp256r1) - A | TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (dh 3072) - A | TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (secp256r1) - A | TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (dh 3072) - A | TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 (secp256r1) - A | TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 (dh 3072) - A | TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (secp256r1) - A | TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 (dh 3072) - A | TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (secp256r1) - A | TLS_DHE_RSA_WITH_AES_256_CBC_SHA (dh 3072) - A | TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (secp256r1) - A | TLS_DHE_RSA_WITH_AES_128_CBC_SHA (dh 3072) - A | compressors: | NULL | cipher preference: server |_ least strength: A
Hyperledger Fabric - Block Inspecting Error
I want to receive a correct block extract containing transaction for a typical invoke transaction (non config transaction). docker exec peer0.org1.example.com peer channel fetch 4 -c mychannel docker cp peer0.org1.example.com:/opt/gopath/src/github.com/hyperledger/fabric/peer/mychannel_4.block . configtxgen -inspectBlock mychannel_4.block > mychannel4.json This makes it possible to receive a full pb2json decode for the fabric-samples like "first-network". But it doesn't work for the "fabcar" sample. Normally this should work too, right? Any Ideas why and how to fix it? ../../bin/configtxgen -inspectBlock mychannel_3.block block3.json 2020-06-07 02:05:54.210 PDT [common.tools.configtxgen] main -> INFO 001 Loading configuration 2020-06-07 02:05:54.210 PDT [common.tools.configtxgen.localconfig] LoadTopLevel -> PANI 002 Error reading configuration: Unsupported Config Type "" 2020-06-07 02:05:54.210 PDT [common.tools.configtxgen] func1 -> PANI 003 Error reading configuration: Unsupported Config Type "" panic: Error reading configuration: Unsupported Config Type "" [recovered] panic: Error reading configuration: Unsupported Config Type "" goroutine 1 [running]: github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc0000c5ce0, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x546 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc000010230, 0x4, 0xc0000416c0, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0x101 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(...) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panic(0xc000010238, 0xc0002799e0, 0x1, 0x1) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0x9a main.main.func1() /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:260 +0x178 panic(0xde3fc0, 0xc000250a40) /w/workspace/fabric-release-jobs-x86_64/golang/go/src/runtime/panic.go:522 +0x1b5 github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc0000c5ce0, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x546 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc000010210, 0x4, 0xc0000415c0, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0x101 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(...) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panic(0xc000010218, 0xc000279df8, 0x2, 0x2) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/flogging/zap.go:73 +0x9a github.com/hyperledger/fabric/common/tools/configtxgen/localconfig.LoadTopLevel(0x0, 0x0, 0x0, 0x1) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/localconfig/config.go:234 +0x3fe main.main() /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/common/tools/configtxgen/main.go:278 +0xfb5
You can make use of configtxlator tool to decode the block as a whole. configtxlator proto_decode --type=common.Block --input=<your_block.pb> --output=<your_block.json>
Hyperledger 1.4.6: Node.js chaincode instantiate fails with 1 "cp: cannot stat '/chaincode/input/src/.': No such file or directory
I'm trying to instantiate the code using fabric-tools. The peer runs on Container Optimized OS in Google Cloud. Install works (sorry maybe some parameters are not necessary): docker exec -e \"CORE_PEER_LOCALMSPID=${ORGANIZATION^}MSP\" ^ -e \"CORE_PEER_MSPCONFIGPATH=/home/crypto/peerOrganizations/${ORGANIZATION}/users/Admin#${ORGANIZATION}/msp\" ^ -e \"CORE_PEER_TLS_CERT_FILE=/home/crypto/peerOrganizations/${ORGANIZATION}/peers/${PEER_NAME}.${ORGANIZATION}/tls/server.crt\" ^ -e \"CORE_PEER_TLS_KEY_FILE=/home/crypto/peerOrganizations/${ORGANIZATION}/peers/${PEER_NAME}.${ORGANIZATION}/tls/server.key\" ^ -e \"CORE_PEER_TLS_ROOTCERT_FILE=/home/crypto/peerOrganizations/${ORGANIZATION}/peers/${PEER_NAME}.${ORGANIZATION}/tls/ca.crt\" ^ -e \"CORE_PEER_ADDRESS=${PEER_NAME}:7051\" ^ -e \"CORE_PEER_CHAINCODEADDRESS=${PEER_NAME}:7052\" ^ $CLI peer chaincode install -n my-blockchain -v 0.0.3 -p //home//github.com//my-blockchain -l node Instantiate fails: docker exec -e \"CORE_PEER_LOCALMSPID=${ORGANIZATION^}MSP\" ^ -e \"CORE_PEER_MSPCONFIGPATH=/home/crypto/peerOrganizations/${ORGANIZATION}/users/Admin#${ORGANIZATION}/msp\" ^ -e \"CORE_PEER_TLS_CERT_FILE=/home/crypto/peerOrganizations/${ORGANIZATION}/peers/${PEER_NAME}.${ORGANIZATION}/tls/server.crt\" ^ -e \"CORE_PEER_TLS_KEY_FILE=/home/crypto/peerOrganizations/${ORGANIZATION}/peers/${PEER_NAME}.${ORGANIZATION}/tls/server.key\" ^ -e \"CORE_PEER_TLS_ROOTCERT_FILE=/home/crypto/peerOrganizations/${ORGANIZATION}/peers/${PEER_NAME}.${ORGANIZATION}/tls/ca.crt\" ^ -e \"CORE_PEER_ADDRESS=${PEER_NAME}:7051\" ^ -e \"CORE_PEER_CHAINCODEADDRESS=${PEER_NAME}:7052\" ^ $CLI peer chaincode instantiate -o orderer1:7050 -C my-channel -n my-blockchain ^ -l node -v 0.0.3 -c \"{\\\"Args\\\":[]}\" ^ -P \"OR ('Org1MSP.member')\" ^ --tls --cafile $TLS_CERT --keyfile $KEY_FILE --cafile $ORDERER_TLS_CERT -o orderer1:7050 with 2020-03-19 22:09:03.562 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2020-03-19 22:09:03.562 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "cp: cannot stat '/chaincode/input/src/.': No such file or directory My CLI docker-compose file looks like that (/var/run stuff looks strange because I tried to make it work on Google COS where parts of the system are immutable): version: '3' networks: my_net: services: cli-org1: hostname: cli-org1 image: hyperledger/fabric-tools:1.4 tty: true environment: - GOPATH=/opt/gopath - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - FABRIC_LOGGING_SPEC=info - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=hyperledger_my_net - CORE_PEER_ID=peer0 - CORE_PEER_TLS_ENABLED=true - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_ORGLEADER=false - CORE_PEER_PROFILE_ENABLED=true - CORE_PEER_MSPCONFIGPATH=/home/crypto/peerOrganizations/org1/users/Admin#org1/msp - CORE_PEER_LOCALMSPID=Org1MSP #peerOrganizations/org1/peers/peer0.org1/tls/server.crt - CORE_PEER_TLS_CERT_FILE=/home/crypto/peerOrganizations/org1/peers/peer0.org1/tls/server.crt - CORE_PEER_TLS_KEY_FILE=/home/crypto/peerOrganizations/org1/peers/peer0.org1/tls/server.key - CORE_PEER_TLS_ROOTCERT_FILE=/home/crypto/peerOrganizations/org1/peers/peer0.org1/tls/ca.crt - CORE_PEER_ADDRESS=peer0:7051 - CORE_PEER_CHAINCODEADDRESS=peer0:7052 - CORE_CHAINCODE_KEEPALIVE=10 working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer command: /bin/bash volumes: - ./var/cli_run/:/host/var/run/ - /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/host/run/var/docker.sock - ./chaincode/:/home/github.com/ - ./crypto-config:/home/crypto/ extra_hosts: - "orderer1:111.111.111.111" - "peer0:111.111.111.111" networks: my_net: aliases: - cli-org1 This is how orderer logs look like: 2020-03-19 21:57:50.723 UTC [orderer.common.server] replicateDisabledChains -> DEBU 87d No inactive chains to try to replicate 2020-03-19 22:02:50.724 UTC [orderer.common.server] replicateDisabledChains -> DEBU 87e No inactive chains to try to replicate 2020-03-19 22:07:50.724 UTC [orderer.common.server] replicateDisabledChains -> DEBU 87f No inactive chains to try to replicate 2020-03-19 22:12:50.724 UTC [orderer.common.server] replicateDisabledChains -> DEBU 880 No inactive chains to try to replicate 2020-03-19 22:16:00.250 UTC [orderer.common.server] Broadcast -> DEBU 881 Starting new Broadcast handler 2020-03-19 22:16:00.250 UTC [orderer.common.broadcast] Handle -> DEBU 882 Starting new broadcast loop for 178.4.35.173:52041 2020-03-19 22:16:01.131 UTC [orderer.common.broadcast] Handle -> WARN 883 Error reading from 178.4.35.173:52041: rpc error: code = Canceled desc = context canceled 2020-03-19 22:16:01.131 UTC [orderer.common.server] func1 -> DEBU 884 Closing Broadcast stream 2020-03-19 22:16:01.131 UTC [comm.grpc.server] 1 -> INFO 885 streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.peer_address=178.4.35.173:52041 error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=881.822921ms 2020-03-19 22:16:01.131 UTC [grpc] infof -> DEBU 886 transport: loopyWriter.run returning. connection error: desc = "transport is closing" 2020-03-19 22:17:50.724 UTC [orderer.common.server] replicateDisabledChains -> DEBU 887 No inactive chains to try to replicate 2020-03-19 22:19:26.918 UTC [orderer.common.server] Broadcast -> DEBU 888 Starting new Broadcast handler 2020-03-19 22:19:26.918 UTC [orderer.common.broadcast] Handle -> DEBU 889 Starting new broadcast loop for 178.4.35.173:52073 2020-03-19 22:19:27.780 UTC [grpc] infof -> DEBU 88a transport: loopyWriter.run returning. connection error: desc = "transport is closing" 2020-03-19 22:19:27.780 UTC [orderer.common.broadcast] Handle -> DEBU 88b Received EOF from 178.4.35.173:52073, hangup 2020-03-19 22:19:27.780 UTC [orderer.common.server] func1 -> DEBU 88c Closing Broadcast stream 2020-03-19 22:19:27.780 UTC [comm.grpc.server] 1 -> INFO 88d streaming call completed grpc.service=orderer.AtomicBroadcast grpc.method=Broadcast grpc.peer_address=178.4.35.173:52073 grpc.code=OK grpc.call_duration=861.76369ms What could be the problem? For example where is this folder /chaincode/input/src/. is missing? On a host system? But because the root directory is immutable I cannot create /chaincode there.
The problem is simple and has at this point almost nothing to do with Hyperledger. I work under Windows but use Git Bash to automate some processes. Docker under Windows doesn't work good with Git Bash. Earlier I was running the installation inside my script like this: COMMAND="docker exec -e \"CORE_PEER_LOCALMSPID=${ORGANIZATION^}MSP\" ^ -e \"CORE_PEER_MSPCONFIGPATH=/home/crypto/peerOrganizations/${ORGANIZATION}/users/Admin#${ORGANIZATION}/msp\" ^ -e \"CORE_PEER_TLS_CERT_FILE=/home/crypto/peerOrganizations/${ORGANIZATION}/peers/${PEER_NAME}.${ORGANIZATION}/tls/server.crt\" ^ -e \"CORE_PEER_TLS_KEY_FILE=/home/crypto/peerOrganizations/${ORGANIZATION}/peers/${PEER_NAME}.${ORGANIZATION}/tls/server.key\" ^ -e \"CORE_PEER_TLS_ROOTCERT_FILE=/home/crypto/peerOrganizations/${ORGANIZATION}/peers/${PEER_NAME}.${ORGANIZATION}/tls/ca.crt\" ^ -e \"CORE_PEER_ADDRESS=${PEER_NAME}:7051\" ^ -e \"CORE_PEER_CHAINCODEADDRESS=${PEER_NAME}:7052\" ^ $CLI peer chaincode install -n my-blockchain -v 0.0.3 -p //home//github.com//my-blockchain -l node" cmd //c $COMMAND Exactly this execution messed up "successful" chaincode installation. And made it impossible to instantiate the code later. I replaced // with / in //home//github.com//my-blockchain, saved the whole command to a file, and executed it as follows: echo "$COMMAND" > install.bat cmd "//c install.bat" After that everything works fine. However, since the installation had status 200, but no entries in CouchDB have been entered I find it a little bit incorrect.
./configtxgen mychannel.block > test3.json
./configtxgen mychannel.block > test3.json 2019-09-01 15:45:24.878 PKT [common/tools/configtxgen] main -> INFO 001 Loading configuration 2019-09-01 15:45:24.878 PKT [common/tools/configtxgen/localconfig] LoadTopLevel -> PANI 002 Error reading configuration: Unsupported Config Type "" 2019-09-01 15:45:24.878 PKT [common/tools/configtxgen] func1 -> PANI 003 Error reading configuration: Unsupported Config Type "" panic: Error reading configuration: Unsupported Config Type "" [recovered] panic: Error reading configuration: Unsupported Config Type "" goroutine 1 [running]: github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc42054e9a0, 0x0, 0x0, 0x0) /w/workspace/fabric-release-jobs-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go
Seems like you need mychannel.block as json format Follow the steps below in order to get the result One can decode this mychannel.block using protolator & configtxlator Commands: Step1: GOTO fabricsamples/bin ./configtxlator start Step2: GOTO mychannel.block file location then issue below command curl -X POST --data-binary #mychannel.block http://127.0.0.1:7059/protolator/decode/common.Block > mychannel.json I have done the same for sample genesis.block check this http://ideone.com/L1hcRX which contain genesis.block as json format which contain all network information.
Hyperledger Fabric Simples issue Run ./byfn.sh -m up failed
I want to build first-network of Hyperledger Fabric Samples I get the simple code from git then download the platform-specific binaries follow the guide http://hyperledger-fabric.readthedocs.io/en/v1.0.5/samples.html But when I run the command ./byfn.sh -m generate there are different output in my screen and when I run ./byfn.sh -m up , the error occurred Build your first network (BYFN) end-to-end test Channel name : mychannel Creating channel... 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_VM_ENDPOINT=unix:///host/var/run/docker.sock 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=true 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=cli CORE_LOGGING_LEVEL=INFO CORE_PEER_ADDRESS=peer0.org1.example.com:7051 + peer channel create -o orderer.example.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --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 + res=2 + set +x 2018-04-04 09:59:34.078 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized fatal error: unexpected signal during runtime execution [signal SIGSEGV: segmentation violation code=0x1 addr=0x63 pc=0x7fc6bfc34259] runtime stack: runtime.throw(0xf11259, 0x2a) /opt/go/src/runtime/panic.go:605 +0x95 runtime.sigpanic() /opt/go/src/runtime/signal_unix.go:351 +0x2b8 goroutine 25 [syscall, locked to thread]: runtime.cgocall(0xbf3800, 0xc420027de8, 0xf0fa21) /opt/go/src/runtime/cgocall.go:132 +0xe4 fp=0xc420027da8 sp=0xc420027d68 pc=0x4023b4 net._C2func_getaddrinfo(0x7fc6b00008c0, 0x0, 0xc42038a3c0, 0xc42000e838, 0x0, 0x0, 0x0) net/_obj/_cgo_gotypes.go:86 +0x5f fp=0xc420027de8 sp=0xc420027da8 pc=0x5f893f net.cgoLookupIPCNAME.func2(0x7fc6b00008c0, 0x0, 0xc42038a3c0, 0xc42000e838, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x13) /opt/go/src/net/cgo_unix.go:151 +0x13f fp=0xc420027e40 sp=0xc420027de8 pc=0x5ffedf net.cgoLookupIPCNAME(0x7ffe5b6e1a3a, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) /opt/go/src/net/cgo_unix.go:151 +0x175 fp=0xc420027f38 sp=0xc420027e40 pc=0x5fa195 net.cgoIPLookup(0xc420382360, 0x7ffe5b6e1a3a, 0x13) /opt/go/src/net/cgo_unix.go:203 +0x4d fp=0xc420027fc8 sp=0xc420027f38 pc=0x5fa8dd runtime.goexit() /opt/go/src/runtime/asm_amd64.s:2337 +0x1 fp=0xc420027fd0 sp=0xc420027fc8 pc=0x45e391 created by net.cgoLookupIP /opt/go/src/net/cgo_unix.go:213 +0xaf goroutine 1 [select]: github.com/hyperledger/fabric/vendor/google.golang.org/grpc.DialContext(0x7fc6bfe577e0, 0xc4203821e0, 0x7ffe5b6e1a3a, 0x18, 0xc420355780, 0x4, 0x4, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:422 +0x532 github.com/hyperledger/fabric/core/comm.(*grpcClient).NewConnection(0xc4203705f0, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/core/comm/client.go:217 +0x389 github.com/hyperledger/fabric/peer/common.(*OrdererClient).Broadcast(0xc42038a270, 0x0, 0x0, 0xc420153b10, 0xbc3839) /opt/gopath/src/github.com/hyperledger/fabric/peer/common/ordererclient.go:50 +0x6c github.com/hyperledger/fabric/peer/common.GetBroadcastClient(0x380, 0xc420184a00, 0x138, 0x138) /opt/gopath/src/github.com/hyperledger/fabric/peer/common/broadcastclient.go:41 +0x3e github.com/hyperledger/fabric/peer/channel.InitCmdFactory.func1(0xc420335680, 0xc420335e30, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/channel.go:136 +0x29 github.com/hyperledger/fabric/peer/channel.sendCreateChainTransaction(0xc420265360, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:164 +0xa7 github.com/hyperledger/fabric/peer/channel.executeCreate(0xc420265360, 0xc420265360, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:178 +0x2f github.com/hyperledger/fabric/peer/channel.create(0xc4201f7680, 0xc4201f5860, 0x1, 0xa, 0x0, 0xd5afc0, 0x16705c0) /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:213 +0x40 github.com/hyperledger/fabric/peer/channel.createCmd.func1(0xc4201f7680, 0xc4201f5860, 0x1, 0xa, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/peer/channel/create.go:59 +0x52 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0xc4201f7680, 0xc4201f5720, 0xa, 0xa, 0xc4201f7680, 0xc4201f5720) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:599 +0x3e8 github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x164d4e0, 0x11, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:689 +0x2fe github.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x164d4e0, 0x7d, 0xc420014035) /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:648 +0x2b main.main() /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:112 +0x5e1 goroutine 19 [runnable]: github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).keepalive(0xc420332340) /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1272 created by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:292 +0xdd2 goroutine 18 [runnable]: github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).controller(0xc420332340) /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1225 created by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:290 +0xd2e goroutine 10 [syscall]: os/signal.signal_recv(0x0) /opt/go/src/runtime/sigqueue.go:131 +0xa6 os/signal.loop() /opt/go/src/os/signal/signal_unix.go:22 +0x22 created by os/signal.init.0 /opt/go/src/os/signal/signal_unix.go:28 +0x41 goroutine 21 [runnable]: github.com/hyperledger/fabric/vendor/golang.org/x/net/trace.allocFamily(0xc42035a0c0, 0x19, 0x16c6c40) /opt/gopath/src/github.com/hyperledger/fabric/vendor/golang.org/x/net/trace/trace.go:514 created by github.com/hyperledger/fabric/vendor/golang.org/x/net/trace.New /opt/gopath/src/github.com/hyperledger/fabric/vendor/golang.org/x/net/trace/trace.go:359 +0x235 goroutine 16 [runnable]: github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.(*http2Client).reader(0xc420332340) /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:1137 created by github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:260 +0xbf8 goroutine 20 [runnable]: github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*addrConn).transportMonitor(0xc420120540) /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:990 created by github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*ClientConn).resetAddrConn /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:716 +0x67a goroutine 22 [runnable]: github.com/hyperledger/fabric/vendor/google.golang.org/grpc.newClientStream.func3(0x166c200, 0xc420332340, 0xc420120380, 0xc42024d600, 0xc4200ff800) /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/stream.go:254 created by github.com/hyperledger/fabric/vendor/google.golang.org/grpc.newClientStream /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/stream.go:254 +0xe23 goroutine 23 [select]: net.(*Resolver).LookupIPAddr(0x169d370, 0x1667b40, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0) /opt/go/src/net/lookup.go:196 +0x52b net.(*Resolver).internetAddrList(0x169d370, 0x1667b40, 0xc4203822a0, 0xee7636, 0x3, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0x0, ...) /opt/go/src/net/ipsock.go:293 +0x644 net.(*Resolver).resolveAddrList(0x169d370, 0x1667b40, 0xc4203822a0, 0xee7b40, 0x4, 0xee7636, 0x3, 0x7ffe5b6e1a3a, 0x18, 0x0, ...) /opt/go/src/net/dial.go:193 +0x594 net.(*Dialer).DialContext(0xc42004f458, 0x1667b40, 0xc4203822a0, 0xee7636, 0x3, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0x0, ...) /opt/go/src/net/dial.go:375 +0x248 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.dialContext(0x1667b40, 0xc4203822a0, 0xee7636, 0x3, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0xc4200ff900, 0xc420284e00) /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/go17.go:38 +0xb3 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.DialContext.func1(0x7fc6bfe577e0, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0x16571c0, 0xc420140c80) /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:329 +0x86 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.newProxyDialer.func1(0x7fc6bfe577e0, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0xc420334e10, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/proxy.go:121 +0x137 github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.dial(0x7fc6bfe577e0, 0xc4203822a0, 0xc42037f790, 0x7ffe5b6e1a3a, 0x18, 0xc42017f780, 0xc4203235c0, 0x7fc6bfe55d10, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:119 +0x5a github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.newHTTP2Client(0x7fc6bfe577e0, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0xeef4b1, 0xd, 0x0, 0x0, ...) /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/http2_client.go:157 +0xa7 github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport.NewClientTransport(0x7fc6bfe577e0, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0xeef4b1, 0xd, 0x0, 0x0, ...) /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/transport/transport.go:505 +0xae github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*addrConn).resetTransport(0xc420120a80, 0xc42038a200, 0xc420120aa0, 0xc42038e108) /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:929 +0x4b4 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*ClientConn).resetAddrConn(0xc4201208c0, 0x7ffe5b6e1a3a, 0x18, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0) /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:702 +0x340 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.DialContext.func3(0xc420382240, 0xc4201208c0, 0x1669a40, 0xc42000e828, 0x7ffe5b6e1a3a, 0x18) /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:417 +0x223 created by github.com/hyperledger/fabric/vendor/google.golang.org/grpc.DialContext /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/clientconn.go:386 +0x441 goroutine 24 [select]: net.cgoLookupIP(0x1667b40, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x13, 0xc4201cbc80, 0x0, 0x0, 0x0, 0x0, 0x0) /opt/go/src/net/cgo_unix.go:214 +0x1b0 net.(*Resolver).lookupIP(0x169d370, 0x1667b40, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0) /opt/go/src/net/lookup_unix.go:95 +0x12d net.(*Resolver).(net.lookupIP)-fm(0x1667b40, 0xc4203822a0, 0x7ffe5b6e1a3a, 0x13, 0x3, 0xc420340f00, 0xc420052080, 0x0, 0xc420020000) /opt/go/src/net/lookup.go:187 +0x56 net.glob..func10(0x1667b40, 0xc4203822a0, 0xc42037f7f0, 0x7ffe5b6e1a3a, 0x13, 0x42ad09, 0xc400000008, 0xc420052080, 0x0, 0x8db329) /opt/go/src/net/hook.go:19 +0x52 net.(*Resolver).LookupIPAddr.func1(0x18, 0x0, 0x0, 0x1) /opt/go/src/net/lookup.go:193 +0x5c internal/singleflight.(*Group).doCall(0x169d360, 0xc420370870, 0x7ffe5b6e1a3a, 0x13, 0xc42038a360) /opt/go/src/internal/singleflight/singleflight.go:93 +0x2e created by internal/singleflight.(*Group).DoChan /opt/go/src/internal/singleflight/singleflight.go:86 +0x31f !!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!! ========= ERROR !!! FAILED to execute End-2-End Scenario =========== ERROR !!!! Test failed Please help me to fix this problem thanks!
You should be able to resolve this by adding GODEBUG=netdns=go to the environment variables section of your the Docker Compose file(s). If you take a look at https://github.com/hyperledger/fabric-samples/blob/release-1.1/first-network/base/peer-base.yaml, you can modify the contents like this: version: '2' services: peer-base: image: hyperledger/fabric-peer:$IMAGE_TAG environment: - GODEBUG=netdns=go - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock # the following setting starts chaincode containers on the same # bridge network as the peers # https://docs.docker.com/compose/networking/ - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_byfn - CORE_LOGGING_LEVEL=INFO #- CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_TLS_ENABLED=true - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_ORGLEADER=false - CORE_PEER_PROFILE_ENABLED=true - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer command: peer node start The other possible solution is to add the dns_search property: version: '2' services: peer-base: image: hyperledger/fabric-peer:$IMAGE_TAG dns_search: . environment: - GODEBUG=netdns=go - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock # the following setting starts chaincode containers on the same # bridge network as the peers # https://docs.docker.com/compose/networking/ - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_byfn - CORE_LOGGING_LEVEL=INFO #- CORE_LOGGING_LEVEL=DEBUG - CORE_PEER_TLS_ENABLED=true - CORE_PEER_GOSSIP_USELEADERELECTION=true - CORE_PEER_GOSSIP_ORGLEADER=false - CORE_PEER_PROFILE_ENABLED=true - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer command: peer node start or try both as well
You seem to have mismatched the version of the samples and Hyperledger Fabric images and binaries (I noticed that the version of the output matches code added for v1.1.0). Before running the first-network sample (or any other) make sure that you checkout the corresponding version of the fabric-samples git repository for the docker images and binaries you downloaded. e.g. git clone https://github.com/hyperledger/fabric-samples.git git checkout v1.0.6 curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/v1.0.6/scripts/bootstrap.sh | bash -s 1.0.6 cd first-network ./byfn.sh -m generate ...
Its an issue of dns-go. Add this tag to the environment of peer container in docker-compose.yml. - GODEBUG=netdns=go