区块链

WeEvent使用区块链FISCO-BCOS作为数据存储和持久化机制。这里列举的是WeEvent访问FISCO-BCOS节点可能出现的问题。关于FISCO-BCOS更多FAQ,参见FISCO-BCOS FAQ

  • FISCO-BCOS节点推荐的组网方式?

基于节点容灾备份的考虑,建议每个机构至少部署2个FISCO-BCOS节点,分布在不同的机器甚至网段上。例如:3个机构间通过一条链互联,则至少应该部署3 * 2 = 6个区块链节点。

  • 怎么查看FISCO-BCOS节点状态?

通过FISCO-BCOS提供的命令行工具monitor.sh

  1. $ ./monitor.sh
  2. {"id":67,"jsonrpc":"2.0","result":"0x299"}
  3. {"id":68,"jsonrpc":"2.0","result":"0x1767"}
  4. [2019-03-28 16:15:43] OK! 0.0.0.0:8545 is working properly: height 0x299 view 0x1767
  5. [2019-03-28 16:15:43] # log parser min, 2019-03-28 16:14
  6. {"id":67,"jsonrpc":"2.0","result":"0x299"}
  7. {"id":68,"jsonrpc":"2.0","result":"0x1767"}
  8. [2019-03-28 16:15:44] OK! 0.0.0.0:8546 is working properly: height 0x299 view 0x1767
  9. [2019-03-28 16:15:44] # log parser min, 2019-03-28 16:14
  10. {"id":67,"jsonrpc":"2.0","result":"0x299"}
  11. {"id":68,"jsonrpc":"2.0","result":"0x1767"}
  12. [2019-03-28 16:15:44] OK! 0.0.0.0:8547 is working properly: height 0x299 view 0x1767
  13. [2019-03-28 16:15:44] # log parser min, 2019-03-28 16:14
  14. {"id":67,"jsonrpc":"2.0","result":"0x299"}
  15. {"id":68,"jsonrpc":"2.0","result":"0x1768"}
  16. [2019-03-28 16:15:44] OK! 0.0.0.0:8548 is working properly: height 0x299 view 0x1768
  • 为什么会出现activeConnections isEmpty错误?

WeEventFISCO-BCOS节点的连接有异常,一般是网络不通引起的。

  1. 2019-01-03 14:18:27.507 [pool-6] ERROR ChannelConnections(ChannelConnections.java:161) - activeConnections isEmpty
  2. 2019-01-03 14:18:28.061 [pool-6] ERROR Service(Service.java:488) - system error
  3. java.lang.Exception: activeConnections isEmpty
  4. at org.bcos.channel.handler.ChannelConnections.randomNetworkConnection(ChannelConnections.java:162) ~[web3sdk-v1.2.6.jar:?]
  5. at org.bcos.channel.client.Service.asyncSendEthereumMessage(Service.java:460) ~[web3sdk-v1.2.6.jar:?]
  6. at org.bcos.channel.client.Service.sendEthereumMessage(Service.java:290) ~[web3sdk-v1.2.6.jar:?]
  7. ...
  • 节点证书异常
  1. =====INIT ECDSA KEYPAIR From private key===
  2. 2019-03-25 10:27:17.624 ERROR [nioEventLoopGroup-2-1] [ChannelHandler.java:147 org.bcos.channel.handler.ChannelHandler.exceptionCaught] network error
  3. io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: General SSLEngine problem
  4. ...
  5. io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
  6. at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
  7. at java.lang.Thread.run(Thread.java:745)

请检查并且更新证书。

  • TODO