主頁 > 資料庫 > Fabric開發(二) Ubuntu20.04.1快速搭建Fabric1.0.0 (排雷版)

Fabric開發(二) Ubuntu20.04.1快速搭建Fabric1.0.0 (排雷版)

2020-09-25 11:26:07 資料庫

一、安裝Fabric前準備:

1、安裝ubuntu,建議virtualBox+ubuntu鏡像,

我所使用的版本:

1、virtualBox 5.2.20
#ubuntu桌面版,方便某些操作,例如修改源,(建議安裝英文版)
2、ubuntu-20.04.1-desktop-amd64.iso 

virtual版本
安裝注意點:

1、記憶體: 2048M
2、CPU: 2
3、磁盤: 位置放在D盤,大小50G, fabric 安裝完需要10G
4、網路模式: 橋接

1、記憶體 顯存 存盤修改
在這里插入圖片描述
在這里插入圖片描述
2、網路修改
在這里插入圖片描述
3、安裝完成后,九宮格找到Software&Update,修改源,
在這里插入圖片描述

2、xshell6 連接 可以網站直接申請學校版本

1.采用xshell 進行操作,方便復制

sudo apt-get install openssh-server
ps -e|grep ssh

2.查看ip

sudo apt install net-tools
ifconfig

查看ip也可以直接點擊 九宮格找到Setting ->Network
在這里插入圖片描述
3.進行xshell連接

3、安裝 vim、git、curl、pip、npm

此處注意:python-pip安裝會報找不到,所以改為python3-pip

sudo apt-get update
sudo apt-get install vim
sudo apt-get install git
sudo apt-get install curl
sudo apt-get install python3-pip
pip3 install --upgrade pip
sudo apt-get install npm

4、安裝go

安裝版本:1.14.4

wget https://storage.googleapis.com/golang/go1.14.4.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.14.4.linux-amd64.tar.gz

家目錄創建go檔案夾

cd ~
mkdir go

編輯當前用戶的環境變數.(:x可以直接回傳保存,)

vim ~/.profile

末尾追加:

export PATH=$PATH:/usr/local/go/bin 
export GOROOT=/usr/local/go 
export GOPATH=$HOME/go 
export PATH=$PATH:$HOME/go/bin

環境變數立即生效

source ~/.profile

檢驗go是否安裝成功(成功顯示go version go1.14.4 linux/amd64

go version

5、安裝Docker

1.卸載舊版本docker

sudo apt-get remove docker docker-engine docker.io

2.更新系統軟體

sudo apt-get update

3.安裝依賴包

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

4.添加官方密鑰

執行該命令時,如遇到長時間沒有回應說明網路連接不到docker網站,需要使用代-理進行,
顯示OK,表示添加成功.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

5.添加倉庫

sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

6.修改倉庫源(如果要設定專屬阿里云,自己先百度下哈)

sudo vim /etc/docker/daemon.json

填寫以下內容

{
    "registry-mirrors": ["http://hub-mirror.c.163.com"]
}

重置docker服務

systemctl restart docker.service

7.再次更新軟體

sudo apt-get update

8.安裝docker

如果想指定安裝某一版本,可使用 sudo apt-get install docker-ce= 命令,把替換為具體版本即可,
以下命令沒有指定版本,默認就會安裝最新版

sudo apt-get install docker-ce

9.查看docker版本

docker -v

10.安裝完成后需要修改當前用戶(我使用的用戶叫halfape)權限:

sudo gpasswd -a halfape docker #正在將用戶“halfape”加入到“docker”組中
newgrp docker #更新用戶組

6、安裝docker-compose

1.下載docker-compose

sudo curl -L https://github.com/docker/compose/releases/download/1.17.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

2.授權

sudo chmod +x /usr/local/bin/docker-compose

3.查看版本資訊

docker-compose --version

二、安裝Fabric

1、下載 Fabric原始碼

我們可以使用Git命令下載原始碼,首先需要建立對應的目錄,然后進入該目錄,Git下載原始碼:

mkdir -p ~/go/src/github.com/hyperledger 
cd ~/go/src/github.com/hyperledger 
git clone https://github.com/hyperledger/fabric.git

由于Fabric一直在更新,所有我們并不需要最新最新的原始碼,需要切換到v1.0.0版本的原始碼即可:(這個下載程序比較慢,目前看到一種從gitee下載的方法 我沒有試)

cd ~/go/src/github.com/hyperledger/fabric
git checkout v1.0.0

2、Fabric Docker鏡像的下載

因為我們已經設定了Docker Hub鏡像地址,所以下載也會很快,官方檔案也提供了批量下載的腳本,我們直接運行:

cd ~/go/src/github.com/hyperledger/fabric/examples/e2e_cli/
source download-dockerimages.sh -c x86_64-1.0.0 -f x86_64-1.0.0

檢查Fabric Docker鏡像串列

docker images

![在這里插入圖片描述](https://img-blog.csdnimg.cn/20200924135347468.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2Fpd2FzdG9u,size_16,color_FFFFFF,t_70#pic_center
可以看出,檔案還是蠻大的,
至此,下載 fabric 原始碼、fabric 鏡像的作業已經完成,

三、Fabric簡單除錯

1、啟動Fabric網路并完成ChainCode的測驗

我們仍然停留在e2e_cli檔案夾,這里提供了啟動、關閉Fabric網路的自動化腳本,我們要啟動Fabric網路,并自動運行Example02 ChainCode的測驗,執行一個命令:

./network_setup.sh up
1.1編譯生成Fabric公私鑰、證書的程式,程式在目錄:fabric/release/linux-amd64/bin
1.2基于configtx.yaml生成創世區塊和通道相關資訊,并保存在channel-artifacts檔案夾,
1.3基于crypto-config.yaml生成公私鑰和證書資訊,并保存在crypto-config檔案夾中,
1.4基于docker-compose-cli.yaml啟動1Orderer+4Peer+1CLI的Fabric容器,
1.5在CLI啟動的時候,會運行scripts/script.sh檔案,這個腳本檔案包含了創建Channel,加入Channel,安裝Example02,運行Example02等功能,

最后運行完畢,我們可以看到這樣的界面:
在這里插入圖片描述
看到這里 恭喜你,說明我們整個Fabric網路已經OK了,

記錄下具體程序,以便于后續研究,

halfape@halfape-VirtualBox:~/go/src/github.com/hyperledger/fabric/examples/e2e_cli$ ./network_setup.sh up
setting to default channel 'mychannel'
mychannel

Building cryptogen
make: Entering directory '/home/halfape/go/src/github.com/hyperledger/fabric'
Building release/linux-amd64/bin/configtxgen for linux-amd64
mkdir -p release/linux-amd64/bin
CGO_CFLAGS=" " GOOS=linux GOARCH=amd64 go build -o /home/halfape/go/src/github.com/hyperledger/fabric/release/linux-amd64/bin/configtxgen -tags "nopkcs11" -ldflags "-X github.com/hyperledger/fabric/common/configtx/tool/configtxgen/metadata.Version=1.0.0" github.com/hyperledger/fabric/common/configtx/tool/configtxgen
Building release/linux-amd64/bin/cryptogen for linux-amd64
mkdir -p release/linux-amd64/bin
CGO_CFLAGS=" " GOOS=linux GOARCH=amd64 go build -o /home/halfape/go/src/github.com/hyperledger/fabric/release/linux-amd64/bin/cryptogen -tags "nopkcs11" -ldflags "-X github.com/hyperledger/fabric/common/tools/cryptogen/metadata.Version=1.0.0" github.com/hyperledger/fabric/common/tools/cryptogen
Building release/linux-amd64/bin/configtxlator for linux-amd64
mkdir -p release/linux-amd64/bin
CGO_CFLAGS=" " GOOS=linux GOARCH=amd64 go build -o /home/halfape/go/src/github.com/hyperledger/fabric/release/linux-amd64/bin/configtxlator -tags "nopkcs11" -ldflags "-X github.com/hyperledger/fabric/common/tools/configtxlator/metadata.Version=1.0.0" github.com/hyperledger/fabric/common/tools/configtxlator
Building release/linux-amd64/bin/peer for linux-amd64
mkdir -p release/linux-amd64/bin
CGO_CFLAGS=" " GOOS=linux GOARCH=amd64 go build -o /home/halfape/go/src/github.com/hyperledger/fabric/release/linux-amd64/bin/peer -tags "nopkcs11" -ldflags "-X github.com/hyperledger/fabric/common/metadata.Version=1.0.0 -X github.com/hyperledger/fabric/common/metadata.BaseVersion=0.3.1 -X github.com/hyperledger/fabric/common/metadata.BaseDockerLabel=org.hyperledger.fabric -X github.com/hyperledger/fabric/common/metadata.DockerNamespace=hyperledger -X github.com/hyperledger/fabric/common/metadata.BaseDockerNamespace=hyperledger" github.com/hyperledger/fabric/peer
Building release/linux-amd64/bin/orderer for linux-amd64
mkdir -p release/linux-amd64/bin
CGO_CFLAGS=" " GOOS=linux GOARCH=amd64 go build -o /home/halfape/go/src/github.com/hyperledger/fabric/release/linux-amd64/bin/orderer -tags "nopkcs11" -ldflags "-X github.com/hyperledger/fabric/orderer/metadata.Version=1.0.0" github.com/hyperledger/fabric/orderer
mkdir -p release/linux-amd64/bin
make: Leaving directory '/home/halfape/go/src/github.com/hyperledger/fabric'

##########################################################
##### Generate certificates using cryptogen tool #########
##########################################################
org1.example.com
org2.example.com

Using configtxgen -> /home/halfape/go/src/github.com/hyperledger/fabric/examples/e2e_cli/../../release/linux-amd64/bin/configtxgen
##########################################################
#########  Generating Orderer Genesis block ##############
##########################################################
2020-09-24 14:03:21.695 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2020-09-24 14:03:21.712 CST [common/configtx/tool] doOutputBlock -> INFO 002 Generating genesis block
2020-09-24 14:03:21.714 CST [common/configtx/tool] doOutputBlock -> INFO 003 Writing genesis block

#################################################################
### Generating channel configuration transaction 'channel.tx' ###
#################################################################
2020-09-24 14:03:21.756 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2020-09-24 14:03:21.760 CST [common/configtx/tool] doOutputChannelCreateTx -> INFO 002 Generating new channel configtx
2020-09-24 14:03:21.761 CST [common/configtx/tool] doOutputChannelCreateTx -> INFO 003 Writing new channel tx

#################################################################
#######    Generating anchor peer update for Org1MSP   ##########
#################################################################
2020-09-24 14:03:21.793 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2020-09-24 14:03:21.798 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
2020-09-24 14:03:21.798 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update

#################################################################
#######    Generating anchor peer update for Org2MSP   ##########
#################################################################
2020-09-24 14:03:21.835 CST [common/configtx/tool] main -> INFO 001 Loading configuration
2020-09-24 14:03:21.839 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 002 Generating anchor peer update
2020-09-24 14:03:21.840 CST [common/configtx/tool] doOutputAnchorPeersUpdate -> INFO 003 Writing anchor peer update

Creating network "e2ecli_default" with the default driver
Creating peer0.org1.example.com ... 
Creating peer1.org1.example.com ... 
Creating peer1.org2.example.com ... 
Creating orderer.example.com ... 
Creating peer0.org1.example.com
Creating peer0.org2.example.com ... 
Creating peer1.org1.example.com
Creating orderer.example.com
Creating peer0.org2.example.com
Creating orderer.example.com ... done
Creating cli ... 
Creating cli ... done

 ____    _____      _      ____    _____           _____   ____    _____ 
/ ___|  |_   _|    / \    |  _ \  |_   _|         | ____| |___ \  | ____|
\___ \    | |     / _ \   | |_) |   | |    _____  |  _|     __) | |  _|  
 ___) |   | |    / ___ \  |  _ <    | |   |_____| | |___   / __/  | |___ 
|____/    |_|   /_/   \_\ |_| \_\   |_|           |_____| |_____| |_____|

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=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
2020-09-24 06:03:35.240 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:35.240 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:35.244 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2020-09-24 06:03:35.244 UTC [msp] GetLocalMSP -> DEBU 004 Returning existing local MSP
2020-09-24 06:03:35.244 UTC [msp] GetDefaultSigningIdentity -> DEBU 005 Obtaining default signing identity
2020-09-24 06:03:35.244 UTC [msp] GetLocalMSP -> DEBU 006 Returning existing local MSP
2020-09-24 06:03:35.244 UTC [msp] GetDefaultSigningIdentity -> DEBU 007 Obtaining default signing identity
2020-09-24 06:03:35.244 UTC [msp/identity] Sign -> DEBU 008 Sign: plaintext: 0A88060A074F7267314D535012FC052D...53616D706C65436F6E736F727469756D 
2020-09-24 06:03:35.244 UTC [msp/identity] Sign -> DEBU 009 Sign: digest: 13F31E852E3702746BDF69BB4E8101889C7FF20CCB0A369CB048D4F2366435B0 
2020-09-24 06:03:35.244 UTC [msp] GetLocalMSP -> DEBU 00a Returning existing local MSP
2020-09-24 06:03:35.244 UTC [msp] GetDefaultSigningIdentity -> DEBU 00b Obtaining default signing identity
2020-09-24 06:03:35.244 UTC [msp] GetLocalMSP -> DEBU 00c Returning existing local MSP
2020-09-24 06:03:35.244 UTC [msp] GetDefaultSigningIdentity -> DEBU 00d Obtaining default signing identity
2020-09-24 06:03:35.244 UTC [msp/identity] Sign -> DEBU 00e Sign: plaintext: 0ABF060A1508021A0608B7EDB0FB0522...959D6EC845FCE532A9A3ADDAD6C1AD31 
2020-09-24 06:03:35.244 UTC [msp/identity] Sign -> DEBU 00f Sign: digest: AE949BCE386EAABE88210C5FB64D2C525F9E74B8D8CF1554F4B806FA576574C1 
2020-09-24 06:03:35.493 UTC [msp] GetLocalMSP -> DEBU 010 Returning existing local MSP
2020-09-24 06:03:35.493 UTC [msp] GetDefaultSigningIdentity -> DEBU 011 Obtaining default signing identity
2020-09-24 06:03:35.493 UTC [msp] GetLocalMSP -> DEBU 012 Returning existing local MSP
2020-09-24 06:03:35.493 UTC [msp] GetDefaultSigningIdentity -> DEBU 013 Obtaining default signing identity
2020-09-24 06:03:35.493 UTC [msp/identity] Sign -> DEBU 014 Sign: plaintext: 0ABF060A1508021A0608B7EDB0FB0522...825BD6FDF69112080A021A0012021A00 
2020-09-24 06:03:35.493 UTC [msp/identity] Sign -> DEBU 015 Sign: digest: 8378ACEDEF10F25823178B4C1ECB0EA5C0157422A9EE3B2241623F02FC25C523 
2020-09-24 06:03:35.494 UTC [channelCmd] readBlock -> DEBU 016 Got status:*orderer.DeliverResponse_Status 
2020-09-24 06:03:35.494 UTC [msp] GetLocalMSP -> DEBU 017 Returning existing local MSP
2020-09-24 06:03:35.494 UTC [msp] GetDefaultSigningIdentity -> DEBU 018 Obtaining default signing identity
2020-09-24 06:03:35.496 UTC [channelCmd] InitCmdFactory -> INFO 019 Endorser and orderer connections initialized
2020-09-24 06:03:35.698 UTC [msp] GetLocalMSP -> DEBU 01a Returning existing local MSP
2020-09-24 06:03:35.698 UTC [msp] GetDefaultSigningIdentity -> DEBU 01b Obtaining default signing identity
2020-09-24 06:03:35.702 UTC [msp] GetLocalMSP -> DEBU 01c Returning existing local MSP
2020-09-24 06:03:35.702 UTC [msp] GetDefaultSigningIdentity -> DEBU 01d Obtaining default signing identity
2020-09-24 06:03:35.703 UTC [msp/identity] Sign -> DEBU 01e Sign: plaintext: 0ABF060A1508021A0608B7EDB0FB0522...E5E08F74893C12080A021A0012021A00 
2020-09-24 06:03:35.703 UTC [msp/identity] Sign -> DEBU 01f Sign: digest: 56339A77350C1A804A8058ACEF0550D108CCB7E266A5734533F7A286133E4D9C 
2020-09-24 06:03:35.732 UTC [channelCmd] readBlock -> DEBU 020 Received block:0 
2020-09-24 06:03:35.733 UTC [main] main -> INFO 021 Exiting.....
===================== Channel "mychannel" is created successfully ===================== 

Having all peers join the 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=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
2020-09-24 06:03:35.822 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:35.822 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:35.826 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2020-09-24 06:03:35.827 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A86070A5C08011A0C08B7EDB0FB0510...5F92D770B8D41A080A000A000A000A00 
2020-09-24 06:03:35.827 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: 1FC95717CF159E5BF071FA4D741025AB9BC17E307B1E7F11364BE1976D03F700 
2020-09-24 06:03:35.895 UTC [channelCmd] executeJoin -> INFO 006 Peer joined the channel!
2020-09-24 06:03:35.896 UTC [main] main -> INFO 007 Exiting.....
===================== PEER0 joined on the channel "mychannel" ===================== 

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=DEBUG
CORE_PEER_ADDRESS=peer1.org1.example.com:7051
2020-09-24 06:03:38.001 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:38.001 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:38.004 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2020-09-24 06:03:38.004 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A85070A5B08011A0B08BAEDB0FB0510...5F92D770B8D41A080A000A000A000A00 
2020-09-24 06:03:38.004 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: EF0E34FD2143F9EFFFB91C7593AABBCFC309C952E3AAB70DD675E67EBDBE0840 
2020-09-24 06:03:38.077 UTC [channelCmd] executeJoin -> INFO 006 Peer joined the channel!
2020-09-24 06:03:38.077 UTC [main] main -> INFO 007 Exiting.....
===================== PEER1 joined on the channel "mychannel" ===================== 

CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.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=Org2MSP
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/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
2020-09-24 06:03:40.144 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:40.144 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:40.148 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2020-09-24 06:03:40.148 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A85070A5B08011A0B08BCEDB0FB0510...5F92D770B8D41A080A000A000A000A00 
2020-09-24 06:03:40.148 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: 7E3D9471CB81833879C4AAA68D07B99ED16F344BEBEB88BED2985D49C236C0DC 
2020-09-24 06:03:40.197 UTC [channelCmd] executeJoin -> INFO 006 Peer joined the channel!
2020-09-24 06:03:40.197 UTC [main] main -> INFO 007 Exiting.....
===================== PEER2 joined on the channel "mychannel" ===================== 

CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.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=Org2MSP
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/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer1.org2.example.com:7051
2020-09-24 06:03:42.277 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:42.277 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:42.280 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2020-09-24 06:03:42.280 UTC [msp/identity] Sign -> DEBU 004 Sign: plaintext: 0A86070A5C08011A0C08BEEDB0FB0510...5F92D770B8D41A080A000A000A000A00 
2020-09-24 06:03:42.280 UTC [msp/identity] Sign -> DEBU 005 Sign: digest: 307429B2F0A712EB734DC605111D796A5FDE454D649BCDF4D1D4CF282A863C55 
2020-09-24 06:03:42.317 UTC [channelCmd] executeJoin -> INFO 006 Peer joined the channel!
2020-09-24 06:03:42.317 UTC [main] main -> INFO 007 Exiting.....
===================== PEER3 joined on the channel "mychannel" ===================== 

Updating anchor peers for org1...
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=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
2020-09-24 06:03:44.389 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:44.389 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:44.392 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2020-09-24 06:03:44.392 UTC [msp] GetLocalMSP -> DEBU 004 Returning existing local MSP
2020-09-24 06:03:44.392 UTC [msp] GetDefaultSigningIdentity -> DEBU 005 Obtaining default signing identity
2020-09-24 06:03:44.392 UTC [msp] GetLocalMSP -> DEBU 006 Returning existing local MSP
2020-09-24 06:03:44.392 UTC [msp] GetDefaultSigningIdentity -> DEBU 007 Obtaining default signing identity
2020-09-24 06:03:44.392 UTC [msp/identity] Sign -> DEBU 008 Sign: plaintext: 0A88060A074F7267314D535012FC052D...72731200220A0A0641646D696E731200 
2020-09-24 06:03:44.392 UTC [msp/identity] Sign -> DEBU 009 Sign: digest: CE0BBEE6477F6F778EE453DD7F6172D57C855AD11FC332755829725A2E195930 
2020-09-24 06:03:44.392 UTC [msp] GetLocalMSP -> DEBU 00a Returning existing local MSP
2020-09-24 06:03:44.392 UTC [msp] GetDefaultSigningIdentity -> DEBU 00b Obtaining default signing identity
2020-09-24 06:03:44.392 UTC [msp] GetLocalMSP -> DEBU 00c Returning existing local MSP
2020-09-24 06:03:44.393 UTC [msp] GetDefaultSigningIdentity -> DEBU 00d Obtaining default signing identity
2020-09-24 06:03:44.393 UTC [msp/identity] Sign -> DEBU 00e Sign: plaintext: 0ABF060A1508021A0608C0EDB0FB0522...71DB89122D78577A76A4201071ABD7A8 
2020-09-24 06:03:44.393 UTC [msp/identity] Sign -> DEBU 00f Sign: digest: 88B311AC32A7BEEF909651FEB7B79E909386ED503F0221447D0CEEAC27453BF1 
2020-09-24 06:03:44.456 UTC [main] main -> INFO 010 Exiting.....
===================== Anchor peers for org "Org1MSP" on "mychannel" is updated successfully ===================== 

Updating anchor peers for org2...
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.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=Org2MSP
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/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
2020-09-24 06:03:49.507 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:49.507 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:49.514 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized
2020-09-24 06:03:49.514 UTC [msp] GetLocalMSP -> DEBU 004 Returning existing local MSP
2020-09-24 06:03:49.514 UTC [msp] GetDefaultSigningIdentity -> DEBU 005 Obtaining default signing identity
2020-09-24 06:03:49.514 UTC [msp] GetLocalMSP -> DEBU 006 Returning existing local MSP
2020-09-24 06:03:49.514 UTC [msp] GetDefaultSigningIdentity -> DEBU 007 Obtaining default signing identity
2020-09-24 06:03:49.514 UTC [msp/identity] Sign -> DEBU 008 Sign: plaintext: 0A88060A074F7267324D535012FC052D...72731200220A0A0641646D696E731200 
2020-09-24 06:03:49.514 UTC [msp/identity] Sign -> DEBU 009 Sign: digest: A8F3368AF8D87033B10CB75AC0171242483FBDDDF710623AEF2D1ECB6D246921 
2020-09-24 06:03:49.515 UTC [msp] GetLocalMSP -> DEBU 00a Returning existing local MSP
2020-09-24 06:03:49.515 UTC [msp] GetDefaultSigningIdentity -> DEBU 00b Obtaining default signing identity
2020-09-24 06:03:49.515 UTC [msp] GetLocalMSP -> DEBU 00c Returning existing local MSP
2020-09-24 06:03:49.515 UTC [msp] GetDefaultSigningIdentity -> DEBU 00d Obtaining default signing identity
2020-09-24 06:03:49.515 UTC [msp/identity] Sign -> DEBU 00e Sign: plaintext: 0ABF060A1508021A0608C5EDB0FB0522...55111F568CFB353B048DB7829B697A59 
2020-09-24 06:03:49.515 UTC [msp/identity] Sign -> DEBU 00f Sign: digest: DF93F35003104A57C7C8A59332669DEC2695B0EDAC5CA0A7E02256EF8B7AA20E 
2020-09-24 06:03:49.559 UTC [main] main -> INFO 010 Exiting.....
===================== Anchor peers for org "Org2MSP" on "mychannel" is updated successfully ===================== 

Installing chaincode on org1/peer0...
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=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
2020-09-24 06:03:54.637 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:54.638 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:54.638 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2020-09-24 06:03:54.638 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2020-09-24 06:03:55.266 UTC [golang-platform] getCodeFromFS -> DEBU 005 getCodeFromFS github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02
2020-09-24 06:03:55.822 UTC [golang-platform] func1 -> DEBU 006 Discarding GOROOT package fmt
2020-09-24 06:03:55.822 UTC [golang-platform] func1 -> DEBU 007 Discarding provided package github.com/hyperledger/fabric/core/chaincode/shim
2020-09-24 06:03:55.822 UTC [golang-platform] func1 -> DEBU 008 Discarding provided package github.com/hyperledger/fabric/protos/peer
2020-09-24 06:03:55.822 UTC [golang-platform] func1 -> DEBU 009 Discarding GOROOT package strconv
2020-09-24 06:03:55.822 UTC [golang-platform] GetDeploymentPayload -> DEBU 00a done
2020-09-24 06:03:55.824 UTC [msp/identity] Sign -> DEBU 00b Sign: plaintext: 0A86070A5C08031A0C08CBEDB0FB0510...8BAEFF040000FFFF84DB3255002C0000 
2020-09-24 06:03:55.824 UTC [msp/identity] Sign -> DEBU 00c Sign: digest: 96E6D9272AB1D988DE69DF975A28FB8F8A142EA54D938D198973C019BBBEF948 
2020-09-24 06:03:55.828 UTC [chaincodeCmd] install -> DEBU 00d Installed remotely response:<status:200 payload:"OK" > 
2020-09-24 06:03:55.828 UTC [main] main -> INFO 00e Exiting.....
===================== Chaincode is installed on remote peer PEER0 ===================== 

Install chaincode on org2/peer2...
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.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=Org2MSP
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/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
2020-09-24 06:03:55.939 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:55.940 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:55.940 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2020-09-24 06:03:55.940 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2020-09-24 06:03:56.002 UTC [golang-platform] getCodeFromFS -> DEBU 005 getCodeFromFS github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02
2020-09-24 06:03:56.175 UTC [golang-platform] func1 -> DEBU 006 Discarding GOROOT package fmt
2020-09-24 06:03:56.175 UTC [golang-platform] func1 -> DEBU 007 Discarding provided package github.com/hyperledger/fabric/core/chaincode/shim
2020-09-24 06:03:56.175 UTC [golang-platform] func1 -> DEBU 008 Discarding provided package github.com/hyperledger/fabric/protos/peer
2020-09-24 06:03:56.175 UTC [golang-platform] func1 -> DEBU 009 Discarding GOROOT package strconv
2020-09-24 06:03:56.175 UTC [golang-platform] GetDeploymentPayload -> DEBU 00a done
2020-09-24 06:03:56.179 UTC [msp/identity] Sign -> DEBU 00b Sign: plaintext: 0A85070A5B08031A0B08CCEDB0FB0510...8BAEFF040000FFFF84DB3255002C0000 
2020-09-24 06:03:56.179 UTC [msp/identity] Sign -> DEBU 00c Sign: digest: 2A11FA33DEFC09AF44B6DBD74145C6268B7B7F5D2D07DD79833515BBC4EB302B 
2020-09-24 06:03:56.186 UTC [chaincodeCmd] install -> DEBU 00d Installed remotely response:<status:200 payload:"OK" > 
2020-09-24 06:03:56.186 UTC [main] main -> INFO 00e Exiting.....
===================== Chaincode is installed on remote peer PEER2 ===================== 

Instantiating chaincode on org2/peer2...
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.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=Org2MSP
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/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer0.org2.example.com:7051
2020-09-24 06:03:56.239 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:03:56.239 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:03:56.242 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2020-09-24 06:03:56.242 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2020-09-24 06:03:56.242 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A90070A6608031A0B08CCEDB0FB0510...324D53500A04657363630A0476736363 
2020-09-24 06:03:56.242 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: 135B4574B3AB6306330828AD313204BBC9C2EF3E5D33572E7333F02F4C312733 
2020-09-24 06:04:20.617 UTC [msp/identity] Sign -> DEBU 007 Sign: plaintext: 0A90070A6608031A0B08CCEDB0FB0510...1AA6B5B27683580A87310BC79AC46E3E 
2020-09-24 06:04:20.617 UTC [msp/identity] Sign -> DEBU 008 Sign: digest: 77FD9776C5844429F4A45B4F98499A9F45AD33998FE8DF510DF62A781F339F22 
2020-09-24 06:04:20.621 UTC [main] main -> INFO 009 Exiting.....
===================== Chaincode Instantiation on PEER2 on channel 'mychannel' is successful ===================== 

Querying chaincode on org1/peer0...
===================== Querying on PEER0 on channel 'mychannel'... ===================== 
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=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
Attempting to Query PEER0 ...3 secs

2020-09-24 06:04:23.794 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:04:23.795 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:04:23.795 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2020-09-24 06:04:23.795 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2020-09-24 06:04:23.798 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A91070A6708031A0C08E7EDB0FB0510...6D7963631A0A0A0571756572790A0161 
2020-09-24 06:04:23.798 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: 21B941E99A3C8C6AD6FB5661499F8DE8045AE9FE6E403C7B59ADEE113F4C59D9 
Query Result: 100
2020-09-24 06:04:44.543 UTC [main] main -> INFO 007 Exiting.....
===================== Query on PEER0 on channel 'mychannel' is successful ===================== 
Sending invoke transaction on org1/peer0...
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=DEBUG
CORE_PEER_ADDRESS=peer0.org1.example.com:7051
2020-09-24 06:04:44.700 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:04:44.700 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:04:44.702 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2020-09-24 06:04:44.702 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2020-09-24 06:04:44.702 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A91070A6708031A0C08FCEDB0FB0510...696E766F6B650A01610A01620A023130 
2020-09-24 06:04:44.702 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: 0638FE536E7005EBCEA47F0CF3D65C8D441E7776CF800D3A4C3F2306CF3F681B 
2020-09-24 06:04:44.719 UTC [msp/identity] Sign -> DEBU 007 Sign: plaintext: 0A91070A6708031A0C08FCEDB0FB0510...060BE069770A9E6C00A400AF6CB2E539 
2020-09-24 06:04:44.719 UTC [msp/identity] Sign -> DEBU 008 Sign: digest: F039995E54AECAE7B91FCF2FA22CED099637CF87F6077BB49D662DA6AD4B933F 
2020-09-24 06:04:44.725 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> DEBU 009 ESCC invoke result: version:1 response:<status:200 message:"OK" > payload:"\n \rS-\342\361Y\335?*\201\351N\005\230o\277X\230i\272a\334^\344\210\234\033\316\200J_<\022Y\nE\022\024\n\004lscc\022\014\n\n\n\004mycc\022\002\010\003\022-\n\004mycc\022%\n\007\n\001a\022\002\010\003\n\007\n\001b\022\002\010\003\032\007\n\001a\032\00290\032\010\n\001b\032\003210\032\003\010\310\001\"\013\022\004mycc\032\0031.0" endorsement:<endorser:"\n\007Org1MSP\022\200\006-----BEGIN -----\nMIICGTCCAb+gAwIBAgIQIZPhuFKON7Dh0xFNWEO7AzAKBggqhkjOPQQDAjBzMQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu\nb3JnMS5leGFtcGxlLmNvbTAeFw0yMDA5MjQwNjAzMjFaFw0zMDA5MjIwNjAzMjFa\nMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T\nYW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMC5vcmcxLmV4YW1wbGUuY29tMFkw\nEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEXbaYHsF2xGrK5cBDcmglRok/AMWCcK9n\npkZXPTp0IG0ton3ymR3MPkQmdaM2r/SgB6mLdeqvGbOR++A0d5ordKNNMEswDgYD\nVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgv4/KeWE5IHBe\naPsMw/1zyM5IiduLeFOiwQtdspNmj7IwCgYIKoZIzj0EAwIDSAAwRQIhAJIKngNQ\nSg6LYwF3IKNPlzQV4smJYVHhiJ2duJYelbCnAiAaZgQkPDJ/noDgaEaYSr1OQDJ0\nTNAFAC2ewt9H5qoObw==\n-----END -----\n" signature:"0D\002 n\357HA\236\3571o\336\215\334\362\341\354}?W\301\027\246=bn(\034J\246\213g\224KT\002 )\303\236\313\347c\003_C8\306\315<\367j\316\006\013\340iw\n\236l\000\244\000\257l\262\3459" > 
2020-09-24 06:04:44.726 UTC [chaincodeCmd] chaincodeInvokeOrQuery -> INFO 00a Chaincode invoke successful. result: status:200 
2020-09-24 06:04:44.726 UTC [main] main -> INFO 00b Exiting.....
===================== Invoke transaction on PEER0 on channel 'mychannel' is successful ===================== 

Installing chaincode on org2/peer3...
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.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=Org2MSP
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/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer1.org2.example.com:7051
2020-09-24 06:04:44.821 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:04:44.821 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:04:44.821 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2020-09-24 06:04:44.821 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2020-09-24 06:04:45.003 UTC [golang-platform] getCodeFromFS -> DEBU 005 getCodeFromFS github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02
2020-09-24 06:04:45.239 UTC [golang-platform] func1 -> DEBU 006 Discarding GOROOT package fmt
2020-09-24 06:04:45.239 UTC [golang-platform] func1 -> DEBU 007 Discarding provided package github.com/hyperledger/fabric/core/chaincode/shim
2020-09-24 06:04:45.239 UTC [golang-platform] func1 -> DEBU 008 Discarding provided package github.com/hyperledger/fabric/protos/peer
2020-09-24 06:04:45.239 UTC [golang-platform] func1 -> DEBU 009 Discarding GOROOT package strconv
2020-09-24 06:04:45.239 UTC [golang-platform] GetDeploymentPayload -> DEBU 00a done
2020-09-24 06:04:45.260 UTC [msp/identity] Sign -> DEBU 00b Sign: plaintext: 0A85070A5B08031A0B08FDEDB0FB0510...8BAEFF040000FFFF84DB3255002C0000 
2020-09-24 06:04:45.260 UTC [msp/identity] Sign -> DEBU 00c Sign: digest: A67215B0359AC06B8937C654F6AC7CA853C6DBCBA9D4ACA38758FACAFD448734 
2020-09-24 06:04:45.280 UTC [chaincodeCmd] install -> DEBU 00d Installed remotely response:<status:200 payload:"OK" > 
2020-09-24 06:04:45.280 UTC [main] main -> INFO 00e Exiting.....
===================== Chaincode is installed on remote peer PEER3 ===================== 

Querying chaincode on org2/peer3...
===================== Querying on PEER3 on channel 'mychannel'... ===================== 
CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.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=Org2MSP
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/org2.example.com/users/Admin@org2.example.com/msp
CORE_PEER_ID=cli
CORE_LOGGING_LEVEL=DEBUG
CORE_PEER_ADDRESS=peer1.org2.example.com:7051
Attempting to Query PEER3 ...3 secs

2020-09-24 06:04:48.368 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2020-09-24 06:04:48.368 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2020-09-24 06:04:48.368 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2020-09-24 06:04:48.368 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
2020-09-24 06:04:48.368 UTC [msp/identity] Sign -> DEBU 005 Sign: plaintext: 0A91070A6708031A0C0880EEB0FB0510...6D7963631A0A0A0571756572790A0161 
2020-09-24 06:04:48.368 UTC [msp/identity] Sign -> DEBU 006 Sign: digest: 4A1E7EE3E79A10E47F765C9832AC153022C90FFFAECD020608AEBBD33CD2277B 
Query Result: 90
2020-09-24 06:05:07.907 UTC [main] main -> INFO 007 Exiting.....
===================== Query on PEER3 on channel 'mychannel' is successful ===================== 

===================== All GOOD, End-2-End execution completed ===================== 


 _____   _   _   ____            _____   ____    _____ 
| ____| | \ | | |  _ \          | ____| |___ \  | ____|
|  _|   |  \| | | | | |  _____  |  _|     __) | |  _|  
| |___  | |\  | | |_| | |_____| | |___   / __/  | |___ 
|_____| |_| \_| |____/          |_____| |_____| |_____|

2、手動測驗一下Fabric網路

我們仍然是以現在安裝好的Example02為例,在官方例子中,channel名字是mychannel,鏈碼的名字是mycc,我們首先進入CLI,我們重新打開一個命令列視窗,輸入:

docker exec -it cli bash

運行以下命令可以查詢a賬戶的余額:

peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}'

在這里插入圖片描述
然后,我們試一試把a賬戶的余額再轉80元給b賬戶,運行命令:

peer chaincode invoke -o orderer.example.com:7050  --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  -C mychannel -n mycc -c '{"Args":["invoke","a","b","80"]}'

運行結果如下圖:
在這里插入圖片描述
現在轉賬完畢, 我們試一試再查詢一下a賬戶的余額,沒問題的話,應該是只剩下10塊大洋了,我們看看實際情況:
在這里插入圖片描述
bingo,正如我們所愿,

3、關閉Fabric網路

最后我們要關閉Fabric網路,首先需要運行exit命令退出cli容器,關閉Fabric的命令與啟動類似,命令為:

cd ~/go/src/github.com/hyperledger/fabric/examples/e2e_cli
./network_setup.sh down

程序如下:

halfape@halfape-VirtualBox:~/go/src/github.com/hyperledger/fabric/examples/e2e_cli$ ./network_setup.sh down
setting to default channel 'mychannel'
WARNING: The CHANNEL_NAME variable is not set. Defaulting to a blank string.
WARNING: The TIMEOUT variable is not set. Defaulting to a blank string.
Stopping cli                    ... done
Stopping peer0.org1.example.com ... done
Stopping peer0.org2.example.com ... done
Stopping orderer.example.com    ... done
Stopping peer1.org2.example.com ... done
Stopping peer1.org1.example.com ... done
Removing cli                    ... done
Removing peer0.org1.example.com ... done
Removing peer0.org2.example.com ... done
Removing orderer.example.com    ... done
Removing peer1.org2.example.com ... done
Removing peer1.org1.example.com ... done
Removing network e2ecli_default
49c35a7144ed
1757636a5f53
425fba1bd2d7
Untagged: dev-peer1.org2.example.com-mycc-1.0:latest
Deleted: sha256:9e7b2495f4433d5b0f5eb3a876f74a246cb37af919e5b47d567505ae77f83df4
Deleted: sha256:fd93b79a499dc6e372009449bfe7a913a8695941052467c1f63eb6b86a001786
Deleted: sha256:66d9b3022ef4fc06246be09a9dfe1afe493d6cecff955f77fa8ad583b1ecbbbf
Deleted: sha256:64ec50d0ff3b4c6f1eb678ddc8ec8c0866cf98f300a925175e964fa45090c930
Deleted: sha256:cb08a8077c6f7451b589da007ea0877f1bf7393fcf3f773e4907e7e0985890ef
Deleted: sha256:f53aee1e74e529c3af7bb8d5acb750bf00f85e27af7b49f47ff8095ff5c8d575
Deleted: sha256:fe91dc1cbc204858760cc561b545038d9d8b5965ffca853ece60a59deb7eba92
Untagged: dev-peer0.org1.example.com-mycc-1.0:latest
Deleted: sha256:107d6723dd0cd2633ecf004dc6612fca57709d2dba90a657d9072534a6477c9b
Deleted: sha256:bfc9fc6475aac3b7f446171b677a6554227a3e8a0c066d28c2af679c060a6e1d
Deleted: sha256:2a5d86ab68ff3d8b4fe320754f844daef9ad76e5b8a14ec1bd09f87570cd6165
Deleted: sha256:917f297dddfd0bb4fa50928e9a43a3eea526b3b985bcccda01bafdd3f4a1b90f
Deleted: sha256:f423d7575cb773000a2fbe0dca51aa215d00bd91d8fbb37c4c26378af8134813
Deleted: sha256:fa96f0e5805e6b00d2e95b6e798dfa7470fb7431855eed4399a22bc2fc270c0c
Deleted: sha256:6586cb10d4d95034a464d7dba9f2fe509bf80413e6c30ac3119330d92f20cb40
Untagged: dev-peer0.org2.example.com-mycc-1.0:latest
Deleted: sha256:8370b1cd876644e610eb2ff362f29c96538370f7d4f513e010801cfce3a63ace
Deleted: sha256:f2190cdc9c8235ab0d9f37975a71923c7fd498fa517533e527d87bbaddbbf4ea
Deleted: sha256:e5d2ead105e3246c0cdcc1be6c8ac78fb11d959564839a2b41c147962e37cbb4
Deleted: sha256:a592dd4f7d4346b5921d6dc7fd48652bfa70907e40e04942382cdd16329be9ef
Deleted: sha256:92bae31265fc9a8bbcf394328f7855a64ef8c13b1885e21015b5accc7b9e487c
Deleted: sha256:5b34425a5f4db01b75d04a1b4f9acd367a9378a5834f77b99c441df323d1e52b
Deleted: sha256:4298b29759ca67c745a5fca6da441dd2e74d1a4802159afd1fd001a354b33d73
halfape@halfape-VirtualBox:~/go/src/github.com/hyperledger/fabric/examples/e2e_cli$ 

參考文章:

https://blog.csdn.net/jambeau/article/details/103712408
https://www.cnblogs.com/studyzy/p/7437157.html

寫在最后

感謝上面兩位大佬的貢獻,我個人在此基礎上進行了整合,自己也是排了很多雷,終于成功了,如果你覺得這篇文章對你有所幫助,關注微信公眾號半路猿,拉你進我們的學習交流群,一起學習,一同成長,

轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/125195.html

標籤:其他

上一篇:銀行與BitcoinSV:位元幣誠實的原始設計將帶來全新的商業機會

下一篇:Mysql8.0.17安裝(windows10)

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • GPU虛擬機創建時間深度優化

    **?桔妹導讀:**GPU虛擬機實體創建速度慢是公有云面臨的普遍問題,由于通常情況下創建虛擬機屬于低頻操作而未引起業界的重視,實際生產中還是存在對GPU實體創建時間有苛刻要求的業務場景。本文將介紹滴滴云在解決該問題時的思路、方法、并展示最終的優化成果。 從公有云服務商那里購買過虛擬主機的資深用戶,一 ......

    uj5u.com 2020-09-10 06:09:13 more
  • 可編程網卡芯片在滴滴云網路的應用實踐

    **?桔妹導讀:**隨著云規模不斷擴大以及業務層面對延遲、帶寬的要求越來越高,采用DPDK 加速網路報文處理的方式在橫向縱向擴展都出現了局限性。可編程芯片成為業界熱點。本文主要講述了可編程網卡芯片在滴滴云網路中的應用實踐,遇到的問題、帶來的收益以及開源社區貢獻。 #1. 資料中心面臨的問題 隨著滴滴 ......

    uj5u.com 2020-09-10 06:10:21 more
  • 滴滴資料通道服務演進之路

    **?桔妹導讀:**滴滴資料通道引擎承載著全公司的資料同步,為下游實時和離線場景提供了必不可少的源資料。隨著任務量的不斷增加,資料通道的整體架構也隨之發生改變。本文介紹了滴滴資料通道的發展歷程,遇到的問題以及今后的規劃。 #1. 背景 資料,對于任何一家互聯網公司來說都是非常重要的資產,公司的大資料 ......

    uj5u.com 2020-09-10 06:11:05 more
  • 滴滴AI Labs斬獲國際機器翻譯大賽中譯英方向世界第三

    **桔妹導讀:**深耕人工智能領域,致力于探索AI讓出行更美好的滴滴AI Labs再次斬獲國際大獎,這次獲獎的專案是什么呢?一起來看看詳細報道吧! 近日,由國際計算語言學協會ACL(The Association for Computational Linguistics)舉辦的世界最具影響力的機器 ......

    uj5u.com 2020-09-10 06:11:29 more
  • MPP (Massively Parallel Processing)大規模并行處理

    1、什么是mpp? MPP (Massively Parallel Processing),即大規模并行處理,在資料庫非共享集群中,每個節點都有獨立的磁盤存盤系統和記憶體系統,業務資料根據資料庫模型和應用特點劃分到各個節點上,每臺資料節點通過專用網路或者商業通用網路互相連接,彼此協同計算,作為整體提供 ......

    uj5u.com 2020-09-10 06:11:41 more
  • 滴滴資料倉庫指標體系建設實踐

    **桔妹導讀:**指標體系是什么?如何使用OSM模型和AARRR模型搭建指標體系?如何統一流程、規范化、工具化管理指標體系?本文會對建設的方法論結合滴滴資料指標體系建設實踐進行解答分析。 #1. 什么是指標體系 ##1.1 指標體系定義 指標體系是將零散單點的具有相互聯系的指標,系統化的組織起來,通 ......

    uj5u.com 2020-09-10 06:12:52 more
  • 單表千萬行資料庫 LIKE 搜索優化手記

    我們經常在資料庫中使用 LIKE 運算子來完成對資料的模糊搜索,LIKE 運算子用于在 WHERE 子句中搜索列中的指定模式。 如果需要查找客戶表中所有姓氏是“張”的資料,可以使用下面的 SQL 陳述句: SELECT * FROM Customer WHERE Name LIKE '張%' 如果需要 ......

    uj5u.com 2020-09-10 06:13:25 more
  • 滴滴Ceph分布式存盤系統優化之鎖優化

    **桔妹導讀:**Ceph是國際知名的開源分布式存盤系統,在工業界和學術界都有著重要的影響。Ceph的架構和演算法設計發表在國際系統領域頂級會議OSDI、SOSP、SC等上。Ceph社區得到Red Hat、SUSE、Intel等大公司的大力支持。Ceph是國際云計算領域應用最廣泛的開源分布式存盤系統, ......

    uj5u.com 2020-09-10 06:14:51 more
  • es~通過ElasticsearchTemplate進行聚合~嵌套聚合

    之前寫過《es~通過ElasticsearchTemplate進行聚合操作》的文章,這一次主要寫一個嵌套的聚合,例如先對sex集合,再對desc聚合,最后再對age求和,共三層嵌套。 Aggregations的部分特性類似于SQL語言中的group by,avg,sum等函式,Aggregation ......

    uj5u.com 2020-09-10 06:14:59 more
  • 爬蟲日志監控 -- Elastc Stack(ELK)部署

    傻瓜式部署,只需替換IP與用戶 導讀: 現ELK四大組件分別為:Elasticsearch(核心)、logstash(處理)、filebeat(采集)、kibana(可視化) 下載均在https://www.elastic.co/cn/downloads/下tar包,各組件版本最好一致,配合fdm會 ......

    uj5u.com 2020-09-10 06:15:05 more
最新发布
  • day02-2-商鋪查詢快取

    功能02-商鋪查詢快取 3.商鋪詳情快取查詢 3.1什么是快取? 快取就是資料交換的緩沖區(稱作Cache),是存盤資料的臨時地方,一般讀寫性能較高。 快取的作用: 降低后端負載 提高讀寫效率,降低回應時間 快取的成本: 資料一致性成本 代碼維護成本 運維成本 3.2需求說明 如下,當我們點擊商店詳 ......

    uj5u.com 2023-04-20 08:33:24 more
  • MySQL中binlog備份腳本分享

    關于MySQL的二進制日志(binlog),我們都知道二進制日志(binlog)非常重要,尤其當你需要point to point災難恢復的時侯,所以我們要對其進行備份。關于二進制日志(binlog)的備份,可以基于flush logs方式先切換binlog,然后拷貝&壓縮到到遠程服務器或本地服務器 ......

    uj5u.com 2023-04-20 08:28:06 more
  • day02-短信登錄

    功能實作02 2.功能01-短信登錄 2.1基于Session實作登錄 2.1.1思路分析 2.1.2代碼實作 2.1.2.1發送短信驗證碼 發送短信驗證碼: 發送驗證碼的介面為:http://127.0.0.1:8080/api/user/code?phone=xxxxx<手機號> 請求方式:PO ......

    uj5u.com 2023-04-20 08:27:27 more
  • 快取與資料庫雙寫一致性幾種策略分析

    本文將對幾種快取與資料庫保證資料一致性的使用方式進行分析。為保證高并發性能,以下分析場景不考慮執行的原子性及加鎖等強一致性要求的場景,僅追求最終一致性。 ......

    uj5u.com 2023-04-20 08:26:48 more
  • sql陳述句優化

    問題查找及措施 問題查找 需要找到具體的代碼,對其進行一對一優化,而非一直把關注點放在服務器和sql平臺 降低簡化每個事務中處理的問題,盡量不要讓一個事務拖太長的時間 例如檔案上傳時,應將檔案上傳這一步放在事務外面 微軟建議 4.啟動sql定時執行計劃 怎么啟動sqlserver代理服務-百度經驗 ......

    uj5u.com 2023-04-20 08:26:35 more
  • 云時代,MySQL到ClickHouse資料同步產品對比推薦

    ClickHouse 在執行分析查詢時的速度優勢很好的彌補了MySQL的不足,但是對于很多開發者和DBA來說,如何將MySQL穩定、高效、簡單的同步到 ClickHouse 卻很困難。本文對比了 NineData、MaterializeMySQL(ClickHouse自帶)、Bifrost 三款產品... ......

    uj5u.com 2023-04-20 08:26:29 more
  • sql陳述句優化

    問題查找及措施 問題查找 需要找到具體的代碼,對其進行一對一優化,而非一直把關注點放在服務器和sql平臺 降低簡化每個事務中處理的問題,盡量不要讓一個事務拖太長的時間 例如檔案上傳時,應將檔案上傳這一步放在事務外面 微軟建議 4.啟動sql定時執行計劃 怎么啟動sqlserver代理服務-百度經驗 ......

    uj5u.com 2023-04-20 08:25:13 more
  • Redis 報”OutOfDirectMemoryError“(堆外記憶體溢位)

    Redis 報錯“OutOfDirectMemoryError(堆外記憶體溢位) ”問題如下: 一、報錯資訊: 使用 Redis 的業務介面 ,產生 OutOfDirectMemoryError(堆外記憶體溢位),如圖: 格式化后的報錯資訊: { "timestamp": "2023-04-17 22: ......

    uj5u.com 2023-04-20 08:24:54 more
  • day02-2-商鋪查詢快取

    功能02-商鋪查詢快取 3.商鋪詳情快取查詢 3.1什么是快取? 快取就是資料交換的緩沖區(稱作Cache),是存盤資料的臨時地方,一般讀寫性能較高。 快取的作用: 降低后端負載 提高讀寫效率,降低回應時間 快取的成本: 資料一致性成本 代碼維護成本 運維成本 3.2需求說明 如下,當我們點擊商店詳 ......

    uj5u.com 2023-04-20 08:24:03 more
  • day02-短信登錄

    功能實作02 2.功能01-短信登錄 2.1基于Session實作登錄 2.1.1思路分析 2.1.2代碼實作 2.1.2.1發送短信驗證碼 發送短信驗證碼: 發送驗證碼的介面為:http://127.0.0.1:8080/api/user/code?phone=xxxxx<手機號> 請求方式:PO ......

    uj5u.com 2023-04-20 08:23:11 more