mytonctrl icon indicating copy to clipboard operation
mytonctrl copied to clipboard

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

Open jacurutu1984 opened this issue 1 year ago • 9 comments

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) <MainThread> Thread self_test started [debug] 26.08.2023, 19:38:46.355 (UTC) <MainThread> Thread write_log started [info] 26.08.2023, 19:38:46.355 (UTC) <MainThread> 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

jacurutu1984 avatar Aug 26 '23 19:08 jacurutu1984

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*

igroman787 avatar Aug 30 '23 12:08 igroman787

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

darkwood1945 avatar Sep 10 '23 14:09 darkwood1945

Hello Same problem

AlexSpain avatar Feb 02 '24 20:02 AlexSpain

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

igroman787 avatar Feb 05 '24 09:02 igroman787

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

DervilRus avatar Feb 06 '24 14:02 DervilRus

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

darkwood1945 avatar Feb 13 '24 03:02 darkwood1945

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.

begetan avatar Feb 19 '24 15:02 begetan

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

pushiqiang avatar Apr 29 '24 16:04 pushiqiang

@pushiqiang what it should be?

TemirAskhat avatar Jul 12 '24 13:07 TemirAskhat