Chaincode Development in Dev Mode - Chaincode compile and execution
Hi!
i compiled successfully the chaincode_example02 but when I execute, it gives me an error and I don't know why
Error starting Simple chaincode: error chaincode id not provided
Thank you in advance!
echo CORE_PEER_MSPCONFIGPATH
CORE_PEER_MSPCONFIGPATH
echo $CORE_PEER_MSPCONFIGPATH
/etc/hyperledger/msp
cd chaincode_example02/go
pwd
/opt/gopath/src/chaincode/chaincode_example02/go
go build -o chaincode_example02
ls
chaincode_example02 chaincode_example02.go
file chaincode_example02
chaincode_example02: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 3.2.0, BuildID[sha1]=3700e8f2656b0f53a0d8654316290d0a517139f8, not stripped
file chaincode_example02.go
chaincode_example02.go: C source, ASCII text
CORE_PEER_ADDRESS=peer:7052 CORE_CHAINCODE_ID_NAME=mycc:0
# ./chaincode_example02
2021-04-07 02:58:59.721 UTC [shim] setupChaincodeLogging -> INFO 001 Chaincode log level not provided; defaulting to: INFO
2021-04-07 02:58:59.721 UTC [shim] setupChaincodeLogging -> INFO 002 Chaincode (build level: ) starting up ...
Error starting Simple chaincode: error chaincode id not provided#
Comments
-
Hello , This forum is to assist learners with the LFD272 coursework. Is the example you are referring to in the user documentation? Bobbi
0 -
Hi, yes! if on LFD272 coursework: Chaincode Development in Dev Mode
0 -
Hi @FabianChiera,
Make sure that the environmental variables are set in the same command as a binary execution:
CORE_PEER_ADDRESS=peer:7052 CORE_CHAINCODE_ID_NAME=mycc:0 ./chaincode_example02
If you'd like to utilize these variables through the whole terminal session, you can instead try to export them:
export CORE_PEER_ADDRESS=peer:7052 export CORE_CHAINCODE_ID_NAME=mycc:0 ./chaincode_example02
Best regards,
Ilya0
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
- 5 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)
