当我在fabric-sdk-go中使用msp向CA注册用户时,发生了错误

如何解决当我在fabric-sdk-go中使用msp向CA注册用户时,发生了错误

错误如下:

Register return error:
 failed to register user: failed to register user: Response from server: Error Code: 20 - Authentication failure

代码的相关部分如下:

import (
[...]
mspclient "github.com/hyperledger/fabric-sdk-go/pkg/client/msp"
[...]
)

[...]

func RegisterUser(sdk *fabsdk.FabricSDK,info *InitInfo,r *RegistrationRequest) (string,error) {
    clientContext := sdk.Context(fabsdk.WithUser(info.OrgAdmin),fabsdk.WithOrg(info.OrgName))
    if clientContext == nil {
        return "",fmt.Errorf("根据指定的组织名称与管理员创建资源管理客户端Context失败")
    }
    // 创建一个新的msp客户端实例,并返回
    c,err := mspclient.New(sdk.Context(),mspclient.WithOrg(info.OrgName))
    if err != nil {
        return "",fmt.Errorf("根据指定的 OrgName 创建 Org MSP 客户端实例失败: %v",err)
    }
    request := mspclient.RegistrationRequest{
        Name:           r.Name,Type:           r.Type,MaxEnrollments: r.MaxEnrollments,Affiliation:    r.Affiliation,//Attributes:,CAName: r.CAName,Secret: r.Secret,}
    _,err = c.Register(&request)
    if err != nil {
        return "",fmt.Errorf("Register return error:\n %s\n",err)
    }
    return "enroll user is completed",nil
}

在这个论坛上,我还发现有人报告了相同的错误,有人回答说用户名和密码不匹配,但是我的代码是注册用户,这个原因不应该出现。

解决方法

以下是我正在使用的功能。您可以相应地进行更改。在Registering用户之前使用它。

/**
     1. In Hyperledger fabric by default "org1 & org2" are affiliated as CA organization,so any client or peer
            wants to register or enroll into the network via CA can pass "org1 or org2" as an affiliated organization.
     2. In case of other organization like org3 & org4,they need to be affiliated
**/

// AddAffiliationOrg : adding the affiliations of orgs. need to do this if Orgname isn't org1 or org2
func AddAffiliationOrg(setup *OrgSetup,caClient *msp.Client,caName string) error {

    orgName := setup.OrgName
    affl := strings.ToLower(orgName) + ".department1"

    fmt.Println("Initializing Affiliation for " + affl)

    affResponse,err := caClient.GetAffiliation(affl)

    if affResponse != nil && err != nil {

        fmt.Println("Affiliation Exists")

        AfInfo := affResponse.AffiliationInfo
        CAName := affResponse.CAName

        fmt.Println("AfInfo : " + AfInfo.Name)
        fmt.Println("CAName : " + CAName)
    } else {

        fmt.Println("Add Affiliation " + affl)

        _,err = caClient.AddAffiliation(&msp.AffiliationRequest{

            Name:   affl,Force:  true,CAName: caName,})

        if err != nil {
            return fmt.Errorf("Failed to add affiliation for CA '%s' : %v ",caName,err)
        }
    }
    fmt.Println("\n Affiliation completed successfully")
    return nil
}

,
func (t *ServiceSetup)AddAffiliationOrg(caName,orgName string) error {
 sdk,err := fabsdk.New(config.FromFile(sellerConfigFile))
 ctx := sdk.Context()
 caClient,err := msp.New(ctx)
 if err != nil {
  fmt.Printf("Failed to create msp client: %s\n",err)
  return  err
 }
  
    affl := strings.ToLower(orgName) + ".department1"

    fmt.Println("Initializing Affiliation for " + affl)

    affResponse,})

        if err != nil {
   fmt.Printf("Failed to add affiliation for CA '%s' : %v ",err)
            return err
        }
    }
    fmt.Println("\n Affiliation completed successfully")
    return nil
}                        

错误:

Executing AddAffiliationOrg command
Initializing Affiliation for seller.department1
 [fabsdk/fab] 2020/09/28 02:12:42 UTC - n/a -> INFO generating key: &{A:ecdsa S:256}
 [fabsdk/fab] 2020/09/28 02:12:42 UTC - logbridge.(*cLogger).Info -> INFO encoded CSR
Add Affiliation seller.department1

 Affiliation completed successfully
Executing enroll command
Going to enroll user
 [fabsdk/fab] 2020/09/28 02:12:42 UTC - n/a -> INFO generating key: &{A:ecdsa S:256}
 [fabsdk/fab] 2020/09/28 02:12:43 UTC - logbridge.(*cLogger).Info -> INFO encoded CSR
Failed to enroll user: enroll failed: enroll failed: Response from server: Error Code: 20 - Authentication failure

Executing register command
register 225255 successfully,with password 462222
register success

,

docker-compose-ca.yaml


version: '2'
networks:
    default:
services:
  ca.seller.com:
    image: hyperledger/fabric-ca
    container_name: ca.seller.com
    environment:
      - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
      - FABRIC_CA_SERVER_CA_NAME=ca.seller.com
      - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.seller.com-cert.pem
      - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/57e5f37e597264cc2fa31c98d462c51796308cedd56fa8c09ea97a07b612679e_sk
      - FABRIC_CA_SERVER_TLS_ENABLED=false
      - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.seller.com-cert.pem
      - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/57e5f37e597264cc2fa31c98d462c51796308cedd56fa8c09ea97a07b612679e_sk
    ports:
      - 8054:7054
    command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
    volumes:
      - ./crypto-config/peerOrganizations/seller.com/ca/:/etc/hyperledger/fabric-ca-server-config
    networks:
      default:
        aliases:
          - ca.seller.com
  ca.buyer.com:
    image: hyperledger/fabric-ca
    container_name: ca.buyer.com
    environment:
      - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
      - FABRIC_CA_SERVER_CA_NAME=ca.buyer.com
      - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.buyer.com-cert.pem
      - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/78e27e6db18578fefd8a98fe74f8393e4cb5ee414e887f3325e4105239757727_sk
      - FABRIC_CA_SERVER_TLS_ENABLED=false
      - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.buyer.com-cert.pem
      - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/78e27e6db18578fefd8a98fe74f8393e4cb5ee414e887f3325e4105239757727_sk
    ports:
      - 7054:7054
    command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
    volumes:
      - ./crypto-config/peerOrganizations/buyer.com/ca/:/etc/hyperledger/fabric-ca-server-config
    networks:
      default:
        aliases:
          - ca.buyer.com
  ca.auctionhouse.com:
    image: hyperledger/fabric-ca
    container_name: ca.auctionhouse.com
    environment:
      - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
      - FABRIC_CA_SERVER_CA_NAME=ca.auctionhouse.com
      - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.auctionhouse.com-cert.pem
      - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/f9437970fbf01b1ff6e4e449aa14f762866bf0c96f193f62c444842f3b38624f_sk
      - FABRIC_CA_SERVER_TLS_ENABLED=false
      - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.auctionhouse.com-cert.pem
      - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/f9437970fbf01b1ff6e4e449aa14f762866bf0c96f193f62c444842f3b38624f_sk
    ports:
      - 9054:7054
    command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
    volumes:
        - ./crypto-config/peerOrganizations/auctionhouse.com/ca/:/etc/hyperledger/fabric-ca-server-config
    networks:
      default:
        aliases:
          - ca.auctionhouse.com
,

这是其中一个组织的sdk配置文件。

version: 1.0.0

#
# The client section used by GO SDK.
#
client:

  # Which organization does this application instance belong to? The value must be the name of an org
  # defined under "organizations"
  organization: Seller

  logging:
    level: info


  # Root of the MSP directories with keys and certs.
  cryptoconfig:
    path: ${GOPATH}/src/github.com/baozhanglian/fixtures/crypto-config

  # Some SDKs support pluggable KV stores,the properties under "credentialStore"
  # are implementation specific
  credentialStore:
    # [Optional]. Used by user store. Not needed if all credentials are embedded in configuration
    # and enrollments are performed elswhere.
    path: "/tmp/state-store"

    # [Optional]. Specific to the CryptoSuite implementation used by GO SDK. Software-based implementations
    # requiring a key store. PKCS#11 based implementations does not.
    cryptoStore:
      # Specific to the underlying KeyValueStore that backs the crypto key store.
      path: /tmp/msp

   # BCCSP config for the client. Used by GO SDK.
  BCCSP:
    security:
     enabled: true
     default:
      provider: "SW"
     hashAlgorithm: "SHA2"
     softVerify: true
     level: 256

  tlsCerts:
    # [Optional]. Use system certificate pool when connecting to peers,orderers (for negotiating TLS) Default: false
    systemCertPool: false

    # [Optional]. Client key and cert for TLS handshake with peers and orderers
    client:
      key:
        path: 
      cert:
        path: 

#
# [Optional]. But most apps would have this section so that channel objects can be constructed
# based on the content below. If an app is creating channels,then it likely will not need this
# section.
#
channels:

  #[Required if _default not defined; Optional if _default defined]. 
  # name of the channel
  bzlchannel:

    # list of orderers designated by the application to use for transactions on this
    # channel. This list can be a result of access control ("FBI" can only access "ordererA"),or
    # operational decisions to share loads from applications among the orderers.  The values must
    # be "names" of orgs defined under "organizations/peers"
    # deprecated: not recommended,to override any orderer configuration items,entity matchers should be used.
#    orderers:
#      - orderer.baozhanglian.com

    #[Required if _default peers not defined; Optional if _default peers defined].
    # list of peers from participating orgs
    peers:
      peer0.seller.baozhanglian.com:
        # [Optional]. will this peer be sent transaction proposals for endorsement? The peer must
        # have the chaincode installed. The app can also use this property to decide which peers
        # to send the chaincode install request. Default: true
        endorsingPeer: true

        # [Optional]. will this peer be sent query proposals? The peer must have the chaincode
        # installed. The app can also use this property to decide which peers to send the
        # chaincode install request. Default: true
        chaincodeQuery: true

        # [Optional]. will this peer be sent query proposals that do not require chaincodes,like
        # queryBlock(),queryTransaction(),etc. Default: true
        ledgerQuery: true

        # [Optional]. will this peer be the target of the SDK's listener registration? All peers can
        # produce events but the app typically only needs to connect to one to listen to events.
        # Default: true
        eventSource: true

      peer0.buyer.baozhanglian.com:
       
        endorsingPeer: true

        chaincodeQuery: true

        ledgerQuery: true

        eventSource: true
        
      peer0.auctionhouse.baozhanglian.com:
       
        endorsingPeer: true

        chaincodeQuery: true

        ledgerQuery: true

        eventSource: true

# list of participating organizations in this network
#
organizations:
  Seller:
    mspid: SellerMSP

    # This org's MSP store (absolute path or relative to client.cryptoconfig)
    cryptoPath: peerOrganizations/seller.baozhanglian.com/users/{username}@seller.baozhanglian.com/msp

    peers:
      - peer0.seller.baozhanglian.com

    # [Optional]. Certificate Authorities issue certificates for identification purposes in a Fabric based
    # network. Typically certificates provisioning is done in a separate process outside of the
    # runtime network. Fabric-CA is a special certificate authority that provides a REST APIs for
    # dynamic certificate management (enroll,revoke,re-enroll). The following section is only for
    # Fabric-CA servers.
    certificateAuthorities:
      - ca.seller.baozhanglian.com

  # the profile will contain public information about organizations other than the one it belongs to.
  # These are necessary information to make transaction lifecycles work,including MSP IDs and
  # peers with a public URL to send transaction proposals. The file will not contain private
  # information reserved for members of the organization,such as admin key and certificate,# fabric-ca registrar enroll ID and secret,etc.
  Buyer:
    mspid: BuyerMSP

    # This org's MSP store (absolute path or relative to client.cryptoconfig)
    cryptoPath: peerOrganizations/buyer.baozhanglian.com/users/{username}@buyer.baozhanglian.com/msp

    peers:
      - peer0.buyer.baozhanglian.com
  

    # [Optional]. Certificate Authorities issue certificates for identification purposes in a Fabric based
    # network. Typically certificates provisioning is done in a separate process outside of the
    # runtime network. Fabric-CA is a special certificate authority that provides a REST APIs for
    # dynamic certificate management (enroll,re-enroll). The following section is only for
    # Fabric-CA servers.
    certificateAuthorities:
      - ca.buyer.baozhanglian.com 

  AuctionHouse:
    mspid: AuctionHouseMSP

    # This org's MSP store (absolute path or relative to client.cryptoconfig)
    cryptoPath: peerOrganizations/auctionhouse.baozhanglian.com/users/{username}@auctionhouse.baozhanglian.com/msp

    peers:
      - peer0.auctionhouse.baozhanglian.com

    # [Optional]. Certificate Authorities issue certificates for identification purposes in a Fabric based
    # network. Typically certificates provisioning is done in a separate process outside of the
    # runtime network. Fabric-CA is a special certificate authority that provides a REST APIs for
    # dynamic certificate management (enroll,re-enroll). The following section is only for
    # Fabric-CA servers.
    certificateAuthorities:
      - ca.auctionhouse.baozhanglian.com

#
# List of orderers to send transaction and channel create/update requests to. For the time
# being only one orderer is needed. If more than one is defined,which one get used by the
# SDK is implementation specific. Consult each SDK's documentation for its handling of orderers.
#
orderers:
  orderer.baozhanglian.com:
    url: localhost:7050

    # these are standard properties defined by the gRPC library
    # they will be passed in as-is to gRPC client constructor
    grpcOptions:
      ssl-target-name-override: orderer.baozhanglian.com
      # These parameters should be set in coordination with the keepalive policy on the server,# as incompatible settings can result in closing of connection.
      # When duration of the 'keep-alive-time' is set to 0 or less the keep alive client parameters are disabled
      keep-alive-time: 0s
      keep-alive-timeout: 20s
      keep-alive-permit: false
      fail-fast: false
      # allow-insecure will be taken into consideration if address has no protocol defined,if true then grpc or else grpcs
      allow-insecure: false

    tlsCACerts:
      # Certificate location absolute path
      path: ${GOPATH}/src/github.com/baozhanglian/fixtures/crypto-config/ordererOrganizations/baozhanglian.com/tlsca/tlsca.baozhanglian.com-cert.pem

#
# List of peers to send various requests to,including endorsement,query
# and event listener registration.
#
peers:
  peer0.seller.baozhanglian.com:
    # this URL is used to send endorsement and query requests
    url: localhost:8051
    eventUrl: localhost:8053
    grpcOptions:
      ssl-target-name-override: peer0.seller.baozhanglian.com
      # These parameters should be set in coordination with the keepalive policy on the server,if true then grpc or else grpcs
      allow-insecure: false

    tlsCACerts:
      # Certificate location absolute path
      path: ${GOPATH}/src/github.com/baozhanglian/fixtures/crypto-config/peerOrganizations/seller.baozhanglian.com/tlsca/tlsca.seller.baozhanglian.com-cert.pem
  peer0.buyer.baozhanglian.com:
    # this URL is used to send endorsement and query requests
    url: localhost:7051
    eventUrl: localhost:7053
    grpcOptions:
      ssl-target-name-override: peer0.buyer.baozhanglian.com
      # These parameters should be set in coordination with the keepalive policy on the server,if true then grpc or else grpcs
      allow-insecure: false

    tlsCACerts:
      # Certificate location absolute path
      path: ${GOPATH}/src/github.com/baozhanglian/fixtures/crypto-config/peerOrganizations/buyer.baozhanglian.com/tlsca/tlsca.buyer.baozhanglian.com-cert.pem
  peer0.auctionhouse.baozhanglian.com:
    # this URL is used to send endorsement and query requests
    url: localhost:9051
    eventUrl: localhost:9053
    grpcOptions:
      ssl-target-name-override: peer0.auctionhouse.baozhanglian.com
      # These parameters should be set in coordination with the keepalive policy on the server,if true then grpc or else grpcs
      allow-insecure: false

    tlsCACerts:
      # Certificate location absolute path
      path: ${GOPATH}/src/github.com/baozhanglian/fixtures/crypto-config/peerOrganizations/auctionhouse.baozhanglian.com/tlsca/tlsca.auctionhouse.baozhanglian.com-cert.pem
  
# Fabric-CA is a special kind of Certificate Authority provided by Hyperledger Fabric which allows
# certificate management to be done via REST APIs. Application may choose to use a standard
# Certificate Authority instead of Fabric-CA,in which case this section would not be specified.
#
certificateAuthorities:
  ca.seller.baozhanglian.com:
    url: localhost:8054
    tlsCACerts:
      # Comma-Separated list of paths
      path: ${GOPATH}/src/github.com/baozhanglian/fixtures/crypto-config/peerOrganizations/seller.baozhanglian.com/tlsca/tlsca.seller.baozhanglian.com-cert.pem
      # Client key and cert for SSL handshake wit  h Fabric CA
      client:
        key:
          path: ${GOPATH}/src/github.com/baozhanglian/fixtures/crypto-config/peerOrganizations/seller.baozhanglian.com/users/User1@seller.baozhanglian.com/tls/client.key
        cert:
          path: ${GOPATH}/src/github.com/baozhanglian/fixtures/crypto-config/peerOrganizations/seller.baozhanglian.com/users/User1@seller.baozhanglian.com/tls/client.crt

    # Fabric-CA supports dynamic user enrollment via REST APIs. A "root" user,a.k.a registrar,is
    # needed to enroll and invoke new users.
    registrar:
      enrollId: admin
      enrollSecret: adminpw
    # [Optional] The optional name of the CA.
    caName: ca.seller.baozhanglian.com
  
  ca.buyer.baozhanglian.com:
    url: localhost:7054
    tlsCACerts:
      # Comma-Separated list of paths
      path: ${GOPATH}/src/github.com/baozhanglian/fixtures/crypto-config/peerOrganizations/buyer.baozhanglian.com/tlsca/tlsca.buyer.baozhanglian.com-cert.pem
      # Client key and cert for SSL handshake with Fabric CA
      client:
        key:
          path: ${GOPATH}/src/github.com/baozhanglian/fixtures/crypto-config/peerOrganizations/buyer.baozhanglian.com/users/User1@buyer.baozhanglian.com/tls/client.key
        cert:
          path: ${GOPATH}/src/github.com/baozhanglian/fixtures/crypto-config/peerOrganizations/buyer.baozhanglian.com/users/User1@buyer.baozhanglian.com/tls/client.crt

    # Fabric-CA supports dynamic user enrollment via REST APIs. A "root" user,is
    # needed to enroll and invoke new users.
    registrar:
      enrollId: admin
      enrollSecret: adminpw
    # [Optional] The optional name of the CA.
    caName: ca.buyer.baozhanglian.com


  ca.auctionhouse.baozhanglian.com:
    url: localhost:9054
    tlsCACerts:
      # Comma-Separated list of paths
      path: ${GOPATH}/src/github.com/baozhanglian/fixtures/crypto-config/peerOrganizations/auctionhouse.baozhanglian.com/tlsca/tlsca.auctionhouse.baozhanglian.com-cert.pem
      # Client key and cert for SSL handshake wit  h Fabric CA
      client:
        key:
          path: ${GOPATH}/src/github.com/baozhanglian/fixtures/crypto-config/peerOrganizations/auctionhouse.baozhanglian.com/users/User1@auctionhouse.baozhanglian.com/tls/client.key
        cert:
          path: ${GOPATH}/src/github.com/baozhanglian/fixtures/crypto-config/peerOrganizations/auctionhouse.baozhanglian.com/users/User1@auctionhouse.baozhanglian.com/tls/client.crt

    # Fabric-CA supports dynamic user enrollment via REST APIs. A "root" user,is
    # needed to enroll and invoke new users.
    registrar:
      enrollId: admin
      enrollSecret: adminpw
    # [Optional] The optional name of the CA.
    caName: ca.auctionhouse.baozhanglian.com
# EntityMatchers enable substitution of network hostnames with static configurations
 # so that properties can be mapped. Regex can be used for this purpose
# UrlSubstitutionExp can be empty which means the same network hostname will be used
# UrlSubstitutionExp can be given same as mapped peer url,so that mapped peer url can be used
# UrlSubstitutionExp can have golang regex matchers like $1.local.example.$2:$3 for pattern
 # like peer0.teachers.baozhanglian.com:1234 which converts peer0.teachers.baozhanglian.com to peer0.FBI.local.baozhanglian.com:1234
# sslTargetOverrideUrlSubstitutionExp follow in the same lines as
 # SubstitutionExp for the fields gprcOptions.ssl-target-name-override respectively
# In any case mappedHost's config will be used,so mapped host cannot be empty,if entityMatchers are used
#entityMatchers:
#entityMatchers:
#  peer:
#    - pattern: (\w+).teachers.baozhanglian.com:(\d+)
#      urlSubstitutionExp: $1.teachers.baozhanglian.com:$2
#      sslTargetOverrideUrlSubstitutionExp: $1.teachers.baozhanglian.com
#      mappedHost: peer0.teachers.baozhanglian.com
#
#
#    - pattern: (\w+).example1.(\w+):(\d+)
#      urlSubstitutionExp: $1.teachers.baozhanglian.com.$2:$3
#      sslTargetOverrideUrlSubstitutionExp: $1.teachers.baozhanglian.com.$2
#      mappedHost: peer0.teachers.baozhanglian.com
#
#    - pattern: (\w+).teachers.baozhanglian.com.(\w+):(\d+)
#      urlSubstitutionExp: peer0.teachers.baozhanglian.com:7051
#      sslTargetOverrideUrlSubstitutionExp: peer0.teachers.baozhanglian.com
#      mappedHost: peer0.teachers.baozhanglian.com
#
#  orderer:
#    - pattern: (\w+).example.(\w+)
#      urlSubstitutionExp: orderer.baozhanglian.com:7050
#      sslTargetOverrideUrlSubstitutionExp: orderer.baozhanglian.com
#      mappedHost: orderer.baozhanglian.com
#
#    - pattern: (\w+).example2.(\w+)
#      urlSubstitutionExp: localhost:7050
#      sslTargetOverrideUrlSubstitutionExp: localhost
#      mappedHost: orderer.baozhanglian.com
#
#    - pattern: (\w+).example3.(\w+)
#      urlSubstitutionExp:
#      sslTargetOverrideUrlSubstitutionExp:
#      mappedHost: orderer.baozhanglian.com
#
#    - pattern: (\w+).example4.(\w+):(\d+)
#      urlSubstitutionExp: $1.example.$2:$3
#      sslTargetOverrideUrlSubstitutionExp: $1.example.$2
#      mappedHost: orderer.baozhanglian.com
#
#  certificateAuthority:
#    - pattern: (\w+).teachers.baozhanglian.com.(\w+)
#      urlSubstitutionExp:
#      mappedHost: ca.teachers.baozhanglian.com
#
entityMatchers:
  peer:
    - pattern: (\w*)peer0.seller.baozhanglian.com(\w*)
      urlSubstitutionExp: localhost:8051
      eventUrlSubstitutionExp: localhost:8053
      sslTargetOverrideUrlSubstitutionExp: peer0.seller.baozhanglian.com
      mappedHost: peer0.seller.baozhanglian.com
    - pattern: (\w*)peer0.buyer.baozhanglian.com(\w*)
      urlSubstitutionExp: localhost:7051
      eventUrlSubstitutionExp: localhost:7053
      sslTargetOverrideUrlSubstitutionExp: peer0.buyer.baozhanglian.com
      mappedHost: peer0.buyer.baozhanglian.com
    - pattern: (\w*)peer0.auctionhouse.baozhanglian.com(\w*)
      urlSubstitutionExp: localhost:9051
      eventUrlSubstitutionExp: localhost:9053
      sslTargetOverrideUrlSubstitutionExp: peer0.auctionhouse.baozhanglian.com
      mappedHost: peer0.auctionhouse.baozhanglian.com
  orderer:
    - pattern: (\w*)orderer.baozhanglian.com(\w*)
      urlSubstitutionExp: localhost:7050
      sslTargetOverrideUrlSubstitutionExp: orderer.baozhanglian.com
      mappedHost: orderer.baozhanglian.com

  certificateAuthorities:
    - pattern: (\w*)ca.seller.baozhanglian.com(\w*)
      urlSubstitutionExp: localhost:8054
      mappedHost: ca.seller.baozhanglian.com
    - pattern: (\w*)ca.buyer.baozhanglian.com(\w*)
      urlSubstitutionExp: localhost:7054
      mappedHost: ca.buyer.baozhanglian.com
    - pattern: (\w*)ca.auctionhouse.baozhanglian.com(\w*)
      urlSubstitutionExp: localhost:9054
      mappedHost: ca.auctionhouse.baozhanglian.com

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 <select id="xxx"> SELECT di.id, di.name, di.work_type, di.updated... <where> <if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 <property name="dynamic.classpath" value="tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams['font.sans-serif'] = ['SimHei'] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -> systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping("/hires") public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate<String
使用vite构建项目报错 C:\Users\ychen\work>npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-