ton-blockchain / mytonctrl

A tool to run and maintain a TON node/validator
GNU General Public License v3.0
247 stars 141 forks source link

subprocess.TimeoutExpired: Command '['/usr/bin/ton/validator-engine-console/validator-engine-console', '-k', '/var/ton-work/keys/client', '-p', '/var/ton-work/keys/server.pub', '-a', '127.0.0.1:7567', '-v', '0', '--cmd', 'getconfig']' timed out after 3 seconds #138

Open jacurutu1984 opened 1 year ago

jacurutu1984 commented 1 year ago

I installed mytoncore on ubuntu 22.04 with command sudo bash install.sh -m full -d.

I try to run mytonctrl but always get the same message : [debug] 26.08.2023, 19:38:46.354 (UTC) Thread self_test started [debug] 26.08.2023, 19:38:46.355 (UTC) Thread write_log started [info] 26.08.2023, 19:38:46.355 (UTC) Start program /usr/src/mytonctrl/mytonctrl.py Welcome to the console. Enter 'help' to display the help menu. Traceback (most recent call last): File "/usr/src/mytonctrl/mytonctrl.py", line 1213, in console.Run() File "/usr/src/mytonctrl/mypyconsole/mypyconsole.py", line 97, in Run self.startFunction() File "/usr/src/mytonctrl/mytonctrl.py", line 106, in PreUp check_vport() File "/usr/src/mytonctrl/mytonctrl.py", line 122, in check_vport vconfig = ton.GetValidatorConfig() File "/usr/src/mytonctrl/mytoncore.py", line 1929, in GetValidatorConfig result = self.validatorConsole.Run("getconfig") File "/usr/src/mytonctrl/mytoncore.py", line 68, in Run process = subprocess.run(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=timeout) File "/usr/lib/python3.10/subprocess.py", line 505, in run stdout, stderr = process.communicate(input, timeout=timeout) File "/usr/lib/python3.10/subprocess.py", line 1154, in communicate stdout, stderr = self._communicate(input, endtime, timeout) File "/usr/lib/python3.10/subprocess.py", line 2022, in _communicate self._check_timeout(endtime, orig_timeout, stdout, stderr) File "/usr/lib/python3.10/subprocess.py", line 1198, in _check_timeout raise TimeoutExpired( subprocess.TimeoutExpired: Command '['/usr/bin/ton/validator-engine-console/validator-engine-console', '-k', '/var/ton-work/keys/client', '-p', '/var/ton-work/keys/server.pub', '-a', '127.0.0.1:7567', '-v', '0', '--cmd', 'getconfig']' timed out after 3 seconds

igroman787 commented 1 year ago

Looks like you don't have a local node running, need more info:

  1. Make sure the problem is current
  2. View node status: systemctl status validator
  3. View node logs: cat /var/ton-work/log.thread*
darkwood1945 commented 12 months ago

Hello Same problem

Status

validator.service - validator service. Created by https://github.com/igroman787/mypylib. Loaded: loaded (/etc/systemd/system/validator.service; disabled; vendor preset: enabled) Active: active (running) since Sun 2023-09-10 17:31:55 EEST; 4min 56s ago Main PID: 1298857 (validator-engin) Tasks: 15 (limit: 38401) Memory: 867.4M CGroup: /system.slice/validator.service └─1298857 /usr/bin/ton/validator-engine/validator-engine --threads 7 --daemonize --global-config /usr/bin/ton/global.config.json --db /var/ton-work /db/ --logname /var/ton-work/log --state-ttl 604800 --verbosity 1

Output from /var/ton-work/log.thread*

[ 0][t 7][2023-09-10 13:31:39.430084904][Status.h:273][!apply [ w=-1 s=9223372036854775808 seq=28939510 h2wgi8EvrbcYqg9zPBf8dYh0tHLPjyrR+ gwpY73w1Ro= +9We9fXcQ33uDdVVL9qteWwedZ9iK2zuEjpOTQnY3Is= ]] Unexpected Status [Error : 652 : timeout] in file /usr/src/ton/validator/import-db-slice.cpp at line 201 [ 1][t 7][2023-09-10 14:22:02.320541750][transaction.cpp:324][!litequery] account 00000000000000000000000017A3A92992AABEA785A7A090985A265CD31F323D does not have a valid ShardAccount to unpack

AlexSpain commented 7 months ago

Hello Same problem

igroman787 commented 7 months ago

Hello Same problem

Status

validator.service - validator service. Created by https://github.com/igroman787/mypylib. Loaded: loaded (/etc/systemd/system/validator.service; disabled; vendor preset: enabled) Active: active (running) since Sun 2023-09-10 17:31:55 EEST; 4min 56s ago Main PID: 1298857 (validator-engin) Tasks: 15 (limit: 38401) Memory: 867.4M CGroup: /system.slice/validator.service └─1298857 /usr/bin/ton/validator-engine/validator-engine --threads 7 --daemonize --global-config /usr/bin/ton/global.config.json --db /var/ton-work /db/ --logname /var/ton-work/log --state-ttl 604800 --verbosity 1

Output from /var/ton-work/log.thread*

[ 0][t 7][2023-09-10 13:31:39.430084904][Status.h:273][!apply [ w=-1 s=9223372036854775808 seq=28939510 h2wgi8EvrbcYqg9zPBf8dYh0tHLPjyrR+ gwpY73w1Ro= +9We9fXcQ33uDdVVL9qteWwedZ9iK2zuEjpOTQnY3Is= ]] Unexpected Status [Error : 652 : timeout] in file /usr/src/ton/validator/import-db-slice.cpp at line 201 [ 1][t 7][2023-09-10 14:22:02.320541750][transaction.cpp:324][!litequery] account 00000000000000000000000017A3A92992AABEA785A7A090985A265CD31F323D does not have a valid ShardAccount to unpack

Judging by the operating time of the service, the node is constantly restarting. This is most likely due to a lack of RAM. Try adding RAM or swap. For a more accurate answer, the output will also help: journalctl -u validator -n 100 --no-pager

DervilRus commented 7 months ago

The same error on a freshly installed Ubuntu (Virtual in proxmox) 64 RAM allocated, 16 threads.

darkwood1945 commented 6 months ago

systemd[1]: validator.service: Main process exited, code=killed, status=9/KILL echo[2729218]: service down systemd[1]: validator.service: Failed with result 'signal'. systemd[1]: validator.service: Scheduled restart job, restart counter is at 565. systemd[1]: Stopped validator service. Created by https://github.com/igroman787/mypylib.. systemd[1]: Started validator service. Created by https://github.com/igroman787/mypylib..

Memory 32 Gb

begetan commented 6 months ago

I tested memory usage for a Testnet validator. It needs at least 40GB in order to start, otherwise it will crash even there are free memory on the host.

pushiqiang commented 4 months ago

Can you check the /var/ton-work directory and /var/ton-work/keys/* files permissions

ton-full:/var$ ll -h
drwxr-xr-x  4 validator validator   12 May  4 21:28 ton-work/

ton-full:/var/ton-work$ ll -h
drwxr-xr-x 14 validator validator   16 May  6 09:46 db/
drwxr-xr-x  2 validator validator    6 May  4 21:21 keys/

ton-full:/var/ton-work/keys$ ll -h
-rw------- 1 pushiqiang pushiqiang 36 May  4 21:21 client
-rw------- 1 pushiqiang pushiqiang 36 May  4 21:21 client.pub
-rw------- 1 pushiqiang pushiqiang 36 May  4 21:21 liteserver.pub
-rw------- 1 pushiqiang pushiqiang 36 May  4 21:21 server.pub
TemirAskhat commented 1 month ago

@pushiqiang what it should be?