我是 Hyperledger 的新手,并尝试使用 Hyperledger Caliper v0.3.2 作为基准工具来测试 Fabric v1.3。我遵循了两个官方教程:https://hyperledger-fabric.readthedocs.io/en/release-1.3/build_network.html 和 https://hyperledger.github.io/caliper/v0.3.2/fabric-tutorial/tutorials-fabric-existing/
现在我已经成功实例化了 fabcar
链码并且在 peer0.org1
中查询成功,如下
peer chaincode query -C mychannel -n fabcar -c '{"Args":["queryAllCars"]}'
但是,当我运行 caliper 时,它给了我错误 [Channel.js]: Channel:mychannel received discovery error:access denied
,详细信息如下:
2021-03-17T10:34:45.736Z - error: [Channel.js]: Channel:mychannel received discovery error:access denied
2021-03-17T10:34:45.737Z - error: [Channel.js]: Error: Channel:mychannel Discovery error:access denied
2021-03-17T10:34:45.737Z - error: [Network]: _initializeInternalChannel: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: Channel:mychannel Discovery error:access denied
2021.03.17-18:34:45.737 info [caliper] [caliper-local-client] Client[1] encountered an error during prepare test phase: Error: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: Channel:mychannel Discovery error:access denied
at Network._initializeInternalChannel (/usr/local/lib/node_modules/fabric-network/lib/network.js:119:12)
at <anonymous>
2021.03.17-18:34:45.738 info [caliper] [caliper-local-client] Info: client 1 prepare test :Template callbackphase complete
2021.03.17-18:34:45.739 error [caliper] [round-orchestrator] Failed round 1 (queryAsset): Error: Error: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: Channel:mychannel Discovery error:access denied
at WorkerOrchestrator.updateWorkerPhase (/usr/local/lib/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/caliper-core/lib/master/orchestrators/worker-orchestrator.js:211:61)
at WorkerOrchestrator.processWorkerUpdate (/usr/local/lib/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/caliper-core/lib/master/orchestrators/worker-orchestrator.js:124:18)
at ChildProcess.<anonymous> (/usr/local/lib/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/caliper-core/lib/common/messaging/process-master.js:51:30)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at emit (internal/child_process.js:772:12)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021.03.17-18:34:45.739 info [caliper] [report-builder] ### All test results ###
2021.03.17-18:34:45.740 error [caliper] [report-builder] No data within test result; implies error within configuration files
2021.03.17-18:34:45.740 error [caliper] [round-orchestrator] Error while finalizing the report: Error: unrecognized report table
at ReportBuilder.setSummaryTable (/usr/local/lib/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/caliper-core/lib/master/report/report-builder.js:142:19)
at Report.printResultsByRound (/usr/local/lib/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/caliper-core/lib/master/report/report.js:254:28)
at RoundOrchestrator.run (/usr/local/lib/node_modules/@hyperledger/caliper-cli/node_modules/@hyperledger/caliper-core/lib/master/orchestrators/round-orchestrator.js:221:25)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
2021.03.17-18:34:45.741 info [caliper] [monitor.js] Stopping all monitors
2021.03.17-18:34:45.741 info [caliper] [worker-orchestrator] Sending exit message to connected workers
2021.03.17-18:34:45.741 info [caliper] [round-orchestrator] Benchmark finished in 7.58 seconds. Total rounds: 1. Successful rounds: 0. Failed rounds: 1.
2021.03.17-18:34:45.741 info [caliper] [caliper-engine] Skipping end command due to benchmark flow conditioning
2021.03.17-18:34:45.742 info [caliper] [cli-launch-master] Benchmark successfully finished
2021.03.17-18:34:45.743 error [caliper] [message-handler] Handled unsuccessful "prepare" message for worker 1 and test round 0 with error Error: Unable to initialize channel. Attempted to contact 1 Peers. Last error was Error: Channel:mychannel Discovery error:access denied
at Network._initializeInternalChannel (/usr/local/lib/node_modules/fabric-network/lib/network.js:119:12)
at <anonymous>
2021.03.17-18:34:45.743 info [caliper] [message-handler] Handling "exit" message
2021.03.17-18:34:45.743 info [caliper] [message-handler] Handled "exit" message for worker 1, exiting process
zch@zch:~/go/src/caliper-workspace$ 2021.03.17-18:34:45.793 info [caliper] [message-handler] Handling "exit" message
2021.03.17-18:34:45.794 info [caliper] [message-handler] Handled "exit" message for worker 0, exiting process
我使用 my-config.yaml
和 ./byfn.sh generate -f my-config.yaml
用 ./byfn.sh up -f my-config.yaml
构建了网络:
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
version: '2'
volumes:
orderer.example.com:
peer0.org1.example.com:
peer1.org1.example.com:
peer0.org2.example.com:
peer1.org2.example.com:
networks:
byfn:
services:
ca0:
image: hyperledger/fabric-ca:$IMAGE_TAG
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca-org1
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem
# change the corresponding sk file name! {hash}_sk -> CA1_PRIVATE_KEY
- FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/CA1_PRIVATE_KEY
ports:
- "7054:7054"
command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/CA1_PRIVATE_KEY -b admin:adminpw -d'
volumes:
- ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca_peerOrg1
networks:
- byfn
ca1:
image: hyperledger/fabric-ca:$IMAGE_TAG
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca-org2
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org2.example.com-cert.pem
# change the corresponding sk file name! {hash}_sk -> CA2_PRIVATE_KEY
- FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/CA2_PRIVATE_KEY
ports:
- "8054:7054"
command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org2.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/CA2_PRIVATE_KEY -b admin:adminpw -d'
volumes:
- ./crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca_peerOrg2
networks:
- byfn
orderer.example.com:
extends:
file: base/docker-compose-base.yaml
service: orderer.example.com
container_name: orderer.example.com
networks:
- byfn
environment:
- GODEBUG=netdns=go
peer0.org1.example.com:
container_name: peer0.org1.example.com
extends:
file: base/docker-compose-base.yaml
service: peer0.org1.example.com
networks:
- byfn
environment:
- GODEBUG=netdns=go
peer1.org1.example.com:
container_name: peer1.org1.example.com
extends:
file: base/docker-compose-base.yaml
service: peer1.org1.example.com
networks:
- byfn
environment:
- GODEBUG=netdns=go
peer0.org2.example.com:
container_name: peer0.org2.example.com
extends:
file: base/docker-compose-base.yaml
service: peer0.org2.example.com
networks:
- byfn
environment:
- GODEBUG=netdns=go
peer1.org2.example.com:
container_name: peer1.org2.example.com
extends:
file: base/docker-compose-base.yaml
service: peer1.org2.example.com
networks:
- byfn
environment:
- GODEBUG=netdns=go
cli:
container_name: cli
image: hyperledger/fabric-tools:$IMAGE_TAG
tty: true
stdin_open: true
environment:
- GOPATH=/opt/gopath
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
#- CORE_LOGGING_LEVEL=DEBUG
- CORE_LOGGING_LEVEL=INFO
- CORE_PEER_ID=cli
- CORE_PEER_ADDRESS=peer0.org1.example.com:7051
- CORE_PEER_LOCALMSPID=Org1MSP
- CORE_PEER_TLS_ENABLED=true
- 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_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_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_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp
- GODEBUG=netdns=go
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
command: /bin/bash
volumes:
- /var/run/:/host/var/run/
- ./../chaincode/:/opt/gopath/src/github.com/chaincode
- ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/
- ./scripts:/opt/gopath/src/github.com/hyperledger/fabric/peer/scripts/
- ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
depends_on:
- orderer.example.com
- peer0.org1.example.com
- peer1.org1.example.com
- peer0.org2.example.com
- peer1.org2.example.com
networks:
- byfn
手动部署 fabcar
后,docker 状态如下所示:
zch@zch:~/go/src/fabric-samples/first-network$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4fcb496b031f dev-peer0.org1.example.com-fabcar-1.0-5c906e402ed29f20260ae42283216aa75549c571e2e380f3615826365d8269ba "chaincode -peer.add…" 14 minutes ago Up 14 minutes dev-peer0.org1.example.com-fabcar-1.0
d10866fc9da4 dev-peer0.org2.example.com-fabcar-1.0-264b0a1cb5efbecaac5cf8990339c24474dc8435c6e10f10f2be565d555d0e94 "chaincode -peer.add…" 14 minutes ago Up 14 minutes dev-peer0.org2.example.com-fabcar-1.0
da7d865f96f6 dev-peer1.org2.example.com-mycc-1.0-26c2ef32838554aac4f7ad6f100aca865e87959c9a126e86d764c8d01f8346ab "chaincode -peer.add…" 16 minutes ago Up 16 minutes dev-peer1.org2.example.com-mycc-1.0
1a3f4cca5662 dev-peer0.org1.example.com-mycc-1.0-384f11f484b9302df90b453200cfb25174305fce8f53f4e94d45ee3b6cab0ce9 "chaincode -peer.add…" 16 minutes ago Up 16 minutes dev-peer0.org1.example.com-mycc-1.0
e7c307b3adfc dev-peer0.org2.example.com-mycc-1.0-15b571b3ce849066b7ec74497da3b27e54e0df1345daff3951b94245ce09c42b "chaincode -peer.add…" 16 minutes ago Up 16 minutes dev-peer0.org2.example.com-mycc-1.0
c288f83482b5 hyperledger/fabric-tools:latest "/bin/bash" 17 minutes ago Up 17 minutes cli
3f49cc3ff53d hyperledger/fabric-peer:latest "peer node start" 17 minutes ago Up 17 minutes 0.0.0.0:10051->7051/tcp, 0.0.0.0:10053->7053/tcp peer1.org2.example.com
986e2c96a8e7 hyperledger/fabric-ca:latest "sh -c 'fabric-ca-se…" 17 minutes ago Up 17 minutes 0.0.0.0:7054->7054/tcp ca_peerOrg1
b64e2b93d37f hyperledger/fabric-peer:latest "peer node start" 17 minutes ago Up 17 minutes 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com
befd47bd74be hyperledger/fabric-peer:latest "peer node start" 17 minutes ago Up 17 minutes 0.0.0.0:8051->7051/tcp, 0.0.0.0:8053->7053/tcp peer1.org1.example.com
550b37ba6cf7 hyperledger/fabric-ca:latest "sh -c 'fabric-ca-se…" 17 minutes ago Up 17 minutes 0.0.0.0:8054->7054/tcp ca_peerOrg2
167406b02860 hyperledger/fabric-peer:latest "peer node start" 17 minutes ago Up 17 minutes 0.0.0.0:9051->7051/tcp, 0.0.0.0:9053->7053/tcp peer0.org2.example.com
8cb72ecb0c9a hyperledger/fabric-orderer:latest "orderer" 17 minutes ago Up 17 minutes 0.0.0.0:7050->7050/tcp orderer.example.com
我认为这可能是一些配置错误。所以我在这里粘贴我的 network_config.json
:
{
"caliper": {
"blockchain": "fabric"
},
"clients": {
"Admin@org1.example.com": {
"client": {
"credentialStore": {
"path": "tmp/hfc-kvs/org1",
"cryptoStore": {
"path": "tmp/hfc-kvs/org1"
}
},
"organization": "Org1",
"clientPrivateKey": {
"path": "../fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/key.pem"
},
"clientSignedCert": {
"path": "../fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem"
},
"connection": {
"timeout": {
"peer": {
"endorser": "300"
}
}
}
}
}
},
"channels": {
"mychannel": {
"created" : true,
"chaincodes": [
{
"id":"fabcar",
"version":"1.0"
}
]
}
},
"name": "test-network-org1",
"organizations":{
"Org1": {
"mspid": "Org1MSP",
"peers": [
"peer0.org1.example.com"
],
"certificateAuthorities": [
"ca.org1.example.com"
],
"adminPrivateKey": {
"path": "../fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/key.pem"
},
"signedCert": {
"path": "../fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem"
}
}
},
"peers": {
"peer0.org1.example.com": {
"url": "grpcs://localhost:7051",
"tlsCACerts": {
"path":"../fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem"
},
"grpcOptions": {
"ssl-target-name-override": "peer0.org1.example.com",
"hostnameOverride": "peer0.org1.example.com"
}
}
},
"certificateAuthorities": {
"ca.org1.example.com": {
"url": "https://localhost:7054",
"caName": "ca-org1",
"tlsCACerts": {
"path":"../fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem"
},
"httpOptions": {
"verify": false
}
}
},
"version": "1.0"
}
我的 crypto-congig
目录:
zch@zch:~/go/src/fabric-samples/first-network/crypto-config$ tree
.
├── ordererOrganizations
│ └── example.com
│ ├── ca
│ │ ├── ca.example.com-cert.pem
│ │ └── key.pem
│ ├── msp
│ │ ├── admincerts
│ │ │ └── Admin@example.com-cert.pem
│ │ ├── cacerts
│ │ │ └── ca.example.com-cert.pem
│ │ └── tlscacerts
│ │ └── tlsca.example.com-cert.pem
│ ├── orderers
│ │ └── orderer.example.com
│ │ ├── msp
│ │ │ ├── admincerts
│ │ │ │ └── Admin@example.com-cert.pem
│ │ │ ├── cacerts
│ │ │ │ └── ca.example.com-cert.pem
│ │ │ ├── keystore
│ │ │ │ └── key.pem
│ │ │ ├── signcerts
│ │ │ │ └── orderer.example.com-cert.pem
│ │ │ └── tlscacerts
│ │ │ └── tlsca.example.com-cert.pem
│ │ └── tls
│ │ ├── ca.crt
│ │ ├── server.crt
│ │ └── server.key
│ ├── tlsca
│ │ ├── key.pem
│ │ └── tlsca.example.com-cert.pem
│ └── users
│ └── Admin@example.com
│ ├── msp
│ │ ├── admincerts
│ │ │ └── Admin@example.com-cert.pem
│ │ ├── cacerts
│ │ │ └── ca.example.com-cert.pem
│ │ ├── keystore
│ │ │ └── key.pem
│ │ ├── signcerts
│ │ │ └── Admin@example.com-cert.pem
│ │ └── tlscacerts
│ │ └── tlsca.example.com-cert.pem
│ └── tls
│ ├── ca.crt
│ ├── client.crt
│ └── client.key
└── peerOrganizations
├── org1.example.com
│ ├── ca
│ │ ├── CA1_PRIVATE_KEY
│ │ └── ca.org1.example.com-cert.pem
│ ├── msp
│ │ ├── admincerts
│ │ │ └── Admin@org1.example.com-cert.pem
│ │ ├── cacerts
│ │ │ └── ca.org1.example.com-cert.pem
│ │ ├── config.yaml
│ │ └── tlscacerts
│ │ └── tlsca.org1.example.com-cert.pem
│ ├── peers
│ │ ├── peer0.org1.example.com
│ │ │ ├── msp
│ │ │ │ ├── admincerts
│ │ │ │ │ └── Admin@org1.example.com-cert.pem
│ │ │ │ ├── cacerts
│ │ │ │ │ └── ca.org1.example.com-cert.pem
│ │ │ │ ├── config.yaml
│ │ │ │ ├── keystore
│ │ │ │ │ └── key.pem
│ │ │ │ ├── signcerts
│ │ │ │ │ └── peer0.org1.example.com-cert.pem
│ │ │ │ └── tlscacerts
│ │ │ │ └── tlsca.org1.example.com-cert.pem
│ │ │ └── tls
│ │ │ ├── ca.crt
│ │ │ ├── server.crt
│ │ │ └── server.key
│ │ └── peer1.org1.example.com
│ │ ├── msp
│ │ │ ├── admincerts
│ │ │ │ └── Admin@org1.example.com-cert.pem
│ │ │ ├── cacerts
│ │ │ │ └── ca.org1.example.com-cert.pem
│ │ │ ├── config.yaml
│ │ │ ├── keystore
│ │ │ │ └── key.pem
│ │ │ ├── signcerts
│ │ │ │ └── peer1.org1.example.com-cert.pem
│ │ │ └── tlscacerts
│ │ │ └── tlsca.org1.example.com-cert.pem
│ │ └── tls
│ │ ├── ca.crt
│ │ ├── server.crt
│ │ └── server.key
│ ├── tlsca
│ │ ├── key.pem
│ │ └── tlsca.org1.example.com-cert.pem
│ └── users
│ ├── Admin@org1.example.com
│ │ ├── msp
│ │ │ ├── admincerts
│ │ │ │ └── Admin@org1.example.com-cert.pem
│ │ │ ├── cacerts
│ │ │ │ └── ca.org1.example.com-cert.pem
│ │ │ ├── keystore
│ │ │ │ └── key.pem
│ │ │ ├── signcerts
│ │ │ │ └── Admin@org1.example.com-cert.pem
│ │ │ └── tlscacerts
│ │ │ └── tlsca.org1.example.com-cert.pem
│ │ └── tls
│ │ ├── ca.crt
│ │ ├── client.crt
│ │ └── client.key
│ └── User1@org1.example.com
│ ├── msp
│ │ ├── admincerts
│ │ │ └── User1@org1.example.com-cert.pem
│ │ ├── cacerts
│ │ │ └── ca.org1.example.com-cert.pem
│ │ ├── keystore
│ │ │ └── key.pem
│ │ ├── signcerts
│ │ │ └── User1@org1.example.com-cert.pem
│ │ └── tlscacerts
│ │ └── tlsca.org1.example.com-cert.pem
│ └── tls
│ ├── ca.crt
│ ├── client.crt
│ └── client.key
└── org2.example.com
├── ca
│ ├── CA2_PRIVATE_KEY
│ └── ca.org2.example.com-cert.pem
├── msp
│ ├── admincerts
│ │ └── Admin@org2.example.com-cert.pem
│ ├── cacerts
│ │ └── ca.org2.example.com-cert.pem
│ ├── config.yaml
│ └── tlscacerts
│ └── tlsca.org2.example.com-cert.pem
├── peers
│ ├── peer0.org2.example.com
│ │ ├── msp
│ │ │ ├── admincerts
│ │ │ │ └── Admin@org2.example.com-cert.pem
│ │ │ ├── cacerts
│ │ │ │ └── ca.org2.example.com-cert.pem
│ │ │ ├── config.yaml
│ │ │ ├── keystore
│ │ │ │ └── key.pem
│ │ │ ├── signcerts
│ │ │ │ └── peer0.org2.example.com-cert.pem
│ │ │ └── tlscacerts
│ │ │ └── tlsca.org2.example.com-cert.pem
│ │ └── tls
│ │ ├── ca.crt
│ │ ├── server.crt
│ │ └── server.key
│ └── peer1.org2.example.com
│ ├── msp
│ │ ├── admincerts
│ │ │ └── Admin@org2.example.com-cert.pem
│ │ ├── cacerts
│ │ │ └── ca.org2.example.com-cert.pem
│ │ ├── config.yaml
│ │ ├── keystore
│ │ │ └── key.pem
│ │ ├── signcerts
│ │ │ └── peer1.org2.example.com-cert.pem
│ │ └── tlscacerts
│ │ └── tlsca.org2.example.com-cert.pem
│ └── tls
│ ├── ca.crt
│ ├── server.crt
│ └── server.key
├── tlsca
│ ├── key.pem
│ └── tlsca.org2.example.com-cert.pem
└── users
├── Admin@org2.example.com
│ ├── msp
│ │ ├── admincerts
│ │ │ └── Admin@org2.example.com-cert.pem
│ │ ├── cacerts
│ │ │ └── ca.org2.example.com-cert.pem
│ │ ├── keystore
│ │ │ └── key.pem
│ │ ├── signcerts
│ │ │ └── Admin@org2.example.com-cert.pem
│ │ └── tlscacerts
│ │ └── tlsca.org2.example.com-cert.pem
│ └── tls
│ ├── ca.crt
│ ├── client.crt
│ └── client.key
└── User1@org2.example.com
├── msp
│ ├── admincerts
│ │ └── User1@org2.example.com-cert.pem
│ ├── cacerts
│ │ └── ca.org2.example.com-cert.pem
│ ├── keystore
│ │ └── key.pem
│ ├── signcerts
│ │ └── User1@org2.example.com-cert.pem
│ └── tlscacerts
│ └── tlsca.org2.example.com-cert.pem
└── tls
├── ca.crt
├── client.crt
└── client.key
109 directories, 107 files
我的配置正确吗?特别是两个tlsCACerts
?希望你们能指出我错在哪里,或者指导我找出具体的错误。我会很感激的。
答案 0 :(得分:0)
试试看:
export CORE_PEER_ADDRESS=localhost:7051
编辑 1:
当你发布错误和你的 sh 代码时,看起来像 peer adrees 很糟糕,所以将它导出到你的 peer adrees,在你的情况下,7051
编辑2: 为什么你在没有 sudo 的情况下在 sudo 和服务器上运行构建?这将是problem,尝试在没有sudo的情况下运行两者,如果没有sudo导致您无法运行,请运行:
sudo chmod +x *
您可以将其更改为 *.sh 或类似的内容,因为不会授予您所有文件的权限
答案 1 :(得分:0)
终于找到问题所在了。
我创建了几个 Fabric 网络,但是,路径 <caliper-workspace>/tmp
存储最早的加密配置,因此它报告 access denied
错误。要解决它,请在每次运行卡尺时删除 <caliper-workspace>/tmp