当前位置:网站首页>Configuration and startup of Chang'an chain synchronization node
Configuration and startup of Chang'an chain synchronization node
2022-07-01 08:34:00 【Handsome Wutong】
Node certificate generation
1、 The default script generates the synchronization node configuration
In the use of
./prepare_pk.sh
When generating the chain configuration , Default
crypto-config\wx-org1.chainmaker.org\node
The certificate files of two types of nodes are generated inside , One is the consensus node consensus1, One is the synchronization node common1.
2、 adopt chainmaker-cryptogen Or self built CA Certificate Services Generate synchronization node Certificate
Synchronize node configuration generation
In the boot node configuration file , Only the startup configuration of the consensus node , If you need to start the synchronization node , You need to add a new synchronization node configuration , The specific steps are as follows :
1. Copy the deployment package
$ cd build/release
$ cp -rf chainmaker-v2.0.0-wx-org1.chainmaker.org chainmaker-v2.0.0-wx-org1.chainmaker.org_common1
2. hold chainmaker-v2.0.0-wx-org1.chainmaker.org_common1/bin All of them .sh All in the script wx-org1.chainmaker.org Replace with wx-org1.chainmaker.org_common1
3. rename
$ cd build/release/chainmaker-v2.0.0-wx-org1.chainmaker.org_common1/config
$ mv wx-org1.chainmaker.org wx-org1.chainmaker.org_common1
4. Copy chainmaker-cryptogen Extension generated crypto-config/wx-org1.chainmaker.org/node/common1 To chainmaker-v2.0.0-wx-org1.chainmaker.org_common1/config/wx-org1.chainmaker.org_common1/certs/node Next
5. modify chainmaker.yml
hold chainmaker-v2.0.0-wx-org1.chainmaker.org_common1/config/wx-org1.chainmaker.org_common1/chainmaker.yml Included in all paths in wx-org1.chainmaker.org Replace with wx-org1.chainmaker.org_common1. Note that this refers to all paths , Don't put the node Inside the module org_id Changed , This org_id It refers to the organization to which the synchronization node belongs .
modify node modular , hold certs/node/consensus1/consensus1.sign.key It is amended as follows certs/node/common1/common1.sign.key
modify node modular , hold certs/node/consensus1/consensus1.sign.crt It is amended as follows certs/node/common1/common1.sign.crt
modify net modular , hold certs/node/consensus1/consensus1.tls.key It is amended as follows certs/node/common1/common1.tls.key
modify net modular , hold certs/node/consensus1/consensus1.tls.crt It is amended as follows certs/node/common1/common1.tls.crt
modify net modular , hold listen_addr: /ip4/0.0.0.0/tcp/11301 It is amended as follows listen_addr: /ip4/0.0.0.0/tcp/11306
modify rpc modular , hold certs/node/consensus1/consensus1.tls.crt It is amended as follows certs/node/common1/common1.tls.crt
modify rpc modular , hold certs/node/consensus1/consensus1.tls.key It is amended as follows certs/node/common1/common1.tls.key
modify rpc modular , hold port: 12301 It is amended as follows port: 12306
modify monitor modular , hold port: 14321 It is amended as follows port: 14326
modify pprof modular , hold port: 24321 It is amended as follows port: 24326
6. modify chainmaker-v2.0.0-wx-org1.chainmaker.org_common1/config/wx-org1.chainmaker.org_common1/chainconfig/bc1.yml Medium trust_roots modular .
Put all the ../config/wx-org1.chainmaker.org It is amended as follows ../config/wx-org1.chainmaker.org_common1
7. Start node
$ cd build/release/chainmaker-v2.0.0-wx-org1.chainmaker.org_common1/bin
$ ./start.sh
8. EndException resolution
problem 1: The synchronization node cannot start normally
[Blockchain] blockchain/chainmaker_server.go:192 init blockchain[chain1] failed, fail to initialize identity management service: [setup cert member failed, organization information in certificate and in input parameter do not match [certificate: wx-org1.chainmaker.org, parameter: wx-org1.chainmaker.org_common1]]The reason for this exception is to modify chainmaker.yml Included in all paths in wx-org1.chainmaker.org Replace with wx-org1.chainmaker.org_common1 When the node Inside the module org_id Also replace with wx-org1.chainmaker.org_common1 了 , This org_id It refers to the organization to which the synchronization node belongs , Organization of nodes ID by wx-org1.chainmaker.org, So it is reduced to no common1 The suffix of .
problem 2: An error is reported in the synchronization block of the synchronization node
2022-06-29 16:10:37.641 [ERROR] [Storage] @chain1 [email protected]/blockstore_impl.go:525 chain[chain1] failed to write log, block[1], err:out of order
2022-06-29 16:10:37.641 [ERROR] [Core] @chain1 common/committer.go:90 out of order
2022-06-29 16:10:37.641 [ERROR] [Core] @chain1 common/block_helper.go:961 cache add block err: out of order
2022-06-29 16:10:37.641 [ERROR] [Sync] @chain1 sync/routine.go:70 process msg failed, reason: failed add block to chain
2022-06-29 16:11:12.561 [ERROR] [Storage] @chain1 blockfiledb/blockfile.go:478 out of order, b.entry.index: 2 and l.lastIndex+uint64(1): 1
2022-06-29 16:11:12.561 [ERROR] [Storage] @chain1 blockfiledb/blockfile.go:481 your block file db is damaged or not use this feature before, please check your disable_block_file_db setting in chainmaker.yml
The reason for this exception is that some block data has been written to the file or... After startup due to incorrect configuration for the first time db It's in , After modifying the configuration file and restarting , This will cause the new synchronization node to be unable to synchronize to the block data from other consensus nodes , At this time, it is necessary to clean up the block data generated by the incorrect startup of the front side , The cleaning method is... To the node configuration file data Catalog , Delete the folder below , If it works to mysql Need to mysql Delete all databases related to nodes , Restart the node to recover .
边栏推荐
- 【无标题】
- Tita OKR: a dashboard to master the big picture
- P4 安装bmv2 详细教程
- 机动目标跟踪——当前统计模型(CS模型)扩展卡尔曼滤波/无迹卡尔曼滤波 matlab实现
- Hijacking a user's browser with beef
- CPU設計實戰-第四章實踐任務一簡單CPU參考設計調試
- 2022.2.15
- Huawei machine test questions column subscription Guide
- [untitled]
- 2022 examination summary of quality controller civil engineering direction post skills (quality controller) and reexamination examination of quality controller civil engineering direction post skills
猜你喜欢

SPL installation and basic use (II)

Comprehensive experiment Li

机动目标跟踪——当前统计模型(CS模型)扩展卡尔曼滤波/无迹卡尔曼滤波 matlab实现

使用beef劫持用戶瀏覽器
![[untitled]](/img/be/3523d0c14d555b293673af2b6fbcff.jpg)
[untitled]

15Mo3 German standard steel plate 15Mo3 chemical composition 15Mo3 mechanical property analysis of Wuyang Steel Works

《MATLAB 神经网络43个案例分析》:第30章 基于随机森林思想的组合分类器设计——乳腺癌诊断

P4 安装bmv2 详细教程

使用beef劫持用户浏览器

01 numpy introduction
随机推荐
【华为机试真题详解】判断字符串子序列【2022 Q1 Q2 | 200分】
Review of week 280 of leetcode
【C】 Summary of wrong questions in winter vacation
SPL Introduction (I)
使用 setoolkit 伪造站点窃取用户信息
Principle and application of single chip microcomputer - off chip development
Precautions and skills in using regular expressions in golang
R语言入门
Practice and Thinking on the architecture of a set of 100000 TPS im integrated message system
Anddroid text to speech TTS implementation
Leetcode t31: prochain arrangement
Why are some Wills made by husband and wife invalid
Provincial election + noi Part VI skills and ideas
分享2022上半年我读过的7本书
机动目标跟踪——当前统计模型(CS模型)扩展卡尔曼滤波/无迹卡尔曼滤波 matlab实现
shardingSphere
Matlab [function derivation]
Count number of rows per group and add result to original data frame
Intelligent water supply system solution
[redis] it takes you through redis installation and connection at one go