Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Sign in
issue
issue
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 11
    • Issues 11
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!

  • chainmaker
  • issueissue
  • Issues
  • #1532

Closed
Open
Opened Jan 21, 2026 by zhen yin@yinzhen

新增组织节点启动后,sdk报与节点连接的错误

执行步骤:

  1. 组织A的节点a作为创世节点启动,后向该节点发送了7个区块,正常落块。
  2. 新增组织B的节点b,先在节点a执行trust root add操作将组织B根证书写入链上,然后启动节点b。
  3. 在节点b通过 cmc 发送获取本地高度的请求,会报连接本地节点的错误。 执行的命令:image sdk.log:image 必须在本地尝试三四次之后,才能正常查询到区块。

同样的流程,用代码去实现,sdk会报tls证书错误:failed rpc error: code = Unavailable desc = connection error: desc = "error reading server preface: remote error: tls: bad certificate", try to connect another node,在代码中会进行重试,每隔1s发一次获取本地区块高度的请求,发大概10次之后才能成功查到区块,代码中本身后续的流程是查询自己的高度和节点a的高度做对比,相差5个以内就去尝试升级为共识节点的操作,但是这里在查询本地区块高度时,连接的自己的节点,却报的tls证书错误(排除证书传错,因为在不中断程序的情况下,尝试10次之后是可以成功的),目前猜测是不是因为必须同步到trust root的交易,然后节点rpc服务重启之后才能正常,因为从节点日志来看可能是这个原因,rpc服务自动重启,后续就能正常交易。image想知道为什么连自己的节点都需要重试才能查询到区块?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: chainmaker/issue#1532

Copyright © 2021 ChainMaker Org. All Rights Reserved. 长安链 版权所有。