2021-04-17-如何在已有组织中增加节点


title: 如何在已有组织中增加节点
date: 2021-04-17 19:04:25
categories:

  • Hyperledger Fabric
    tags:
  • Hyperledger Fabric

fabric网络在创建时就已经确定了初始的节点数量,而在实际应用场景中可能会需要在某个组织中动态增加节点。

这里讲述两种方式

一种是cryptogen工具生成新节点加入到网络中去(现实没有意义)

一种是用fabric-ca生成新节点加入到网络中去

方法一:cryptogen工具

一、追加新节点的身份信息

在这之前可参照fabric solo节点测试搭建一个fabric网络

首先需要在组织org1的MSP目录中追加新节点的证书和私钥信息,主要是用到cryptogen工具

1.修改crypto-config.yaml文件(或者直接新建一个文件)中Template字段里的count参数,设置为需要该组织中存在的节点总数,可一次增加多个节点。

这里只在org1加入一个节点,所以crypto-config.yaml文件修改部分如下:

PeerOrgs:
  - Name: Org1
    Domain: org1.example.com
    EnableNodeOUs: true
    Template:
      Count: 2  #之前是1
    Users:
      Count: 1

2.执行extend命令完成追加操作 在此文件目录下执行:

cryptogen extend --config=./crypto-config.yaml

可在crypto-config/peerOrganizations/org1.example.com/peers/下发现新增加的peer1.org1.example.com文件夹

注:–config参数应以实际情况下配置文件的名称及路径为准

3.启动容器

在docker-compose.yaml文件中加入新节点信息

version: '2'
volumes:
  orderer.example.com:
  peer0.org1.example.com:
  peer1.org1.example.com:   //加这里
networks:
  test:
  peer1.org1.example.com:
    container_name: peer1.org1.example.com
    image: hyperledger/fabric-peer:latest
    environment:
      #Generic peer variables
      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
      # the following setting starts chaincode containers on the same
      # bridge network as the peers
      # https://docs.docker.com/compose/networking/
      - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=fixtures_test
      - FABRIC_LOGGING_SPEC=DEBUG
      #- FABRIC_LOGGING_SPEC=DEBUG
      - CORE_PEER_TLS_ENABLED=true
      - CORE_PEER_PROFILE_ENABLED=true
      - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
      - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
      - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
      # Peer specific variabes
      - CORE_PEER_ID=peer1.org1.example.com
      - CORE_PEER_ADDRESS=peer1.org1.example.com:8051
      - CORE_PEER_LISTENADDRESS=0.0.0.0:8051
      - CORE_PEER_CHAINCODEADDRESS=peer1.org1.example.com:8052
      - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:8052
      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:8051
      - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:8051
      - CORE_PEER_LOCALMSPID=Org1MSP
#      - CORE_LEDGER_STATE_STATEDATABASE=CouchDB
#      - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb1:5984
#      - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME=admin
#      - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD=123456
    volumes:
        - /var/run/:/host/var/run/
        - ./crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/msp
        - ./crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/tls
        - peer1.org1.example.com:/var/hyperledger/production
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
    command: peer node start
    ports:
      - 8051:8051
    depends_on:
      - orderer.example.com
      #- couchdb.org1.example.com
    networks:
      - test

启动该docker容器:

docker-compose -f docker-compose.yaml up peer1.org1.example.com
二、新节点加入通道

此时该节点并没有加入到任何一个通道中,需要进入 cli 容器执行添加操作。

1、进入 cli 命令行,之后的所有操作均在容器内部进行:

$ docker exec -it cli bash

2、设置环境变量,使 cli 切换到 peer1.org1.example.com 下:

export CORE_PEER_ADDRESS=peer1.org1.example.com:8051
export CORE_PEER_TLS_CERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.crt
export CORE_PEER_TLS_KEY_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.key
export CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt

3、从 orderer 上拉取通道的创世区块:

peer channel fetch oldest mychannel.block -c mychannel -o orderer.example.com:7050 --tls --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
显示:
2020-12-09 07:17:52.078 UTC [channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
2020-12-09 07:17:52.079 UTC [cli/common] readBlock -> INFO 002 Received block: 0

4、加入通道:

peer channel join -b mychannel.block  -o orderer.example.com:7050

5、安装链码

peer lifecycle chaincode install sacc.tar.gz

6、使用以下命令查询已安装的链码。

peer lifecycle chaincode queryinstalled
Installed chaincodes on peer:
Package ID: sacc_1:0b6ac7f5af4b129ec288b71b14dcd05e55b04f252cfabb7747781332bd073e96, Label: sacc_1

7、使用以下命令查询链码。

peer chaincode query -C mychannel -n sacc -c '{"Args":["get","name"]}'

输出:

ab

方法二:fabric-ca

此文章接上篇[fabric-ca详解](https://chaincode.gitee

[.io/chaincode/2021/04/15/fabric-ca详解/)。

在这之前可参照fabric solo节点测试搭建一个fabric网络

然后参照手动生成ca证书搭建fabric网络

怎么说呢 试了好久,本来打算在cryptogen工具生成一个节点启动的情况下,用ca再注册一个节点启动,但中间出现了各种问题,教程里的ca注册msp和tls用的是一个ca证书,而cryptogen里面明显两个证书是不一样的。。。。。可能这条路是错的   ca注册节点启动要从头开始。即所有东西都由ca注册。

一、 TLS CA服务器

1、启动TLS CA服务器

在docker-compose.yaml文件中加入以下内容:

  ca-tls:
    container_name: ca-tls
    image: hyperledger/fabric-ca:1.4.9
    command: sh -c 'fabric-ca-server start -d -b tls-ca-admin:tls-ca-adminpw --port 7052'
    environment:
      - FABRIC_CA_SERVER_HOME=/etc/hyperledger/fabric-ca-server-config/tls
      - FABRIC_CA_SERVER_TLS_ENABLED=true
      - FABRIC_CA_SERVER_CSR_CN=ca-tls
      - FABRIC_CA_SERVER_CSR_HOSTS=0.0.0.0
      - FABRIC_CA_SERVER_DEBUG=true
    volumes:
      - ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
    networks:
      - test
    ports:
      - 7052:7052

启动该docker容器:

docker-compose -f docker-compose.yaml up ca-tls

如果命令行出现以下内容则说明启动成功:

[INFO] Listening on https://0.0.0.0:7052

同时工作目录下会出现一个tls的文件夹。

2、注册用户

第一步是在TLS CA服务器中注册用户,经过注册的用户才拥有TLS证书

打开一个新的终端输入以下命令:

#设置环境变量指定根证书的路径(如果工作目录不同的话记得指定自己的工作目录,以下不再重复说明)
 export FABRIC_CA_CLIENT_TLS_CERTFILES=/Users/tianzhiwei/hyperledger/catest/fixtures/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem
#设置环境变量指定CA客户端的HOME文件夹
export FABRIC_CA_CLIENT_HOME=/Users/tianzhiwei/hyperledger/catest/fixtures/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com
#登录管理员用户用于之后的节点身份注册
fabric-ca-client enroll -d -u https://admin:adminpw@0.0.0.0:7054

登录成功在工作目录下的tls文件夹下将出现一个admin文件夹,这里面是admin的相关证书文件.
并且只有登录了admin,才具有权限进行用户的注册,因为该用户具有CA的全部权限,相当于CA服务器的root用户。
接下来对各个节点进行注册。

fabric-ca-client register -d --id.name peer1.org1.example.com --id.secret peer1PW --id.type peer -u https://0.0.0.0:7052
  • id.name是指定用户的名称
  • --id.secert是指定密码
  • --id.type是指定用户类型,用户类型默认为client,主要包括peer,app,user,orderer.
  • -u则是指定请求CA服务器的URL。

这里我们为各个节点注册TLS证书,之后Fabric网络的通信则需要通过这一步骤注册过的用户的TLS证书来进行TLS加密通信。
到这里我们只是注册了各个节点的身份,还没有获取到他们的证书。证书可以通过登录获取,不过暂时不着急获取他们的TLS证书。

二 、ca.org1.example.com 服务器

1、修改 ca.org1.example.com 文件
 ca.org1.example.com:
    image: hyperledger/fabric-ca:1.4.9
    container_name: ca.org1.example.com
    environment:
      - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server-config/org1/crypto
      - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com
      - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem
      - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/priv_sk
      - FABRIC_CA_SERVER_TLS_ENABLED=true
      - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem
      - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/priv_sk
    ports:
      - 7054:7054
    command: /bin/bash -c 'fabric-ca-server start -d -b org1-admin:org1-adminpw'
    volumes:
      - ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
    networks:
      - test

重启容器

docker-compose -f docker-compose.yaml restart ca.org1.example.com

打开新的终端,配置环境变量:

export FABRIC_CA_CLIENT_TLS_CERTFILES=/Users/tianzhiwei/hyperledger/catest/fixtures/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem
export FABRIC_CA_CLIENT_HOME=/Users/tianzhiwei/hyperledger/catest/fixtures/crypto-config/peerOrganizations/org1.example.com/ca

登录CA服务器管理员身份:

fabric-ca-client enroll -d -u https://org1-admin:org1-adminpw@0.0.0.0:7054

注册peer1:

fabric-ca-client register -d --id.name peer1.org1.example.com --id.secret peer1PW --id.type peer -u https://0.0.0.0:7054

设置 Org1 的 CA
rca-org1:
   container_name: rca-org1
   image: hyperledger/fabric-ca
   command: /bin/bash -c 'fabric-ca-server start -d -b rca-org1-admin:rca-org1-adminpw'
   environment:
      - FABRIC_CA_SERVER_HOME=/tmp/hyperledger/fabric-ca/crypto
      - FABRIC_CA_SERVER_TLS_ENABLED=true
      - FABRIC_CA_SERVER_CSR_CN=rca-org1
      - FABRIC_CA_SERVER_CSR_HOSTS=0.0.0.0
      - FABRIC_CA_SERVER_DEBUG=true
   volumes:
      - /tmp/hyperledger/org1/ca:/tmp/hyperledger/fabric-ca
   networks:
      - fabric-ca
   ports:
      - 7054:7054

注册 Org1 的 CA 管理员

您将发出以下命令来注册 CA 管理员,然后注册 Org1 的两个身份。

  • 正在注册以下身份:

    对等 1 (peer1-org1)

    对等 2 (peer2-org1)

    管理员 (admin1-org1)

    最终用户 (user-org1)

export FABRIC_CA_CLIENT_TLS_CERTFILES=/tmp/hyperledger/org1/ca/crypto/ca-cert.pem
export FABRIC_CA_CLIENT_HOME=/tmp/hyperledger/org1/ca/admin
fabric-ca-client enroll -d -u https://rca-org1-admin:rca-org1-adminpw@0.0.0.0:7054
fabric-ca-client register -d --id.name peer1.org1.example.com --id.secret peer1PW --id.type peer -u https://0.0.0.0:7054
fabric-ca-client register -d --id.name peer2-org1 --id.secret peer2PW --id.type peer -u https://0.0.0.0:7054
fabric-ca-client register -d --id.name admin-org1 --id.secret org1AdminPW --id.type user -u https://0.0.0.0:7054
fabric-ca-client register -d --id.name user-org1 --id.secret org1UserPW --id.type user -u https://0.0.0.0:7054

设置 Org1 的对等点

Org1 的管理员将使用其 CA 注册对等点,然后启动对等点 docker 容器。在启动对等点之前,您需要向 CA 注册对等点身份以获取对等点将使用的 MSP。这称为本地对等 MSP。

注册 Peer1

如果运行 Peer1 的主机没有 fabric-ca-client 二进制文件,请参阅上面的说明下载二进制文件。

在下面的命令中,我们将假设 Org1 的受信任根证书已复制到/tmp/hyperledger/org1/peer1/assets/ca/org1-ca-cert.pem Peer1 的主机上。获取签名证书是一个带外过程。 docker exec -it cli bash

export FABRIC_CA_CLIENT_TLS_CERTFILES=/Users/tianzhiwei/hyperledger/catest/fixtures/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem
export FABRIC_CA_CLIENT_HOME=/Users/tianzhiwei/hyperledger/catest/fixtures/crypto-config/peerOrganizations/org1.example.com/ca

export FABRIC_CA_CLIENT_MSPDIR=msp
fabric-ca-client enroll -d -u https://peer1.org1.example.com:peer1PW@0.0.0.0:7054

下一步是获取对等方的 TLS 加密材料。这需要再次注册,但这次您将针对tlsTLS CA 上的配置文件进行注册。您还需要在注册请求中提供 Peer1 主机的地址作为csr.hosts标志的输入。在下面的命令中,我们将假设 TLS CA 的证书已复制到 /tmp/hyperledger/org1/peer1/assets/tls-ca/tls-ca-cert.pem Peer1 的主机上。

export FABRIC_CA_CLIENT_MSPDIR=tls-msp
export FABRIC_CA_CLIENT_TLS_CERTFILES=/tmp/hyperledger/org1/peer1/assets/tls-ca/tls-ca-cert.pem
fabric-ca-client enroll -d -u https://peer1-org1:peer1PW@0.0.0.0:7052 --enrollment.profile tls --csr.hosts peer1-org1

此时,您将拥有两个 MSP 目录。一个 MSP 包含对等方的注册证书,另一个具有对等方的 TLS 证书。但是,需要在注册 MSP 目录中添加一个额外的文件夹,这就是该admincerts 文件夹。此文件夹将包含 Org1 管理员的证书。当我们进一步注册 Org1 的管理员时,我们将详细讨论这个问题。

启动 Org1 的 Peers

一旦我们注册了所有对等点和组织管理员,我们就有了必要的 MSP 来启动对等点。

如下所示的 docker 服务可用于为 Peer1 启动容器。

peer1-org1:
  container_name: peer1-org1
  image: hyperledger/fabric-peer
  environment:
    - CORE_PEER_ID=peer1-org1
    - CORE_PEER_ADDRESS=peer1-org1:7051
    - CORE_PEER_LOCALMSPID=org1MSP
    - CORE_PEER_MSPCONFIGPATH=/tmp/hyperledger/org1/peer1/msp
    - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
    - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=guide_fabric-ca
    - FABRIC_LOGGING_SPEC=debug
    - CORE_PEER_TLS_ENABLED=true
    - CORE_PEER_TLS_CERT_FILE=/tmp/hyperledger/org1/peer1/tls-msp/signcerts/cert.pem
    - CORE_PEER_TLS_KEY_FILE=/tmp/hyperledger/org1/peer1/tls-msp/keystore/key.pem
    - CORE_PEER_TLS_ROOTCERT_FILE=/tmp/hyperledger/org1/peer1/tls-msp/tlscacerts/tls-0-0-0-0-7052.pem
    - CORE_PEER_GOSSIP_USELEADERELECTION=true
    - CORE_PEER_GOSSIP_ORGLEADER=false
    - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1-org1:7051
    - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true
  working_dir: /opt/gopath/src/github.com/hyperledger/fabric/org1/peer1
  volumes:
    - /var/run:/host/var/run
    - /tmp/hyperledger/org1/peer1:/tmp/hyperledger/org1/peer1
  networks:
    - fabric-ca

w

docker-compose -f docker-compose.yaml up peer1.org1.example.com
export FABRIC_CA_CLIENT_HOME=${PWD}/crypto-config/peerOrganizations/org1.example.com/ca
fabric-ca-client enroll -u https://admin:adminpw@ca.org1.example.com:7054 --caname ca.org1.example.com --tls.certfiles ${PWD}/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem
 fabric-ca-client register --id.name peer1.org1.example.com --id.type peer  --id.affiliation org1.department1 --id.secret peer1pw --caname ca.org1.example.com --tls.certfiles ${PWD}/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem
 
 
export FABRIC_CA_CLIENT_HOME=${PWD}/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com
fabric-ca-client enroll --id.name peer1.org1.example.com --id.type peer  --caname ca.org1.example.com --tls.certfiles ${PWD}/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem -u https://peer1.org1.example.com:peer1pw@ca.org1.example.com:7054
cp ${PWD}/crypto-config/peerOrganizations/org1.example.com/msp/config.yaml ${PWD}/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/config.yaml
fabric-ca-client enroll -u https://peer1.org1.example.com:peer1pw@ca.org1.example.com:7054 --caname ca.org1.example.com -M ${PWD}/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls --enrollment.profile tls --tls.certfiles ${PWD}/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem

cp ${PWD}/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt ${PWD}/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt


cp ${PWD}/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/signcerts/* ${PWD}/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.crt

cp ${PWD}/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/keystore/* ${PWD}/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.key

报错

Error: error getting endorser client for channel: endorser client failed to connect to peer1.org1.example.com:8051: failed to create new connection: context deadline exceeded

Client TLS handshake failed after 4.277ms with error: x509: certificate is valid for tianzhiweideMacBook-Pro.local, not peer1.org1.example.com remoteaddress=172.30.0.7:8051

Error: error getting endorser client for channel: endorser client failed to connect to localhost:8051: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 127.0.0.1:8051: connect: connection refused"

2022-03-23 13:19:18.965 UTC 0001 DEBU [bccsp] GetDefault -> Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
2022-03-23 13:19:18.968 UTC 0002 DEBU [bccsp] GetDefault -> Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
2022-03-23 13:19:18.979 UTC 0003 DEBU [bccsp] GetDefault -> Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
2022-03-23 13:19:18.989 UTC 0004 DEBU [bccsp_sw] openKeyStore -> KeyStore opened at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore]...done
2022-03-23 13:19:18.989 UTC 0005 DEBU [msp] getPemMaterialFromDir -> Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts
2022-03-23 13:19:18.994 UTC 0006 DEBU [msp] getPemMaterialFromDir -> Inspecting file /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem
2022-03-23 13:19:18.997 UTC 0007 DEBU [msp] getPemMaterialFromDir -> Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts
2022-03-23 13:19:19.004 UTC 0008 DEBU [msp] getPemMaterialFromDir -> Inspecting file /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem
2022-03-23 13:19:19.008 UTC 0009 DEBU [msp] getPemMaterialFromDir -> Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/admincerts
2022-03-23 13:19:19.013 UTC 000a DEBU [msp] getPemMaterialFromDir -> Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/intermediatecerts
2022-03-23 13:19:19.014 UTC 000b DEBU [msp] getMspConfig -> Intermediate certs folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/intermediatecerts]. Skipping. [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/intermediatecerts: no such file or directory]
2022-03-23 13:19:19.014 UTC 000c DEBU [msp] getPemMaterialFromDir -> Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/tlscacerts
2022-03-23 13:19:19.020 UTC 000d DEBU [msp] getPemMaterialFromDir -> Inspecting file /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem
2022-03-23 13:19:19.023 UTC 000e DEBU [msp] getPemMaterialFromDir -> Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/tlsintermediatecerts
2022-03-23 13:19:19.025 UTC 000f DEBU [msp] getMspConfig -> TLS intermediate certs folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/tlsintermediatecerts]. Skipping. [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/tlsintermediatecerts: no such file or directory]
2022-03-23 13:19:19.025 UTC 0010 DEBU [msp] getPemMaterialFromDir -> Reading directory /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/crls
2022-03-23 13:19:19.026 UTC 0011 DEBU [msp] getMspConfig -> crls folder not found at [/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/crls]. Skipping. [stat /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/crls: no such file or directory]
2022-03-23 13:19:19.032 UTC 0012 DEBU [msp] getMspConfig -> Loading NodeOUs
2022-03-23 13:19:19.050 UTC 0013 DEBU [msp] newBccspMsp -> Creating BCCSP-based MSP instance
2022-03-23 13:19:19.050 UTC 0014 DEBU [msp] New -> Creating Cache-MSP instance
2022-03-23 13:19:19.050 UTC 0015 DEBU [msp] loadLocalMSP -> Created new local MSP
2022-03-23 13:19:19.050 UTC 0016 DEBU [msp] Setup -> Setting up MSP instance Org1MSP
2022-03-23 13:19:19.051 UTC 0017 DEBU [msp.identity] newIdentity -> Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICUTCCAfigAwIBAgIRAIm8nZ4iHonG0CdYoYoVWpEwCgYIKoZIzj0EAwIwczEL
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG
cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh
Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjIwMzIzMTMwOTAwWhcNMzIwMzIwMTMwOTAw
WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN
U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE
AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA
BHGttnKWhCTu+1BJWtUbm1qm7CpybBwYTwZ9GlBHDGwmcqTfBfpvR3R4KXxtlYWY
XiM26VNTYf5G9lkmjkHcJl2jbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAU
BggrBgEFBQcDAgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg
kxEEk3X67f4HgjUj6zdmbuIwLgRrSmEkgDwyzhcms3IwCgYIKoZIzj0EAwIDRwAw
RAIgW6LRF8AexlL/ndZDe46Dbhvs59IV88+bUjN9BAYbrY4CIBPnLcK3OK3lRYur
lF/qSMf3T4ndsLO6uvg8mHRrfwQ5
-----END CERTIFICATE-----
2022-03-23 13:19:19.051 UTC 0018 DEBU [msp.identity] newIdentity -> Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICKTCCAdCgAwIBAgIRAPrQP5/U54T9rCTMAmcWCIYwCgYIKoZIzj0EAwIwczEL
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG
cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh
Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjIwMzIzMTMwOTAwWhcNMzIwMzIwMTMwOTAw
WjBrMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN
U2FuIEZyYW5jaXNjbzEOMAwGA1UECxMFYWRtaW4xHzAdBgNVBAMMFkFkbWluQG9y
ZzEuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATWNFgF+QW0
0NL9nTcRfZfBbXafcCvqcD58RHRWbS7oEOcduy8znQnL/EKNlQxtjduskp82pHdI
gIaWL17ibRPSo00wSzAOBgNVHQ8BAf8EBAMCB4AwDAYDVR0TAQH/BAIwADArBgNV
HSMEJDAigCCTEQSTdfrt/geCNSPrN2Zu4jAuBGtKYSSAPDLOFyazcjAKBggqhkjO
PQQDAgNHADBEAiBliRRbWmhSoX8+azS4HBG34EvRgEzelWKQ3+ZZExCPJQIgOEnr
I3QqsJhApTNDCMbXfS2dsgJZm3yMKZyYr7MjrQ0=
-----END CERTIFICATE-----
2022-03-23 13:19:19.060 UTC 0019 DEBU [msp.identity] newIdentity -> Creating identity instance for cert -----BEGIN CERTIFICATE-----
MIICKTCCAdCgAwIBAgIRAPrQP5/U54T9rCTMAmcWCIYwCgYIKoZIzj0EAwIwczEL
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG
cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh
Lm9yZzEuZXhhbXBsZS5jb20wHhcNMjIwMzIzMTMwOTAwWhcNMzIwMzIwMTMwOTAw
WjBrMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN
U2FuIEZyYW5jaXNjbzEOMAwGA1UECxMFYWRtaW4xHzAdBgNVBAMMFkFkbWluQG9y
ZzEuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATWNFgF+QW0
0NL9nTcRfZfBbXafcCvqcD58RHRWbS7oEOcduy8znQnL/EKNlQxtjduskp82pHdI
gIaWL17ibRPSo00wSzAOBgNVHQ8BAf8EBAMCB4AwDAYDVR0TAQH/BAIwADArBgNV
HSMEJDAigCCTEQSTdfrt/geCNSPrN2Zu4jAuBGtKYSSAPDLOFyazcjAKBggqhkjO
PQQDAgNHADBEAiBliRRbWmhSoX8+azS4HBG34EvRgEzelWKQ3+ZZExCPJQIgOEnr
I3QqsJhApTNDCMbXfS2dsgJZm3yMKZyYr7MjrQ0=
-----END CERTIFICATE-----
2022-03-23 13:19:19.060 UTC 001a DEBU [msp] setupSigningIdentity -> Signing identity expires at 2032-03-20 13:09:00 +0000 UTC
2022-03-23 13:19:19.061 UTC 001b DEBU [msp] GetDefaultSigningIdentity -> Obtaining default signing identity
2022-03-23 13:19:19.065 UTC [grpc] InfoDepth -> DEBU 001 [core]parsed scheme: ""
2022-03-23 13:19:19.065 UTC [grpc] InfoDepth -> DEBU 002 [core]scheme "" not registered, fallback to default scheme
2022-03-23 13:19:19.066 UTC [grpc] InfoDepth -> DEBU 003 [core]ccResolverWrapper: sending update to cc: {[{peer1.org1.example.com:8051  <nil> 0 <nil>}] <nil> <nil>}
2022-03-23 13:19:19.066 UTC [grpc] InfoDepth -> DEBU 004 [core]ClientConn switching balancer to "pick_first"
2022-03-23 13:19:19.066 UTC [grpc] InfoDepth -> DEBU 005 [core]Channel switches to new LB policy "pick_first"
2022-03-23 13:19:19.066 UTC [grpc] InfoDepth -> DEBU 006 [core]Subchannel Connectivity change to CONNECTING
2022-03-23 13:19:19.066 UTC [grpc] InfoDepth -> DEBU 007 [core]pickfirstBalancer: UpdateSubConnState: 0xc00026dc00, {CONNECTING <nil>}
2022-03-23 13:19:19.066 UTC [grpc] InfoDepth -> DEBU 008 [core]Channel Connectivity change to CONNECTING
2022-03-23 13:19:19.067 UTC [grpc] InfoDepth -> DEBU 009 [core]Subchannel picks a new address "peer1.org1.example.com:8051" to connect
2022-03-23 13:19:19.073 UTC 001c DEBU [comm.tls] ClientHandshake -> Client TLS handshake completed in 3.5811ms remoteaddress=192.168.144.6:8051
2022-03-23 13:19:19.075 UTC [grpc] InfoDepth -> DEBU 00a [core]Subchannel Connectivity change to READY
2022-03-23 13:19:19.075 UTC [grpc] InfoDepth -> DEBU 00b [core]pickfirstBalancer: UpdateSubConnState: 0xc00026dc00, {READY <nil>}
2022-03-23 13:19:19.075 UTC [grpc] InfoDepth -> DEBU 00c [core]Channel Connectivity change to READY
2022-03-23 13:19:19.075 UTC 001d INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized
2022-03-23 13:19:19.077 UTC 001e DEBU [msp.identity] Sign -> Sign: plaintext: 0AB3070A5B08011A0B08D7BCEC910610...45831DE11A0A0A000A000A000A000A00 
2022-03-23 13:19:19.077 UTC 001f DEBU [msp.identity] Sign -> Sign: digest: 92E95B2FC5AD18513A01810700EE868F1F7D62718E2BED654364B6A6E0FDCE18 
2022-03-23 13:19:19.139 UTC 0020 INFO [channelCmd] executeJoin -> Successfully submitted proposal to join channel

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值