Tools, FAQ, Tutorials:
Connet to basic-network Peer
How to connect to the peer container of the basic-network? I want to see how is the peer doing.
✍: FYIcenter.com
You can use the "docker exec" command to connect to the peer container
of the basic-network.
1. Run "docker exec" to create an interactive connect with the peer container:
$ docker exec -it peer0.org1.example.com bash root@aedfd08717a5:/opt/gopath/src/github.com/hyperledger/fabric#
2. Check the default directory and home directory:
root@aedfd08717a5:/opt/gopath/src/github.com/hyperledger/fabric# ls -l -rw-r--r-- 1 root root 9234 Apr 1 01:44 mychannel.block root@aedfd08717a5:/opt/gopath/src/github.com/hyperledger/fabric# cd root@aedfd08717a5:~# ls -l total 0
3. Setup membership variables:
root@aedfd08717a5:~# export CORE_PEER_LOCALMSPID=Org1MSP root@aedfd08717a5:~# export CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp
4. Check the node status and version:
root@aedfd08717a5:~# peer node status status:STARTED root@aedfd08717a5:~# peer version peer: Version: 1.4.1 Commit SHA: 87074a7 Go version: go1.11.5 OS/Arch: linux/amd64 Chaincode: Base Image Version: 0.4.15 Base Docker Namespace: hyperledger Base Docker Label: org.hyperledger.fabric Docker Namespace: hyperledger
5. List channels:
root@aedfd08717a5:~# peer channel list Channels peers has joined: mychannel
6. List chaincodes:
root@aedfd08717a5:~# peer chaincode list --installed Get installed chaincodes on peer:
As you can see, we are running Peer 1.4.1. The peer joined 1 channel, and has 0 chaincode.
Â
⇒ Download Blocks from Blockchain
⇠View Logs Files of basic-network
⇑ fabric-samples/basic-network
⇑⇑ Hyperledger Tutorials
2020-04-14, 969👍, 0💬
Popular Posts:
dev.FYIcenter.com is a Website for software developer looking for software development technologies,...
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...
How to read RSS validation errors at w3.org? If your RSS feed has errors, the RSS validator at w3.or...
How to create Hello-2.0.epub with WinRAR? I have all required files to create Hello-2.0.epub. To cre...
Where to find tutorials on JSON (JavaScript Object Notation) text string format? I want to know how ...