当前位置:网站首页>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 .
边栏推荐
- Huawei machine test questions column subscription Guide
- Luogu p3799 demon dream stick
- Conception et mise en service du processeur - chapitre 4 tâches pratiques
- How to use OKR as the leadership framework of marketing department
- 量化交易之读书篇 - 《征服市场的人》读书笔记
- [untitled]
- Airsim radar camera fusion to generate color point cloud
- factory type_id::create过程解析
- Burpsuite -- brute force cracking of intruder
- Maneuvering target tracking -- current statistical model (CS model) extended Kalman filter / unscented Kalman filter matlab implementation
猜你喜欢

01 numpy introduction

R语言入门

shardingSphere

Practice and Thinking on the architecture of a set of 100000 TPS im integrated message system

分享2022上半年我读过的7本书
![Matlab [functions and images]](/img/8a/d2f68b5a7ed396ad20234c0aa24953.jpg)
Matlab [functions and images]

Airsim radar camera fusion to generate color point cloud

《微机原理》——微处理器内部及外部结构

The data analyst will be ruined without project experience. These 8 project resources will not be taken away

When using charts to display data, the time field in the database is repeated. How to display the value at this time?
随机推荐
机动目标跟踪——当前统计模型(CS模型)扩展卡尔曼滤波/无迹卡尔曼滤波 matlab实现
Thread safety analysis of [concurrent programming JUC] variables
Embedded-c language-10-enumeration / (function) pointer (function) / multi-level pointer /malloc dynamic allocation / file operation
SPL Introduction (I)
2022 examination summary of quality controller civil engineering direction post skills (quality controller) and reexamination examination of quality controller civil engineering direction post skills
华为机试真题专栏订阅指引
Leetcode t31: next spread
R语言入门
Pipeline detection of UAV Based on gazebo
MATLAB小技巧(23)矩阵分析--模拟退火
Codeworks round 803 (Div. 2) VP supplement
What is the material of 16MnDR, the minimum service temperature of 16MnDR, and the chemical composition of 16MnDR
2022 ordinary scaffolder (special type of construction work) examination question bank and the latest analysis of ordinary scaffolder (special type of construction work)
Tita OKR: a dashboard to master the big picture
《单片机原理与应用》——并行IO口原理
Leetcode t29: divide two numbers
15Mo3 German standard steel plate 15Mo3 chemical composition 15Mo3 mechanical property analysis of Wuyang Steel Works
XX攻击——反射型 XSS 攻击劫持用户浏览器
View drawing process analysis
量化交易之读书篇 - 《征服市场的人》读书笔记