Hyperledger fabric Hyperledger结构:“;未能创建新连接";试图通过“docker exec”更改对等计算机上的日志级别时`

Hyperledger fabric Hyperledger结构:“;未能创建新连接";试图通过“docker exec”更改对等计算机上的日志级别时`,hyperledger-fabric,ibm-blockchain,docker-exec,Hyperledger Fabric,Ibm Blockchain,Docker Exec,我在Mac上运行macOS 10.15.7的Docker中有一个运行IBM区块链平台,我尝试按照教程创建应用程序。我已经能够使用VS代码命令为一些事务创建智能合约,现在是从TypeScript应用程序创建智能合约的时候了。为了调试我得到的错误,我想设置对等节点的日志级别。我想下面是我想要的,但是命令失败了: $ docker exec 1OrgLocalFabric_peer0.org1.example.com peer logging setlevel \* debug Error: admi

我在Mac上运行macOS 10.15.7的Docker中有一个运行IBM区块链平台,我尝试按照教程创建应用程序。我已经能够使用VS代码命令为一些事务创建智能合约,现在是从TypeScript应用程序创建智能合约的时候了。为了调试我得到的错误,我想设置对等节点的日志级别。我想下面是我想要的,但是命令失败了:

$ docker exec 1OrgLocalFabric_peer0.org1.example.com peer logging setlevel \* debug
Error: admin client failed to connect to 0.0.0.0:7051: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 0.0.0.0:7051: connect: connection refused"
我的设置如下所示:

$ docker container ls
CONTAINER ID        IMAGE                                                                                                            COMMAND                  CREATED             STATUS              PORTS                                            NAMES
4ca2bd291ad5        1orglocalfabric-org1peer1-demo-contract-0.0.2-92d1c8b9c0742ebaa0e424a0ccfcf1c780b3beec6331d6a6b8f0a8f973af62fa   "/bin/sh -c 'cd /usr…"   3 hours ago         Up 3 hours                                                           1OrgLocalFabric-Org1Peer1-demo-contract-0.0.2
6703ee38c131        hyperledger/fabric-orderer:1.4.6                                                                                 "orderer"                2 days ago          Up 3 hours          7050/tcp, 0.0.0.0:17056-17057->17056-17057/tcp   1OrgLocalFabric_orderer.example.com
dae57af8c671        hyperledger/fabric-ca:1.4.6                                                                                      "sh -c 'fabric-ca-se…"   2 days ago          Up 3 hours          7054/tcp, 0.0.0.0:17055->17055/tcp               1OrgLocalFabric_ca.orderer.example.com
7cdcc957d720        hyperledger/fabric-peer:1.4.6                                                                                    "peer node start"        2 days ago          Up 3 hours          0.0.0.0:17051-17053->17051-17053/tcp             1OrgLocalFabric_peer0.org1.example.com
9f7a54e23208        couchdb:2.3.1                                                                                                    "tini -- /docker-ent…"   2 days ago          Up 3 hours          4369/tcp, 9100/tcp, 0.0.0.0:17054->5984/tcp      1OrgLocalFabric_couchdb0.org1.example.com
5546c72bbeae        hyperledger/fabric-ca:1.4.6                                                                                      "sh -c 'fabric-ca-se…"   2 days ago          Up 3 hours          7054/tcp, 0.0.0.0:17050->17050/tcp               1OrgLocalFabric_ca.org1.example.com
有点奇怪的是:

  • 使用了
    17051
    周围的端口,但出现故障的是
    7051
    。我在什么地方错过了
    1
  • 以下内容不存在TCP问题:
我注意到开头有几行,但我不知道如何解释它们:

2020-10-23 14:39:14.452 UTC [peer] func1 -> INFO 006 Auto-detected peer address: 172.18.0.4:7051
2020-10-23 14:39:14.452 UTC [peer] func1 -> INFO 007 Host is 0.0.0.0 , falling back to auto-detected address: 172.18.0.4:7051
$ docker logs --since "2020-10-23T14:39:15" 7cdcc957d720
2020-10-23 14:39:14.406 UTC [nodeCmd] serve -> INFO 001 Starting peer:
 Version: 1.4.6
 Commit SHA: 635fa7bc8
 Go version: go1.12.12
 OS/Arch: linux/amd64
 Chaincode:
  Base Image Version: 0.4.18
  Base Docker Namespace: hyperledger
  Base Docker Label: org.hyperledger.fabric
  Docker Namespace: hyperledger
2020-10-23 14:39:14.407 UTC [ledgermgmt] initialize -> INFO 002 Initializing ledger mgmt
2020-10-23 14:39:14.407 UTC [kvledger] NewProvider -> INFO 003 Initializing ledger provider
2020-10-23 14:39:14.421 UTC [kvledger] NewProvider -> INFO 004 ledger provider Initialized
2020-10-23 14:39:14.452 UTC [ledgermgmt] initialize -> INFO 005 ledger mgmt initialized
2020-10-23 14:39:14.452 UTC [peer] func1 -> INFO 006 Auto-detected peer address: 172.18.0.4:7051
2020-10-23 14:39:14.452 UTC [peer] func1 -> INFO 007 Host is 0.0.0.0 , falling back to auto-detected address: 172.18.0.4:7051
2020-10-23 14:39:14.453 UTC [peer] func1 -> INFO 008 Auto-detected peer address: 172.18.0.4:7051
2020-10-23 14:39:14.453 UTC [peer] func1 -> INFO 009 Host is 0.0.0.0 , falling back to auto-detected address: 172.18.0.4:7051
2020-10-23 14:39:14.454 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00a Entering computeChaincodeEndpoint with peerHostname: 172.18.0.4
2020-10-23 14:39:14.454 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00b Exit with ccEndpoint: 172.18.0.4:17052
2020-10-23 14:39:14.454 UTC [sccapi] registerSysCC -> INFO 00c system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered
2020-10-23 14:39:14.455 UTC [sccapi] registerSysCC -> INFO 00d system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered
2020-10-23 14:39:14.455 UTC [sccapi] registerSysCC -> INFO 00e system chaincode qscc(github.com/hyperledger/fabric/core/scc/qscc) registered
2020-10-23 14:39:14.455 UTC [sccapi] registerSysCC -> INFO 00f system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle,true) disabled
2020-10-23 14:39:14.458 UTC [gossip.service] func1 -> INFO 010 Initialize gossip with endpoint 172.18.0.4:7051 and bootstrap set [peer0.org1.example.com:17051]
2020-10-23 14:39:14.463 UTC [gossip.gossip] NewGossipService -> INFO 011 Creating gossip service with self membership of Endpoint: peer0.org1.example.com:17051, InternalEndpoint: 172.18.0.4:7051, PKI-ID: 2a820df597b43bf22f446729873a80e9b0718415d6eed8fe26b5e0abe6ee9866, Metadata:
2020-10-23 14:39:14.464 UTC [gossip.gossip] start -> INFO 012 Gossip instance 172.18.0.4:7051 started
2020-10-23 14:39:14.464 UTC [sccapi] deploySysCC -> INFO 013 system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed
2020-10-23 14:39:14.465 UTC [cscc] Init -> INFO 014 Init CSCC
2020-10-23 14:39:14.465 UTC [sccapi] deploySysCC -> INFO 015 system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed
2020-10-23 14:39:14.466 UTC [qscc] Init -> INFO 016 Init QSCC
2020-10-23 14:39:14.466 UTC [sccapi] deploySysCC -> INFO 017 system chaincode qscc/(github.com/hyperledger/fabric/core/scc/qscc) deployed
2020-10-23 14:39:14.466 UTC [sccapi] deploySysCC -> INFO 018 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled
2020-10-23 14:39:14.466 UTC [nodeCmd] serve -> INFO 019 Deployed system chaincodes
2020-10-23 14:39:14.467 UTC [peer] Initialize -> INFO 01a Loading chain mychannel
2020-10-23 14:39:14.467 UTC [ledgermgmt] OpenLedger -> INFO 01b Opening ledger with id = mychannel
2020-10-23 14:39:14.478 UTC [ledgermgmt] OpenLedger -> INFO 01c Opened ledger with id = mychannel
2020-10-23 14:39:14.483 UTC [gossip.gossip] JoinChan -> INFO 01d Joining gossip network of channel mychannel with 1 organizations
2020-10-23 14:39:14.483 UTC [gossip.gossip] learnAnchorPeers -> INFO 01e Learning about the configured anchor peers of Org1MSP for channel mychannel : [{peer0.org1.example.com 17051}]
2020-10-23 14:39:14.483 UTC [gossip.gossip] learnAnchorPeers -> INFO 01f Anchor peer with same endpoint, skipping connecting to myself
2020-10-23 14:39:14.490 UTC [gossip.state] NewGossipStateProvider -> INFO 020 Updating metadata information for channel mychannel, current ledger sequence is at = 5, next expected block is = 6
2020-10-23 14:39:14.492 UTC [sccapi] deploySysCC -> INFO 021 system chaincode lscc/mychannel(github.com/hyperledger/fabric/core/scc/lscc) deployed
2020-10-23 14:39:14.492 UTC [cscc] Init -> INFO 022 Init CSCC
2020-10-23 14:39:14.492 UTC [sccapi] deploySysCC -> INFO 023 system chaincode cscc/mychannel(github.com/hyperledger/fabric/core/scc/cscc) deployed
2020-10-23 14:39:14.493 UTC [qscc] Init -> INFO 024 Init QSCC
2020-10-23 14:39:14.493 UTC [sccapi] deploySysCC -> INFO 025 system chaincode qscc/mychannel(github.com/hyperledger/fabric/core/scc/qscc) deployed
2020-10-23 14:39:14.493 UTC [sccapi] deploySysCC -> INFO 026 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled
2020-10-23 14:39:14.502 UTC [discovery] NewService -> INFO 027 Created with config TLS: false, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000
2020-10-23 14:39:14.502 UTC [nodeCmd] registerDiscoveryService -> INFO 028 Discovery service activated
2020-10-23 14:39:14.503 UTC [nodeCmd] serve -> INFO 029 Starting peer with ID=[name:"Org1Peer1" ], network ID=[1OrgLocalFabric], address=[172.18.0.4:7051]
2020-10-23 14:39:14.503 UTC [nodeCmd] serve -> INFO 02a Started peer with ID=[name:"Org1Peer1" ], network ID=[1OrgLocalFabric], address=[172.18.0.4:7051]
2020-10-23 14:39:14.504 UTC [kvledger] LoadPreResetHeight -> INFO 02b Loading prereset height from path [/var/hyperledger/production/ledgersData/chains]
2020-10-23 14:39:14.504 UTC [fsblkstorage] LoadPreResetHeight -> INFO 02c Loading Pre-reset heights
2020-10-23 14:39:14.504 UTC [fsblkstorage] preRestHtFiles -> INFO 02d Found ledgers - [mychannel]
2020-10-23 14:39:14.504 UTC [fsblkstorage] LoadPreResetHeight -> INFO 02e Pre-reset heights loaded
2020-10-23 14:39:20.495 UTC [gossip.election] beLeader -> INFO 02f 2a820df597b43bf22f446729873a80e9b0718415d6eed8fe26b5e0abe6ee9866 : Becoming a leader
2020-10-23 14:39:20.495 UTC [gossip.service] func1 -> INFO 030 Elected as a leader, starting delivery service for channel mychannel
2020-10-23 14:39:20.495 UTC [deliveryClient] StartDeliverForChannel -> INFO 031 This peer will retrieve blocks from ordering service and disseminate to other peers in the organization for channel mychannel
2020-10-23 14:39:20.500 UTC [deliveryClient] RequestBlocks -> INFO 032 Starting deliver with block [6] for channel mychannel
2020-10-23 14:39:14.452 UTC [peer] func1 -> INFO 006 Auto-detected peer address: 172.18.0.4:7051
2020-10-23 14:39:14.452 UTC [peer] func1 -> INFO 007 Host is 0.0.0.0 , falling back to auto-detected address: 172.18.0.4:7051