Blockchain Hyperledger锯齿无法启动devmode共识引擎
我正试图在Ubuntu 16.04上启动一个Hyperledger锯齿形网络。我是按照你的指示去做的 启动验证服务可以正常工作,但启动devmode共识引擎不起作用。发生了以下情况:Blockchain Hyperledger锯齿无法启动devmode共识引擎,blockchain,hyperledger-sawtooth,Blockchain,Hyperledger Sawtooth,我正试图在Ubuntu 16.04上启动一个Hyperledger锯齿形网络。我是按照你的指示去做的 启动验证服务可以正常工作,但启动devmode共识引擎不起作用。发生了以下情况: mdi@boromir:~$ sudo -u sawtooth devmode-engine-rust -vv --connect tcp://localhost:5050 ERROR | devmode_engine_rust: | ReceiveError: TimeoutError DEBUG | sawto
mdi@boromir:~$ sudo -u sawtooth devmode-engine-rust -vv --connect tcp://localhost:5050
ERROR | devmode_engine_rust: | ReceiveError: TimeoutError
DEBUG | sawtooth_sdk::messag | Disconnected outbound channel
DEBUG | sawtooth_sdk::messag | Exited stream
DEBUG | zmq:547 | socket dropped
DEBUG | zmq:547 | socket dropped
DEBUG | zmq:454 | context dropped
mdi@boromir:~$
验证服务正在运行,如下所示:
mdi@boromir:~$ sudo -u sawtooth sawtooth-validator -vv
[sudo] password for mdi:
[2019-03-07 16:40:15.601 WARNING (unknown file)] [src/pylogger.rs: 40] Started logger at level DEBUG
[2019-03-07 16:40:15.919 DEBUG ffi] loading library libsawtooth_validator.so
[2019-03-07 16:40:15.926 DEBUG ffi] loading library libsawtooth_validator.so
[2019-03-07 16:40:16.299 INFO path] Skipping path loading from non-existent config file: /etc/sawtooth/path.toml
[2019-03-07 16:40:16.299 INFO validator] Skipping validator config loading from non-existent config file: /etc/sawtooth/validator.toml
[2019-03-07 16:40:16.300 INFO keys] Loading signing key: /etc/sawtooth/keys/validator.priv
[2019-03-07 16:40:16.306 INFO cli] sawtooth-validator (Hyperledger Sawtooth) version 1.1.4
[2019-03-07 16:40:16.307 INFO cli] config [path]: config_dir = "/etc/sawtooth"; config [path]: key_dir = "/etc/sawtooth/keys"; config [path]: data_dir = "/var/lib/sawtooth"; config [path]: log_dir = "/var/log/sawtooth"; config [path]: policy_dir = "/etc/sawtooth/policy"
[2019-03-07 16:40:16.307 WARNING cli] Network key pair is not configured, Network communications between validators will not be authenticated or encrypted.
[2019-03-07 16:40:16.333 DEBUG state_verifier] verifying state in /var/lib/sawtooth/merkle-00.lmdb
[2019-03-07 16:40:16.337 DEBUG state_verifier] block store file is /var/lib/sawtooth/block-00.lmdb
[2019-03-07 16:40:16.338 INFO state_verifier] Skipping state verification: chain head's state root is present
[2019-03-07 16:40:16.339 INFO cli] Starting validator with serial scheduler
[2019-03-07 16:40:16.339 DEBUG core] global state database file is /var/lib/sawtooth/merkle-00.lmdb
[2019-03-07 16:40:16.340 DEBUG core] txn receipt store file is /var/lib/sawtooth/txn_receipts-00.lmdb
[2019-03-07 16:40:16.341 DEBUG core] block store file is /var/lib/sawtooth/block-00.lmdb
[2019-03-07 16:40:16.342 DEBUG threadpool] Creating thread pool executor Component
[2019-03-07 16:40:16.343 DEBUG threadpool] Creating thread pool executor Network
[2019-03-07 16:40:16.343 DEBUG threadpool] Creating thread pool executor Client
[2019-03-07 16:40:16.343 DEBUG threadpool] Creating thread pool executor Signature
[2019-03-07 16:40:16.345 DEBUG threadpool] Creating thread pool executor FutureCallback
[2019-03-07 16:40:16.346 DEBUG threadpool] Creating thread pool executor FutureCallback
[2019-03-07 16:40:16.352 DEBUG threadpool] Creating thread pool executor Executing
[2019-03-07 16:40:16.353 DEBUG threadpool] Creating thread pool executor Consensus
[2019-03-07 16:40:16.353 DEBUG threadpool] Creating thread pool executor FutureCallback
[2019-03-07 16:40:16.358 DEBUG threadpool] Creating thread pool executor Instrumented
[2019-03-07 16:40:16.368 DEBUG selector_events] Using selector: ZMQSelector
[2019-03-07 16:40:16.376 INFO interconnect] Listening on tcp://127.0.0.1:4004
[2019-03-07 16:40:16.377 DEBUG dispatch] Added send_message function for connection ServerThread
[2019-03-07 16:40:16.377 DEBUG dispatch] Added send_last_message function for connection ServerThread
[2019-03-07 16:40:16.382 DEBUG genesis] genesis_batch_file: /var/lib/sawtooth/genesis.batch
[2019-03-07 16:40:16.384 DEBUG genesis] block_chain_id: not yet specified
[2019-03-07 16:40:16.384 INFO genesis] Producing genesis block from /var/lib/sawtooth/genesis.batch
[2019-03-07 16:40:16.385 DEBUG genesis] Adding 1 batches
该输出时间为17:29,因此近一个小时未追加任何输出
我试图查看锯齿形设置:
mdi@boromir:~$ sawtooth settings list
Error: Unable to connect to "http://localhost:8008": make sure URL is correct
mdi@boromir:~$
我检查了哪些进程正在侦听哪些端口:
mdi@boromir:~$ netstat -plnt
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:4004 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
mdi@boromir:~$
有人知道验证器服务是启动连接还是一致性引擎吗?我的
锯齿设置列表
命令有什么问题?有人知道如何让共识引擎工作吗?谢谢。我自己找到了答案。我有另一台机器,上面安装了Hyperledger锯齿。在该服务器上,验证程序日志有以下行:
[2019-03-08 14:39:02.478 INFO interconnect] Listening on tcp://127.0.0.1:5050
端口5050用于中所述的通用发动机。这表明一致性引擎会启动到验证器服务的连接
那么为什么验证器服务没有监听我Ubuntu机器上的端口5050呢?因为设置事务处理器从未在Ubuntu机器上运行过。我根据Ubuntu教程中的命令启动了这个处理器:
sudo -u sawtooth settings-tp -v
然后验证程序继续并开始监听端口5050。因此,可以启动共识引擎。为其他人的利益在此处添加评论。Hyperledger Sawtooth 1.2版及以后版本的验证器具有这样一种设计,即使用它注册一致性引擎,并且不会出现任何超时错误,如本问题所示。根据设置
sawtooth.consensis.engine.name
和sawtooth.consensis.engine.version
将激活相应的引擎。在这两种情况下,设置TP都起作用,因此应该始终进行注册。