Lab 4 Invoke Command Failing ("Chaincode registration failed")("Exited with 254")
Hello
I am trying to conduct Lab 4 but am stuck on the chaincode invocation step
From googling I've tried the following :
Restart network
Ensure package is installed correctly
Change name paramter in invoke command to PACKAGE_ID
Give absolute path to package command
Install commands used :
peer lifecycle chaincode package simple_chaincode --path /home/$USER/go/src/github.com/hyperledger/fabric-samples/lfd272/chaincodes/simple_chaincode --lang node --label simple_chaincode
peer lifecycle chaincode install simple_chaincode
export PACKAGE_ID=simple_chaincode:5e11633859d9976c872a38b13521279adf32d14ba8bffa6e29da4b43adcde680 (textbook hash but in my env it corresponds to the correct ID generated by "chaincode install"
peer lifecycle chaincode approveformyorg -o localhost:7050--ordererTLSHostnameOverride orderer.example.com --channelIDmychannel--name simple_chaincode --version 1.0 --package-id$PACKAGE_ID --sequence 1--tls --cafile${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
peer lifecycle chaincode commit -o localhost:7050--ordererTLSHostnameOverride orderer.example.com --channelIDmychannel--name simple_chaincode --version 1.0 --sequence 1--tls --cafile${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem--peerAddresseslocalhost:7051 --tlsRootCertFiles${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses localhost:9051--tlsRootCertFiles${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt
peer lifecycle chaincode querycommitted --channelIDmychannel --namesimple_chaincode --cafile${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
(This invoke command fails)
peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverrideorderer.example.com --tls --cafile${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem-C mychannel -nsimple_chaincode --peerAddresses localhost:7051 --tlsRootCertFiles${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt --peerAddresses localhost:9051--tlsRootCertFiles${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt -c '{"function":"put","Args":["k","v"]}'
(Error Message)
Error: endorsement failure during invoke. response: status:500 message:"error in simulation: failed to execute transaction ($HASH omitted for clarity): could not launch chaincode simple_chaincode:($HASH omitted for clarity): chaincode registration failed: container exited with 254"
Any guidance or insight would be appreciated =]
Thank you
Comments
-
@bpmalik,
Hello, Let's see if we can resolve this issue. The most probable causes are:You have specified an incorrect path to the chaincode when packaging it.
You have specified an incorrect language flag when packaging the chaincode.
You haven't installed the chaincode on one of the peers.Please determine if any of the above issues can be causing the error.
Also support can be found on the Discord channel Here is an invite link: https://discord.gg/hyperledger
Let me know if this helped or if we need to investigate the issue more. Bobbi
0 -
Thank you for the Discord invite!
I've tried these steps but I think I need more understanding of the process so will try capturing some logs to determine the error =]
Thank you for the help!
0 -
Hi @bpmalik
The issue is with the source code of example chaincode. Make sure the fabcar chaincode is copied from the following location.
https://github.com/hyperledger/fabric-samples/tree/main/chaincode/fabcar .In certain lab collections the source code is of fabcar application apis rather than the chaincode
0 -
0
Categories
- All Categories
- 177 LFX Mentorship
- 177 LFX Mentorship: Linux Kernel
- 750 Linux Foundation IT Professional Programs
- 373 Cloud Engineer IT Professional Program
- 169 Advanced Cloud Engineer IT Professional Program
- 74 DevOps IT Professional Program - Discontinued
- 4 DevOps & GitOps IT Professional Program
- 99 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- 1 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 4 Cloud & Containers Training
- 1 Cybersecurity Training
- 2 DevOps & Site-Reliability Training
- 1 Linux Kernel Development Training
- 1 Networking Training
- 2 Open Source Best Practice Training
- 1 System Administration Training
- 1 System Engineering Training
- 1 Web & Application Development Training
- 792 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 87 Storage
- 769 Linux Distributions
- 81 Debian
- 68 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 106 Mobile Computing
- 18 Android
- 73 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 392 Off Topic
- 121 Introductions
- 181 Small Talk
- 29 Study Material
- 955 Programming and Development
- 310 Kernel Development
- 627 Software Development
- 984 Software
- 376 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class Forum
- 1.4K LFS258 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)
