Welcome to the Linux Foundation Forum!

Lab 7: error getting endorser client for install: context deadline exceeded

Hi! Once I have added Org2 to the channel allarewelcome and confirmed Org2 is part of the channel (peer channel list), I try to install the chaincode also for org2 peer0. The chaincode was already installed on the channel earlier by peer0 org1, and by running docker ps -a I can se the container with the chaincode running "dev-peer1-ccForAll-1.1".
However, when I do try to install the chaincode on peer0Org2 I receive the following error:

Error: error getting endorser client for install: endorser client failed to connect to peer0.org2.example.com:7051: failed to create new connection: context deadline exceeded

Does anyone know what this could be? I already tried to use the ./teardown script and set up the network again, but same error appears. I also checked CORE_PEER_ADDRESS paths in docker-compose.yml and they all seem correct (see below). I am on Ubuntu 18.04.

Here are my commands & the docker-compose.yml:

root@3b26adcf352f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel update -f org2submitReady.pb -c allarewelcome -o orderer.example.com:7050

2019-07-23 11:18:39.920 UTC [channelCmd] update -> INFO 004 Successfully submitted channel update

root@3b26adcf352f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_LOCALMSPID="Org2MSP"

root@3b26adcf352f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp

root@3b26adcf352f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_ADDRESS=peer0.org2.example.com:7051

root@3b26adcf352f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel join -b allarewelcome.block

2019-07-23 11:23:07.186 UTC [channelCmd] executeJoin -> INFO 004 Successfully submitted proposal to join channel

root@3b26adcf352f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel list
Channels peers has joined:
allarewelcome

root@3b26adcf352f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode install -n ccForAll -v 1.1 -n networkChaincode -p github.com/sacc.go

Error: error getting endorser client for install: endorser client failed to connect to peer0.org2.example.com:7051: failed to create new connection: context deadline exceeded

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Here is the docker-compose.yml configs:

peer0.org1.example.com:
container_name: peer0.org1.example.com
image: hyperledger/fabric-peer
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer0.org1.example.com
- FABRIC_LOGGING_SPEC=info
- CORE_CHAINCODE_LOGGING_LEVEL=info
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=startfiles_basic

orderer.example.com:
container_name: orderer.example.com
image: hyperledger/fabric-orderer
environment:
- FABRIC_LOGGING_SPEC=info
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp/orderer/msp

peer0.org2.example.com:
container_name: peer0.org2.example.com
image: hyperledger/fabric-peer
environment:
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_PEER_ID=peer0.org2.example.com
- FABRIC_LOGGING_SPEC=info
- CORE_CHAINCODE_LOGGING_LEVEL=info
- CORE_PEER_LOCALMSPID=Org2MSP
- CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
- CORE_PEER_ADDRESS=peer0.org2.example.com:7051
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=startfiles_basic

cli:
container_name: cli
image: hyperledger/fabric-tools
tty: true
environment:
- GOPATH=/opt/gopath
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
- CORE_LOGGING_LEVEL=info
- CORE_PEER_ID=cli
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
- CORE_CHAINCODE_KEEPALIVE=10

And here is the chaincode container:

STATUS PORTS NAMES
8b8798bfe667 dev-peer0.org1.example.com-ccforall-1.1-e1305b5301c8053f4772fd79dd5c9fc0cd527fb5f04a190033b3870b0634b010 "chaincode -peer.add…" 19 seconds ago Up 17 seconds dev-peer0.org1.example.com-ccForAll-1.1

Comments

  • Niklaskkkk
    Niklaskkkk Posts: 113

    The same error appears if I try to create a new channel with peer0.org2, for instance OrgTwoChannel.tx (artifact is created).
    When I run the command I receive the same error:

    root@3b26adcf352f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_LOCALMSPID="Org2MSP"

    root@3b26adcf352f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp

    root@3b26adcf352f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_ADDRESS=peer0.org2.example.com:7051

    root@3b26adcf352f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel create -o orderer.example.com:7050 -f ./config/OrgTwoChannel.tx -c orgtwochannel

    2019-07-23 11:56:39.302 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized

    Error: got unexpected status: BAD_REQUEST -- Attempted to include a member which is not in the consortium

    root@3b26adcf352f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel list

    Error: error getting endorser client for channel: endorser client failed to connect to peer0.org2.example.com:7051: failed to create new connection: context deadline exceeded

    -----------------------------------------------------------------------------------------------------------------------------

    here is the profiles from configtx.yaml:

    OrgTwoChannel:
    Consortium: SampleConsortium
    Application:
    <<: *ApplicationDefaults
    Organizations:
    - *Org2

    OneOrgOrdererGenesis:
    Orderer:
    <<: *OrdererDefaults
    Organizations:
    - *OrdererOrg
    Consortiums:
    SampleConsortium:
    Organizations:
    - *Org1

    OneOrgChannel:
    Consortium: SampleConsortium
    Application:
    <<: *ApplicationDefaults
    Organizations:
    - *Org1

    Here is the docker ps -a network overview:

    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    8b8798bfe667 dev-peer0.org1.example.com-ccforall-1.1-e1305b5301c8053f4772fd79dd5c9fc0cd527fb5f04a190033b3870b0634b010 "chaincode -peer.add…" 19 seconds ago Up 17 seconds dev-peer0.org1.example.com-ccForAll-1.1
    3b26adcf352f hyperledger/fabric-tools "/bin/bash" 2 hours ago Up 2 hours cli
    51b0f0bb1273 hyperledger/fabric-peer "peer node start" 2 hours ago Up 2 hours 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com
    4b972ab1e354 hyperledger/fabric-peer "peer node start" 2 hours ago Up 2 hours 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com
    15908ba245d6 hyperledger/fabric-peer "peer node start" 2 hours ago Up 2 hours 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com
    6b3fe3592681 hyperledger/fabric-peer "peer node start" 2 hours ago Up 2 hours 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com
    c164634e14bc hyperledger/fabric-couchdb "tini -- /docker-ent…" 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:8984->5984/tcp couchdbOrg2Peer1
    9fd949bdf4ae hyperledger/fabric-orderer "orderer" 2 hours ago Up 2 hours 0.0.0.0:7050->7050/tcp orderer.example.com
    348138eb6f59 hyperledger/fabric-couchdb "tini -- /docker-ent…" 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:7984->5984/tcp couchdbOrg2Peer0
    878cf66f4c32 hyperledger/fabric-couchdb "tini -- /docker-ent…" 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdbOrg1Peer0
    6e3b84d39b14 hyperledger/fabric-ca "sh -c 'fabric-ca-se…" 2 hours ago Exited (1) 2 hours ago Org2ca.example.com
    97d18bd8f0eb hyperledger/fabric-ca "sh -c 'fabric-ca-se…" 2 hours ago Up 2 hours 0.0.0.0:7054->7054/tcp Org1ca.example.com
    f66d1921cc0f hyperledger/fabric-couchdb "tini -- /docker-ent…" 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:6984->5984/tcp couchdbOrg1Peer1

  • Niklaskkkk
    Niklaskkkk Posts: 113

    If I try to go on and create a new channel with peer0Org2 the same error appears as well, so seems to be something with the connection form container of peer0Org2? Here are the commands:

    root@3b26adcf352f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_LOCALMSPID="Org2MSP"

    root@3b26adcf352f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp

    root@3b26adcf352f:/opt/gopath/src/github.com/hyperledger/fabric/peer# export CORE_PEER_ADDRESS=peer0.org2.example.com:7051

    root@3b26adcf352f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel create -o orderer.example.com:7050 -f ./config/OrgTwoChannel.tx -c orgtwochannel

    2019-07-23 11:56:39.302 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
    Error: got unexpected status: BAD_REQUEST -- Attempted to include a member which is not in the consortium

    root@3b26adcf352f:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel list

    Error: error getting endorser client for channel: endorser client failed to connect to peer0.org2.example.com:7051: failed to create new connection: context deadline exceeded

    ------------------------------------------------------------------------------------------------

    Here are the profiles from configtx.yaml:

    OrgTwoChannel:
    Consortium: SampleConsortium
    Application:
    <<: *ApplicationDefaults
    Organizations:
    - *Org2

    OneOrgOrdererGenesis:
    Orderer:
    <<: *OrdererDefaults
    Organizations:
    - *OrdererOrg
    Consortiums:
    SampleConsortium:
    Organizations:
    - *Org1

    OneOrgChannel:
    Consortium: SampleConsortium
    Application:
    <<: *ApplicationDefaults
    Organizations:
    - *Org1

    here is the whole network from "docker ps -a"

    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    8b8798bfe667 dev-peer0.org1.example.com-ccforall-1.1-e1305b5301c8053f4772fd79dd5c9fc0cd527fb5f04a190033b3870b0634b010 "chaincode -peer.add…" 19 seconds ago Up 17 seconds dev-peer0.org1.example.com-ccForAll-1.1
    3b26adcf352f hyperledger/fabric-tools "/bin/bash" 2 hours ago Up 2 hours cli
    51b0f0bb1273 hyperledger/fabric-peer "peer node start" 2 hours ago Up 2 hours 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com
    4b972ab1e354 hyperledger/fabric-peer "peer node start" 2 hours ago Up 2 hours 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com
    15908ba245d6 hyperledger/fabric-peer "peer node start" 2 hours ago Up 2 hours 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com
    6b3fe3592681 hyperledger/fabric-peer "peer node start" 2 hours ago Up 2 hours 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com
    c164634e14bc hyperledger/fabric-couchdb "tini -- /docker-ent…" 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:8984->5984/tcp couchdbOrg2Peer1
    9fd949bdf4ae hyperledger/fabric-orderer "orderer" 2 hours ago Up 2 hours 0.0.0.0:7050->7050/tcp orderer.example.com
    348138eb6f59 hyperledger/fabric-couchdb "tini -- /docker-ent…" 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:7984->5984/tcp couchdbOrg2Peer0
    878cf66f4c32 hyperledger/fabric-couchdb "tini -- /docker-ent…" 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdbOrg1Peer0
    6e3b84d39b14 hyperledger/fabric-ca "sh -c 'fabric-ca-se…" 2 hours ago Exited (1) 2 hours ago Org2ca.example.com
    97d18bd8f0eb hyperledger/fabric-ca "sh -c 'fabric-ca-se…" 2 hours ago Up 2 hours 0.0.0.0:7054->7054/tcp Org1ca.example.com
    f66d1921cc0f hyperledger/fabric-couchdb "tini -- /docker-ent…" 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:6984->5984/tcp couchdbOrg1Peer1

  • kmyatt
    kmyatt Posts: 39

    Are you still encountering this issue? If so please let me know, and try to find a way to condense the text if you could please.

  • kmyatt
    kmyatt Posts: 39

    I'm assuming this was solved... Keep pushing through Niklaskkkk, keep up your drive to learn! :)

    Happy learning!

    Ken

  • Niklaskkkk
    Niklaskkkk Posts: 113

    @kmyatt said:
    Are you still encountering this issue? If so please let me know, and try to find a way to condense the text if you could please.

    Hi @kmyatt Thanks for the motivation!

    However, the issue is not solved. First peer0 from Org1 do edit the config file so that Org2 can be part of the channel, same as described in tutorial.
    Then peer0 from Org2 do manage to fetch the block from allarewelcome, but once it try to join the channel with "peer channel join -b allarewelcome.block" the same error message appears:

    Error: error getting endorser client for channel: endorser client failed to connect to peer0.org2.example.com:7051: failed to create new connection: context deadline exceeded

    Here is the data from key files:

    docker-compose.yml:

    orderer.example.com:
    container_name: orderer.example.com
    image: hyperledger/fabric-orderer
    environment:
    - FABRIC_LOGGING_SPEC=info
    - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
    - ORDERER_GENERAL_GENESISMETHOD=file
    - ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block
    - ORDERER_GENERAL_LOCALMSPID=OrdererMSP
    - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp/orderer/msp
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer
    command: orderer
    ports:
    - 7050:7050
    volumes:
    - ./config/:/etc/hyperledger/configtx
    - ./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/:/etc/hyperledger/msp/orderer
    - ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/:/etc/hyperledger/msp/peerOrg1
    networks:
    - basic

    peer0.org2.example.com:
    container_name: peer0.org2.example.com
    image: hyperledger/fabric-peer
    environment:
    - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
    - CORE_PEER_ID=peer0.org2.example.com
    - FABRIC_LOGGING_SPEC=info
    - CORE_CHAINCODE_LOGGING_LEVEL=info
    - CORE_PEER_LOCALMSPID=Org2MSP
    - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/
    - CORE_PEER_ADDRESS=peer0.org2.example.com:7051
    - CORE_PEER_LISTENADDRESS=0.0.0.0:9051
    - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=startfiles_basic
    - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
    - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdbOrg2Peer0:5984
    - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=peer0.Org2
    - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=password
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric
    command: peer node start
    # command: peer node start --peer-chaincodedev=true
    ports:
    - 9051:7051
    - 9053:7053
    volumes:
    - /var/run/:/host/var/run/
    - ./crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/msp/peer
    - ./crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/msp/users
    - ./config:/etc/hyperledger/configtx
    depends_on:
    - orderer.example.com
    - couchdbOrg2Peer0
    networks:
    - basic

    configtx.yaml:

    OneOrgOrdererGenesis:
    Orderer:
    <<: *OrdererDefaults
    Organizations:
    - *OrdererOrg
    Consortiums:
    SampleConsortium:
    Organizations:
    - *Org1

    OneOrgChannel:
        Consortium: SampleConsortium
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *Org1
    

    crypto-config.yaml:

    • Name: Org2
      Domain: org2.example.com
      EnableNodeOUs: true
      Template:
      Count: 2
      Users:
      Count: 1

    Would appreciate any help on this one! But please not that I need to restart the network, I guess one of the points should be to learn handle error messages without restarting each time?

  • Niklaskkkk
    Niklaskkkk Posts: 113

    @kmyatt said:
    I'm assuming this was solved... Keep pushing through Niklaskkkk, keep up your drive to learn! :)

    Happy learning!

    Ken

    Hi @kmyatt !

    I deleted all containers & images and installed everything again. Now it worked without any error message. I am not sure why, but thanks for your help & sorry for all my questions. Never done a course before with so many error messages where answers are not found on google/stackoverflow....I guess it is because blockchain is still so new.

  • kmyatt
    kmyatt Posts: 39

    Good Morning @Niklaskkkk ! Im assuming the issue was most likely that you either one of the nodes involved in your operation were fallen/not running and you needed to start it back up. This is the most common reason. But that error message also applies in multiple situations, so It's really important to have a slow, detailed look at the environment.

    "I deleted all containers & images and installed everything again. Now it worked without any error message. I am not sure why, but thanks for your help & sorry for all my questions. Never done a course before with so many error messages where answers are not found on google/stackoverflow....I guess it is because blockchain is still so new."

    In regard to this. You "hit the nail right on the head" (you're exactly right). Blockchain is still an evolving topic, and fabric is no different. So Stack Overflow and Google may not have the "direct answers" but it's important to just take your time and troubleshoot before you go looking for the answers anyway, that's what will make you remember what you did later (and after you get through it on your own, you can provide your wisdom and expertise to the next student!). Additionally, pay close attention to the videos, I try to give thorough explanations of each step we take as we do them.

    Altogether, I'm glad you (and all the other students) sticking with the course, and the things you learn will pay off in the long run, as well as put you ahead of the crowd when blockchain's popularity ramps up a lot more. **Stay motivated, and be positive ** :)

  • Niklaskkkk
    Niklaskkkk Posts: 113
    edited August 2019

    @kmyatt said:
    Good Morning @Niklaskkkk ! Im assuming the issue was most likely that you either one of the nodes involved in your operation were fallen/not running and you needed to start it back up. This is the most common reason. But that error message also applies in multiple situations, so It's really important to have a slow, detailed look at the environment.

    "I deleted all containers & images and installed everything again. Now it worked without any error message. I am not sure why, but thanks for your help & sorry for all my questions. Never done a course before with so many error messages where answers are not found on google/stackoverflow....I guess it is because blockchain is still so new."

    In regard to this. You "hit the nail right on the head" (you're exactly right). Blockchain is still an evolving topic, and fabric is no different. So Stack Overflow and Google may not have the "direct answers" but it's important to just take your time and troubleshoot before you go looking for the answers anyway, that's what will make you remember what you did later (and after you get through it on your own, you can provide your wisdom and expertise to the next student!). Additionally, pay close attention to the videos, I try to give thorough explanations of each step we take as we do them.

    Altogether, I'm glad you (and all the other students) sticking with the course, and the things you learn will pay off in the long run, as well as put you ahead of the crowd when blockchain's popularity ramps up a lot more. **Stay motivated, and be positive ** :)

    Thanks for the message! I agree - error testing and research is really important.

    However, at my level now there are some issues difficult to handle - withouth just deleting the docker files & then restart everything (which always seems to remove error messages...)
    This error message again appeared, now after I implemented the Kafka services. After googling this should be due to some certification issues? However, the suggested solution is that I should just deleted and re-download the network.
    I do not like the solution, as it wont give me the understanding of what the issue actually was. So I post my orderer logs if anyone can spot the error.

    Everything works fine before I add the kafka service, then there was no connection issues with the orderer from peers.

    The whole network is up and running, orderer node & other nodes operate fine. However, once I go into peer0.org1 and try to re-create channel (on page 50 in lab documents) I receive the following error:

    peer channel create -o orderer.example.com:7050 -c allarewelcome -f /etc/hyperledger/configtx/allarewelcome.tx

    Error: failed to create deliver client: orderer client failed to connect to orderer.example.com:7050: failed to create new connection: context deadline exceeded

    Orderer.example.com logs:

    nik@nik-ThinkPad-T470s:~/Desktop/fabric-samples/startFiles$ docker logs orderer.example.com

    2019-08-06 06:49:15.180 UTC [localconfig] completeInitialization -> INFO 001 Kafka.Version unset, setting to 0.10.2.0
    2019-08-06 06:49:15.235 UTC [orderer.common.server] prettyPrintStruct -> INFO 002 Orderer config values:
    General.LedgerType = "file"
    General.ListenAddress = "0.0.0.0"
    General.ListenPort = 7050
    General.TLS.Enabled = false
    General.TLS.PrivateKey = "/etc/hyperledger/fabric/tls/server.key"
    General.TLS.Certificate = "/etc/hyperledger/fabric/tls/server.crt"
    General.TLS.RootCAs = [/etc/hyperledger/fabric/tls/ca.crt]
    General.TLS.ClientAuthRequired = false
    General.TLS.ClientRootCAs = []
    General.Cluster.RootCAs = [/etc/hyperledger/fabric/tls/ca.crt]
    General.Cluster.ClientCertificate = ""
    General.Cluster.ClientPrivateKey = ""
    General.Cluster.DialTimeout = 5s
    General.Cluster.RPCTimeout = 7s
    General.Cluster.ReplicationBufferSize = 20971520
    General.Cluster.ReplicationPullTimeout = 5s
    General.Cluster.ReplicationRetryTimeout = 5s
    General.Keepalive.ServerMinInterval = 1m0s
    General.Keepalive.ServerInterval = 2h0m0s
    General.Keepalive.ServerTimeout = 20s
    General.GenesisMethod = "file"
    General.GenesisProfile = "SampleInsecureSolo"
    General.SystemChannel = "test-system-channel-name"
    General.GenesisFile = "/etc/hyperledger/configtx/genesis.block"
    General.Profile.Enabled = false
    General.Profile.Address = "0.0.0.0:6060"
    General.LocalMSPDir = "/etc/hyperledger/msp/orderer/msp"
    General.LocalMSPID = "OrdererMSP"
    General.BCCSP.ProviderName = "SW"
    General.BCCSP.SwOpts.SecLevel = 256
    General.BCCSP.SwOpts.HashFamily = "SHA2"
    General.BCCSP.SwOpts.Ephemeral = false
    General.BCCSP.SwOpts.FileKeystore.KeyStorePath = "/etc/hyperledger/msp/orderer/msp/keystore"
    General.BCCSP.SwOpts.DummyKeystore =
    General.BCCSP.SwOpts.InmemKeystore =
    General.BCCSP.PluginOpts =
    General.Authentication.TimeWindow = 15m0s
    FileLedger.Location = "/var/hyperledger/production/orderer"
    FileLedger.Prefix = "hyperledger-fabric-ordererledger"
    RAMLedger.HistorySize = 1000
    Kafka.Retry.ShortInterval = 5s
    Kafka.Retry.ShortTotal = 10m0s
    Kafka.Retry.LongInterval = 5m0s
    Kafka.Retry.LongTotal = 12h0m0s
    Kafka.Retry.NetworkTimeouts.DialTimeout = 10s
    Kafka.Retry.NetworkTimeouts.ReadTimeout = 10s
    Kafka.Retry.NetworkTimeouts.WriteTimeout = 10s
    Kafka.Retry.Metadata.RetryMax = 3
    Kafka.Retry.Metadata.RetryBackoff = 250ms
    Kafka.Retry.Producer.RetryMax = 3
    Kafka.Retry.Producer.RetryBackoff = 100ms
    Kafka.Retry.Consumer.RetryBackoff = 2s
    Kafka.Verbose = false
    Kafka.Version = 0.10.2.0
    Kafka.TLS.Enabled = false
    Kafka.TLS.PrivateKey = ""
    Kafka.TLS.Certificate = ""
    Kafka.TLS.RootCAs = []
    Kafka.TLS.ClientAuthRequired = false
    Kafka.TLS.ClientRootCAs = []
    Kafka.SASLPlain.Enabled = false
    Kafka.SASLPlain.User = ""
    Kafka.SASLPlain.Password = ""
    Kafka.Topic.ReplicationFactor = 3
    Debug.BroadcastTraceDir = ""
    Debug.DeliverTraceDir = ""
    Consensus = map[SnapDir:/var/hyperledger/production/orderer/etcdraft/snapshot WALDir:/var/hyperledger/production/orderer/etcdraft/wal]
    Operations.ListenAddress = "127.0.0.1:8443"
    Operations.TLS.Enabled = false
    Operations.TLS.PrivateKey = ""
    Operations.TLS.Certificate = ""
    Operations.TLS.RootCAs = []
    Operations.TLS.ClientAuthRequired = false
    Operations.TLS.ClientRootCAs = []
    Metrics.Provider = "disabled"
    Metrics.Statsd.Network = "udp"
    Metrics.Statsd.Address = "127.0.0.1:8125"
    Metrics.Statsd.WriteInterval = 30s
    Metrics.Statsd.Prefix = ""
    2019-08-06 06:49:15.261 UTC [fsblkstorage] newBlockfileMgr -> INFO 003 Getting block information from block storage
    2019-08-06 06:49:15.310 UTC [orderer.commmon.multichannel] Initialize -> INFO 004 Starting system channel 'testchainid' with genesis block hash b57a29612d689d71b00fee5608b087aa7c40def1e647150cf800e80ff706d26a and orderer type solo
    2019-08-06 06:49:15.310 UTC [orderer.common.server] Start -> INFO 005 Starting orderer:
    Version: 1.4.0
    Commit SHA: d700b43
    Go version: go1.11.1
    OS/Arch: linux/amd64
    2019-08-06 06:49:15.310 UTC [orderer.common.server] Start -> INFO 006 Beginning to serve requests

  • saikumar3349
    saikumar3349 Posts: 2
    edited October 2019

    @Niklaskkkk try to make telnet the orderer.example.com on 7050 port from peer0.org1. If it was unable to connect then add an extra host mapping in the docker-compose file.

    extra_hosts:
    - orderer.example.com:

  • sl31pn1r
    sl31pn1r Posts: 1
    edited April 2020

    Hi All,

    I'm also getting an error when I'm trying to update the chaincode with the new endorsement policy in this LAB.

    I have noticed that the commands in the LAB guide and the downloadable tar are not properly defined.
    This is in the LAB guide and the Lab7.txt
    peer chaincode upgrade -n ccForAll -v 1.1 \ -o orderer.example.com:7050 \ --policy “AND(‘Org1.peer’, ‘Org2.peer’ OR (‘Org1.admin’) )” \ -c '{“Args”:[“Mach”, “50”]}’
    and imho this is how it should be:
    peer chaincode upgrade -n ccForAll -v 1.1 -o orderer.example.com:7050 --policy "AND('Org1.peer', 'Org2.peer', OR ('Org1.admin') )” -c '{"Args":["Mach", "50"]}' -C allarewelcome

    The command provided by the instructor missing a comma and the channels name. Without fixing the command I'm getting a policy error and missing channel name error.

    However this is not my main concern I'm asking help with. When I'm trying to execute the fixed upgrade command from peer0.org2.example.com or peer0.org1.example.com I'm getting the following error.

    2020-04-14 14:49:11.192 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
    2020-04-14 14:49:11.213 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, p lease use the FABRIC_LOGGING_SPEC environment variable
    2020-04-14 14:49:11.220 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
    2020-04-14 14:49:11.220 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
    Error: could not assemble transaction, err proposal response was not successful, error code 500, msg version already exists for chaincode with name 'ccForAll'

    The log shows the following on a peer:

    2020-04-14 14:58:03.573 UTC [endorser] callChaincode -> INFO 043 [][9363456e] Entry chaincode: name:"cscc"
    2020-04-14 14:58:03.574 UTC [endorser] callChaincode -> INFO 044 [][9363456e] Exit chaincode: name:"cscc" (0ms)
    2020-04-14 14:58:03.574 UTC [comm.grpc.server] 1 -> INFO 045 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.26.0.9:56026 grpc.code=OK grpc.call_duration=1.185603ms
    2020-04-14 14:58:13.438 UTC [endorser] callChaincode -> INFO 046 [allarewelcome][848200a1] Entry chaincode: name:"lscc"
    2020-04-14 14:58:13.438 UTC [endorser] callChaincode -> INFO 047 [allarewelcome][848200a1] Exit chaincode: name:"lscc" (1ms)
    2020-04-14 14:58:13.439 UTC [endorser] ProcessProposal -> ERRO 048 [allarewelcome][848200a1] simulateProposal() resulted in chaincode name:"lscc" response status 500 for txid: 848200a19a5cb602c6ff2744c2a8628b3cf69f5dc80d516ea879882825187431
    2020-04-14 14:58:13.439 UTC [comm.grpc.server] 1 -> INFO 049 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.26.0.9:56080 grpc.code=OK grpc.call_duration=1.969905ms

    Any support would be much appreciated.

  • Niklaskkkk
    Niklaskkkk Posts: 113
    edited April 2020

    @sl31pn1r said:
    Hi All,

    I'm also getting an error when I'm trying to update the chaincode with the new endorsement policy in this LAB.

    I have noticed that the commands in the LAB guide and the downloadable tar are not properly defined.
    This is in the LAB guide and the Lab7.txt
    peer chaincode upgrade -n ccForAll -v 1.1 \ -o orderer.example.com:7050 \ --policy “AND(‘Org1.peer’, ‘Org2.peer’ OR (‘Org1.admin’) )” \ -c '{“Args”:[“Mach”, “50”]}’
    and imho this is how it should be:
    peer chaincode upgrade -n ccForAll -v 1.1 -o orderer.example.com:7050 --policy "AND('Org1.peer', 'Org2.peer', OR ('Org1.admin') )” -c '{"Args":["Mach", "50"]}' -C allarewelcome

    The command provided by the instructor missing a comma and the channels name. Without fixing the command I'm getting a policy error and missing channel name error.

    However this is not my main concern I'm asking help with. When I'm trying to execute the fixed upgrade command from peer0.org2.example.com or peer0.org1.example.com I'm getting the following error.

    2020-04-14 14:49:11.192 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable
    2020-04-14 14:49:11.213 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, p lease use the FABRIC_LOGGING_SPEC environment variable
    2020-04-14 14:49:11.220 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
    2020-04-14 14:49:11.220 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
    Error: could not assemble transaction, err proposal response was not successful, error code 500, msg version already exists for chaincode with name 'ccForAll'

    The log shows the following on a peer:

    2020-04-14 14:58:03.573 UTC [endorser] callChaincode -> INFO 043 [][9363456e] Entry chaincode: name:"cscc"
    2020-04-14 14:58:03.574 UTC [endorser] callChaincode -> INFO 044 [][9363456e] Exit chaincode: name:"cscc" (0ms)
    2020-04-14 14:58:03.574 UTC [comm.grpc.server] 1 -> INFO 045 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.26.0.9:56026 grpc.code=OK grpc.call_duration=1.185603ms
    2020-04-14 14:58:13.438 UTC [endorser] callChaincode -> INFO 046 [allarewelcome][848200a1] Entry chaincode: name:"lscc"
    2020-04-14 14:58:13.438 UTC [endorser] callChaincode -> INFO 047 [allarewelcome][848200a1] Exit chaincode: name:"lscc" (1ms)
    2020-04-14 14:58:13.439 UTC [endorser] ProcessProposal -> ERRO 048 [allarewelcome][848200a1] simulateProposal() resulted in chaincode name:"lscc" response status 500 for txid: 848200a19a5cb602c6ff2744c2a8628b3cf69f5dc80d516ea879882825187431
    2020-04-14 14:58:13.439 UTC [comm.grpc.server] 1 -> INFO 049 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.26.0.9:56080 grpc.code=OK grpc.call_duration=1.969905ms

    Any support would be much appreciated.

    Hi @sl31pn1r ,

    Please try the following:

    • Install the new chaincode version on the required endorser
    • Upgrade the chaincode by invoking the "peer chaincode upgrade" command

    This is from the official Hyperledger Fabric documentation: "Prior to upgrade, the new version of the chaincode must be installed on the required endorsers. Upgrade is a transaction similar to the instantiate transaction, which binds the new version of the chaincode to the channel. Other channels bound to the old version of the chaincode still run with the old version. In other words, the upgrade transaction only affects one channel at a time, the channel to which the transaction is submitted."

    Link: https://hyperledger-fabric.readthedocs.io/en/release-1.4/chaincode4noah.html#upgrade

  • I am facing the same issue with version 2.2 for test-network and fabcar examples.Please help

  • @milan.sonkar said:
    I am facing the same issue with version 2.2 for test-network and fabcar examples.Please help

    Hi @milan.sonkar , I am unsure about the fabcar example as it is outside this course, but I believe this course is not compatible with version 2 of Fabric yet. Version 1.4 is recommended.

  • fcioanca
    fcioanca Posts: 1,886

    We are working on updating the course to v2.2 and expanding it, expected towards the end of the year. Until then, please use v1.4, as recommended in the course material.

Categories

Upcoming Training