锯齿事务处理器无响应

时间:2021-04-30 07:46:46

标签: hyperledger-sawtooth

我有一个使用 devmode 共识引擎由 1 个节点组成的锯齿测试网络。我有 2 个事务处理器,settings-tp 和我的自定义 tp。

sawtooth-devmode-engine-rust-default   devmode-engine-rust -C tcp ...   Up                                      
sawtooth-myapp-tp                       start_myapp_tp -vv -C tcp:/ ...   Up      4004/tcp                        
sawtooth-myapp-web-client               /bin/sh -c npm install &&  ...   Up      0.0.0.0:3000->3000/tcp          
sawtooth-rest-api-default              sawtooth-rest-api -C tcp:/ ...   Up      4004/tcp, 0.0.0.0:8008->8008/tcp
sawtooth-settings-tp-default           settings-tp -vv -C tcp://v ...   Up      4004/tcp                        
sawtooth-validator-default             bash -c sawadm keygen && s ...   Up      4004/tcp, 5050/tcp, 8800/tcp

在我启动容器后,验证器的日志开始为两个 tp 显示“< TX PROCESSOR ID > 没有响应”。

根据我在日志中读到的内容,settings-tp 确实回复了 ping 请求,但由于任何原因验证器没有收到回复:

sawtooth-validator-default | [2021-04-30 07:36:20.255 INFO     processor_handlers] registered transaction processor: connection_id=ee833407916660adb5a632b46b80658e01bec7a9b1ec22d62b8c178e75bf0c9deec06561cbce60b69e541d87a3534781ba82e22206deb2c42dc3fa6b3cc28271, family=sawtooth_settings, version=1.0, namespaces=['000000'], max_occupancy=10
sawtooth-validator-default | [2021-04-30 07:36:39.823 DEBUG    interconnect] No response from ee833407916660adb5a632b46b80658e01bec7a9b1ec22d62b8c178e75bf0c9deec06561cbce60b69e541d87a3534781ba82e22206deb2c42dc3fa6b3cc28271 in 19.52631163597107 seconds - beginning heartbeat pings.
sawtooth-settings-tp-default | INFO  | sawtooth_sdk::proces | Message: 8ca2d80b57434d6e8bcc0e6329440b0b
sawtooth-settings-tp-default | INFO  | sawtooth_sdk::proces | sending PingResponse
sawtooth-validator-default | [2021-04-30 07:36:49.832 DEBUG    interconnect] No response from ee833407916660adb5a632b46b80658e01bec7a9b1ec22d62b8c178e75bf0c9deec06561cbce60b69e541d87a3534781ba82e22206deb2c42dc3fa6b3cc28271 in 10.005645275115967 seconds - beginning heartbeat pings.
sawtooth-settings-tp-default | INFO  | sawtooth_sdk::proces | Message: d3b72c9d11f547f3bff4eca13682794b
sawtooth-settings-tp-default | INFO  | sawtooth_sdk::proces | sending PingResponse

其他处理器(我的自定义应用程序)似乎收到了 PING,但似乎没有回复。

sawtooth-validator-default | [2021-04-30 07:36:21.305 INFO     processor_handlers] registered transaction processor: connection_id=f60cab39150e1fcb019ec273b7c66a240f541f4f7cde0cc099abb5cb58565fcd60ec051ddeedbc06c294c5a1756812bb2de82041109c5ac7b418584a997cce72, family=myapp, version=1.0, namespaces=['7749f2'], max_occupancy=10
sawtooth-myapp-tp   | [2021-04-30 07:36:21.305 INFO     core] register attempt: OK
sawtooth-validator-default | [2021-04-30 07:36:39.824 DEBUG    interconnect] No response from f60cab39150e1fcb019ec273b7c66a240f541f4f7cde0cc099abb5cb58565fcd60ec051ddeedbc06c294c5a1756812bb2de82041109c5ac7b418584a997cce72 in 18.519431829452515 seconds - beginning heartbeat pings.
sawtooth-myapp-tp   | [2021-04-30 07:36:39.827 DEBUG    core] received message of type: PING_REQUEST
sawtooth-validator-default | [2021-04-30 07:36:49.833 DEBUG    interconnect] No response from f60cab39150e1fcb019ec273b7c66a240f541f4f7cde0cc099abb5cb58565fcd60ec051ddeedbc06c294c5a1756812bb2de82041109c5ac7b418584a997cce72 in 10.003223180770874 seconds - beginning heartbeat pings.
sawtooth-myapp-tp   | [2021-04-30 07:36:49.836 DEBUG    core] received message of type: PING_REQUEST

这是所有容器的完整日志:

Creating sawtooth-validator-default ... done
Creating sawtooth-rest-api-default            ... done
Creating sawtooth-settings-tp-default         ... done
Creating sawtooth-myapp-tp                     ... done
Creating sawtooth-devmode-engine-rust-default ... done
Creating sawtooth-myapp-web-client             ... done
Attaching to sawtooth-validator-default, sawtooth-settings-tp-default, sawtooth-myapp-tp, sawtooth-rest-api-default, sawtooth-devmode-engine-rust-default, sawtooth-myapp-web-client
sawtooth-settings-tp-default | INFO  | settings_tp:95       | Console logging level: DEBUG
sawtooth-settings-tp-default | INFO  | sawtooth_sdk::proces | connecting to endpoint: tcp://validator:4004
sawtooth-settings-tp-default | INFO  | sawtooth_sdk::proces | sending TpRegisterRequest: sawtooth_settings 1.0
sawtooth-settings-tp-default | INFO  | sawtooth_sdk::proces | Message: 66c2fab84d4b4a049ef296b16e9d79b2
sawtooth-settings-tp-default | INFO  | settings_tp::handler | Setting "sawtooth.settings.vote.authorized_keys" changed to "03f555cd85528c1757f82228cb6616d9da7ef5405a2e37f0ecd55908f45f3478d2"
sawtooth-settings-tp-default | INFO  | sawtooth_sdk::proces | TP_PROCESS_REQUEST sending TpProcessResponse: OK
sawtooth-settings-tp-default | INFO  | sawtooth_sdk::proces | Message: b380d42feac8468ebfb4c19b69f493cc
sawtooth-validator-default | writing file: /etc/sawtooth/keys/validator.priv
sawtooth-validator-default | writing file: /etc/sawtooth/keys/validator.pub
sawtooth-settings-tp-default | INFO  | settings_tp::handler | Setting "sawtooth.consensus.algorithm.name" changed to "Devmode"
sawtooth-settings-tp-default | INFO  | sawtooth_sdk::proces | TP_PROCESS_REQUEST sending TpProcessResponse: OK
sawtooth-settings-tp-default | INFO  | sawtooth_sdk::proces | Message: 7669b08eb69e4933b199a6e342d4c97d
sawtooth-validator-default | creating key directory: /root/.sawtooth/keys
sawtooth-validator-default | writing file: /root/.sawtooth/keys/my_key.priv
sawtooth-validator-default | writing file: /root/.sawtooth/keys/my_key.pub
sawtooth-settings-tp-default | INFO  | settings_tp::handler | Setting "sawtooth.consensus.algorithm.version" changed to "0.1"
sawtooth-validator-default | Generated config-genesis.batch
sawtooth-settings-tp-default | INFO  | sawtooth_sdk::proces | TP_PROCESS_REQUEST sending TpProcessResponse: OK
sawtooth-validator-default | Processing config-genesis.batch...
sawtooth-validator-default | Processing config.batch...
sawtooth-validator-default | Generating /var/lib/sawtooth/genesis.batch
sawtooth-validator-default | [2021-04-30 07:36:19.473 WARNING  (unknown file)] [src/pylogger.rs: 40] Started logger at level DEBUG
sawtooth-validator-default | [2021-04-30 07:36:19.618 DEBUG    ffi] loading library libsawtooth_validator.so
sawtooth-validator-default | [2021-04-30 07:36:19.621 DEBUG    ffi] loading library libsawtooth_validator.so
sawtooth-validator-default | [2021-04-30 07:36:19.793 INFO     path] Skipping path loading from non-existent config file: /etc/sawtooth/path.toml
sawtooth-validator-default | [2021-04-30 07:36:19.793 INFO     validator] Skipping validator config loading from non-existent config file: /etc/sawtooth/validator.toml
sawtooth-validator-default | [2021-04-30 07:36:19.793 INFO     keys] Loading signing key: /etc/sawtooth/keys/validator.priv
sawtooth-validator-default | [2021-04-30 07:36:19.795 INFO     cli] sawtooth-validator (Hyperledger Sawtooth) version 1.2.6
sawtooth-validator-default | [2021-04-30 07:36:19.795 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"
sawtooth-validator-default | [2021-04-30 07:36:19.795 WARNING  cli] Network key pair is not configured, Network communications between validators will not be authenticated or encrypted.
sawtooth-validator-default | [2021-04-30 07:36:19.798 DEBUG    state_verifier] verifying state in /var/lib/sawtooth/merkle-00.lmdb
sawtooth-validator-default | [2021-04-30 07:36:19.798 DEBUG    state_verifier] block store file is /var/lib/sawtooth/block-00.lmdb
sawtooth-validator-default | [2021-04-30 07:36:19.798 INFO     state_verifier] Skipping state verification: chain head's state root is present
sawtooth-validator-default | [2021-04-30 07:36:19.799 INFO     cli] Starting validator with parallel scheduler
sawtooth-validator-default | [2021-04-30 07:36:19.799 DEBUG    core] global state database file is /var/lib/sawtooth/merkle-00.lmdb
sawtooth-validator-default | [2021-04-30 07:36:19.799 DEBUG    core] txn receipt store file is /var/lib/sawtooth/txn_receipts-00.lmdb
sawtooth-validator-default | [2021-04-30 07:36:19.799 DEBUG    core] block store file is /var/lib/sawtooth/block-00.lmdb
sawtooth-validator-default | [2021-04-30 07:36:19.800 DEBUG    threadpool] Creating thread pool executor Component
sawtooth-validator-default | [2021-04-30 07:36:19.800 DEBUG    threadpool] Creating thread pool executor Network
sawtooth-validator-default | [2021-04-30 07:36:19.800 DEBUG    threadpool] Creating thread pool executor Client
sawtooth-validator-default | [2021-04-30 07:36:19.800 DEBUG    threadpool] Creating thread pool executor Signature
sawtooth-validator-default | [2021-04-30 07:36:19.800 DEBUG    threadpool] Creating thread pool executor FutureCallback
sawtooth-validator-default | [2021-04-30 07:36:19.801 DEBUG    threadpool] Creating thread pool executor FutureCallback
sawtooth-validator-default | [2021-04-30 07:36:19.801 DEBUG    threadpool] Creating thread pool executor Executing
sawtooth-validator-default | [2021-04-30 07:36:19.802 DEBUG    threadpool] Creating thread pool executor Consensus
sawtooth-validator-default | [2021-04-30 07:36:19.802 DEBUG    threadpool] Creating thread pool executor FutureCallback
sawtooth-validator-default | [2021-04-30 07:36:19.805 DEBUG    selector_events] Using selector: ZMQSelector
sawtooth-validator-default | [2021-04-30 07:36:19.806 INFO     interconnect] Listening on tcp://eth0:4004
sawtooth-validator-default | [2021-04-30 07:36:19.806 DEBUG    dispatch] Added send_message function for connection ServerThread
sawtooth-validator-default | [2021-04-30 07:36:19.806 DEBUG    dispatch] Added send_last_message function for connection ServerThread
sawtooth-validator-default | [2021-04-30 07:36:19.807 DEBUG    genesis] genesis_batch_file: /var/lib/sawtooth/genesis.batch
sawtooth-validator-default | [2021-04-30 07:36:19.807 DEBUG    genesis] block_chain_id: not yet specified
sawtooth-validator-default | [2021-04-30 07:36:19.808 INFO     genesis] Producing genesis block from /var/lib/sawtooth/genesis.batch
sawtooth-validator-default | [2021-04-30 07:36:19.808 DEBUG    genesis] Adding 2 batches
sawtooth-validator-default | [2021-04-30 07:36:19.809 INFO     processor_manager] waiting for processor type sawtooth_settings: 1.0 to register
sawtooth-validator-default | [2021-04-30 07:36:20.255 WARNING  processor_handlers] Max occupancy was not provided by transaction processor: ee833407916660adb5a632b46b80658e01bec7a9b1ec22d62b8c178e75bf0c9deec06561cbce60b69e541d87a3534781ba82e22206deb2c42dc3fa6b3cc28271. Using default max occupancy: 10
sawtooth-validator-default | [2021-04-30 07:36:20.255 INFO     processor_handlers] registered transaction processor: connection_id=ee833407916660adb5a632b46b80658e01bec7a9b1ec22d62b8c178e75bf0c9deec06561cbce60b69e541d87a3534781ba82e22206deb2c42dc3fa6b3cc28271, family=sawtooth_settings, version=1.0, namespaces=['000000'], max_occupancy=10
sawtooth-validator-default | [2021-04-30 07:36:20.299 DEBUG    genesis] Produced state hash c57eee413950052260671c826f8285085d892a5ec503e1c850638ca02e419042 for genesis block.
sawtooth-validator-default | [2021-04-30 07:36:20.302 INFO     genesis] Genesis block created: 8b6ed5ceb7220e06888aab97766e64d4858de385367f1390e90cb3e18f8f3a933b93f87a7d13ecb60698ccce28b780bfdb010abe21317418fe8500ba815a1fdf (block_num:0, state:c57eee413950052260671c826f8285085d892a5ec503e1c850638ca02e419042, previous_block_id:0000000000000000)
sawtooth-validator-default | [2021-04-30 07:36:20.302 DEBUG    chain_id_manager] writing block chain id
sawtooth-validator-default | [2021-04-30 07:36:20.303 DEBUG    genesis] Deleting genesis data.
sawtooth-validator-default | [2021-04-30 07:36:20.303 DEBUG    selector_events] Using selector: ZMQSelector
sawtooth-validator-default | [2021-04-30 07:36:20.304 INFO     interconnect] Listening on tcp://eth0:5050
sawtooth-validator-default | [2021-04-30 07:36:20.304 DEBUG    dispatch] Added send_message function for connection ServerThread
sawtooth-validator-default | [2021-04-30 07:36:20.304 DEBUG    dispatch] Added send_last_message function for connection ServerThread
sawtooth-validator-default | [2021-04-30 07:36:20.305 DEBUG    selector_events] Using selector: ZMQSelector
sawtooth-validator-default | [2021-04-30 07:36:20.305 INFO     interconnect] Listening on tcp://eth0:8800
sawtooth-validator-default | [2021-04-30 07:36:20.320 DEBUG    dispatch] Added send_message function for connection ServerThread
sawtooth-validator-default | [2021-04-30 07:36:20.320 DEBUG    dispatch] Added send_last_message function for connection ServerThread
sawtooth-validator-default | [2021-04-30 07:36:20.322 INFO     ffi] [src/journal/chain.rs: 946] Chain controller initialized with chain head: Block(id: 8b6ed5ceb7220e06888aab97766e64d4858de385367f1390e90cb3e18f8f3a933b93f87a7d13ecb60698ccce28b780bfdb010abe21317418fe8500ba815a1fdf, block_num: 0, state_root_hash: c57eee413950052260671c826f8285085d892a5ec503e1c850638ca02e419042, previous_block_id: 0000000000000000)
sawtooth-validator-default | [2021-04-30 07:36:20.322 INFO     ffi] [src/journal/publisher.rs: 172] Now building on top of block, Block(id: 8b6ed5ceb7220e06888aab97766e64d4858de385367f1390e90cb3e18f8f3a933b93f87a7d13ecb60698ccce28b780bfdb010abe21317418fe8500ba815a1fdf, block_num: 0, state_root_hash: c57eee413950052260671c826f8285085d892a5ec503e1c850638ca02e419042, previous_block_id: 0000000000000000)
sawtooth-validator-default | [2021-04-30 07:36:20.434 INFO     handlers] Consensus engine registered: Devmode 0.1 (additional protocols: [])
sawtooth-validator-default | [2021-04-30 07:36:20.443 INFO     proxy] Consensus engine activated: Devmode 0.1
sawtooth-validator-default | [2021-04-30 07:36:21.304 WARNING  processor_handlers] Max occupancy was not provided by transaction processor: f60cab39150e1fcb019ec273b7c66a240f541f4f7cde0cc099abb5cb58565fcd60ec051ddeedbc06c294c5a1756812bb2de82041109c5ac7b418584a997cce72. Using default max occupancy: 10
sawtooth-validator-default | [2021-04-30 07:36:21.305 INFO     processor_handlers] registered transaction processor: connection_id=f60cab39150e1fcb019ec273b7c66a240f541f4f7cde0cc099abb5cb58565fcd60ec051ddeedbc06c294c5a1756812bb2de82041109c5ac7b418584a997cce72, family=myapp, version=1.0, namespaces=['7749f2'], max_occupancy=10
sawtooth-myapp-tp   | [2021-04-30 07:36:21.305 INFO     core] register attempt: OK
sawtooth-myapp-web-client | audited 235 packages in 1.394s
sawtooth-myapp-web-client | 
sawtooth-myapp-web-client | 3 packages are looking for funding
sawtooth-myapp-web-client |   run `npm fund` for details
sawtooth-myapp-web-client | 
sawtooth-myapp-web-client | found 6 vulnerabilities (4 low, 1 moderate, 1 critical)
sawtooth-myapp-web-client |   run `npm audit fix` to fix them, or `npm audit` for details
sawtooth-myapp-web-client | 
sawtooth-myapp-web-client | > helloworld@0.0.0 start /opt/myapp_web_client
sawtooth-myapp-web-client | > node ./bin/www
sawtooth-myapp-web-client | 
sawtooth-validator-default | [2021-04-30 07:36:39.823 DEBUG    interconnect] No response from ee833407916660adb5a632b46b80658e01bec7a9b1ec22d62b8c178e75bf0c9deec06561cbce60b69e541d87a3534781ba82e22206deb2c42dc3fa6b3cc28271 in 19.52631163597107 seconds - beginning heartbeat pings.
sawtooth-validator-default | [2021-04-30 07:36:39.824 DEBUG    interconnect] No response from f60cab39150e1fcb019ec273b7c66a240f541f4f7cde0cc099abb5cb58565fcd60ec051ddeedbc06c294c5a1756812bb2de82041109c5ac7b418584a997cce72 in 18.519431829452515 seconds - beginning heartbeat pings.
sawtooth-settings-tp-default | INFO  | sawtooth_sdk::proces | Message: 8ca2d80b57434d6e8bcc0e6329440b0b
sawtooth-settings-tp-default | INFO  | sawtooth_sdk::proces | sending PingResponse
sawtooth-myapp-tp   | [2021-04-30 07:36:39.827 DEBUG    core] received message of type: PING_REQUEST
sawtooth-validator-default | [2021-04-30 07:36:49.832 DEBUG    interconnect] No response from ee833407916660adb5a632b46b80658e01bec7a9b1ec22d62b8c178e75bf0c9deec06561cbce60b69e541d87a3534781ba82e22206deb2c42dc3fa6b3cc28271 in 10.005645275115967 seconds - beginning heartbeat pings.
sawtooth-validator-default | [2021-04-30 07:36:49.833 DEBUG    interconnect] No response from f60cab39150e1fcb019ec273b7c66a240f541f4f7cde0cc099abb5cb58565fcd60ec051ddeedbc06c294c5a1756812bb2de82041109c5ac7b418584a997cce72 in 10.003223180770874 seconds - beginning heartbeat pings.
sawtooth-settings-tp-default | INFO  | sawtooth_sdk::proces | Message: d3b72c9d11f547f3bff4eca13682794b
sawtooth-settings-tp-default | INFO  | sawtooth_sdk::proces | sending PingResponse
sawtooth-myapp-tp   | [2021-04-30 07:36:49.836 DEBUG    core] received message of type: PING_REQUEST
^CGracefully stopping... (press Ctrl+C again to force)
Stopping sawtooth-myapp-web-client             ... done
Stopping sawtooth-myapp-tp                     ... done
Stopping sawtooth-devmode-engine-rust-default ... done
Stopping sawtooth-rest-api-default            ... done
Stopping sawtooth-settings-tp-default         ... done
Stopping sawtooth-validator-default           ... done

关于为什么他们失去与验证器的连接的任何线索?

我应该补充一点,我的应用程序的 tx 处理器成功处理了交易,因此与验证器的连接似乎可以正常工作。

0 个答案:

没有答案