当前位置:网站首页>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 .
边栏推荐
- 15Mo3 German standard steel plate 15Mo3 chemical composition 15Mo3 mechanical property analysis of Wuyang Steel Works
- Embedded-c language-10-enumeration / (function) pointer (function) / multi-level pointer /malloc dynamic allocation / file operation
- 【无标题】
- The era of low threshold programmers is gone forever behind the sharp increase in the number of school recruitment for Internet companies
- 2022.2.15
- shardingSphere
- 深度学习训练样本扩增同时修改标签名称
- 《单片机原理及应用》-片外拓展
- Properties of 15MnNiNbDR low temperature vessel steel, Wugang 15MnNiDR and 15MnNiNbDR steel plates
- 01 numpy introduction
猜你喜欢

CPU設計實戰-第四章實踐任務一簡單CPU參考設計調試

Vscode customize the color of each area

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

Li Kou 1358 -- number of substrings containing all three characters (double pointer)

Suivi des cibles de manoeuvre - - mise en oeuvre du modèle statistique actuel (modèle CS) filtre Kalman étendu / filtre Kalman sans trace par MATLAB

Adding color blocks to Seaborn clustermap matrix

On several key issues of digital transformation

Airsim雷达相机融合生成彩色点云

Redis publish subscription

Airsim radar camera fusion to generate color point cloud
随机推荐
一文纵览主流 NFT 市场平台版税、服务费设计
【js逆向】md5加密参数破解
Precautions and skills in using regular expressions in golang
Transaction method call @transactional
《微机原理》——微处理器内部及外部结构
Luogu p1088 [noip2004 popularization group] Martians
Leetcode T40: 组合总和II
15Mo3 German standard steel plate 15Mo3 chemical composition 15Mo3 mechanical property analysis of Wuyang Steel Works
Vscode customize the color of each area
Serial port to WiFi module communication
Airsim radar camera fusion to generate color point cloud
Audio audiorecord create (I)
Field agricultural irrigation system
String coordinates of number to excel
Matlab [function derivation]
《单片机原理及应用》—定时器、串行通信和中断系统
seaborn clustermap矩阵添加颜色块
爬虫知识点总结
NIO-零拷贝
Pipeline detection of UAV Based on gazebo