Hyperledger Fabric:尝试通过docker exec更改同级上的日志级别时,“无法创建新连接”

如何解决Hyperledger Fabric:尝试通过docker exec更改同级上的日志级别时,“无法创建新连接”

我在运行macOS 10.15.7的Mac上的Docker中拥有一个正在运行的IBM Blockchain Platform,并且尝试按照该教程创建应用程序。我已经能够使用VS Code命令创建带有某些事务的智能合约,现在是时候从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问题:
$ docker exec 1OrgLocalFabric_peer0.org1.example.com peer logging setlevel -h
Adds the logger and log level to the current logging specification.

Usage:
  peer logging setlevel <logger> <log level> [flags]

Flags:
  -h,--help   help for setlevel

我的对等容器在启动时显示以下日志。

$ 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" ],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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 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时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;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,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;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[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 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 -&gt; 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(&quot;/hires&quot;) 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&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-