Comments (5)
@junkett Thank you for reporting the issue. Please try 2.2.1-beta-sync-node.3 with DOCKER_LVMPY_STREAM=1.0.2-stable.0
from node-cli.
Hi @badrogger and thanks for suggestion - I had used specified versions but now getting into another issue:
Command I use to get node cli:
VERSION_NUM=2.2.1-beta-sync-node.3 && sudo -E bash -c "curl -L https://github.com/skalenetwork/node-cli/releases/download/$VERSION_NUM/skale-$VERSION_NUM-`uname -s`-`uname -m`-sync > /usr/local/bin/skale" && sudo chmod +x /usr/local/bin/skale
My env now:
# env
CONTAINER_CONFIGS_STREAM="2.2.0-sync-node.0"
ENDPOINT="https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix"
MANAGER_CONTRACTS_ABI_URL="https://raw.githubusercontent.com/skalenetwork/skale-network/master/releases/mainnet/skale-manager/1.9.0/skale-manager-1.9.0-mainnet-abi.json"
IMA_CONTRACTS_ABI_URL="https://raw.githubusercontent.com/skalenetwork/skale-network/master/releases/mainnet/IMA/1.3.0/mainnet/abi.json"
DISK_MOUNTPOINT=/dev/sdb
DOCKER_LVMPY_STREAM="1.0.2-stable.0"
ENV_TYPE="testnet"
SCHAIN_NAME="staging-fast-active-bellatrix"
ENFORCE_BTRFS=True
I had to add ENFORCE_BTRFS=True
to get past error I was getting without it
ERROR - Command failed with 'ENFORCE_BTRFS'
Which lead to script eventually creating and mounting my partition...
But right after that it fails with it cannot find the /root/.skale/config/static_params.yaml
file, as it does not exist on expected path.
Logs:
root@david-instance:~# skale sync-node init env
Configuring firewall ...
2023-04-28 07:17:22,457 - INFO - Configuring iptables...
2023-04-28 07:17:22,478 - INFO - Configuring ssh port
2023-04-28 07:17:22,483 - INFO - Configuring incoming tcp ports
2023-04-28 07:17:22,507 - INFO - Configuring incoming udp ports
Done
2023-04-28 07:17:22,525 - INFO - Making sure /dev/sdb is not mounted
2023-04-28 07:17:22,525 - INFO - Removing all links from filestorage mapping
2023-04-28 07:17:22,526 - INFO - /root/.skale/.tmp/config doesn't exist, skipping...
2023-04-28 07:17:22,526 - INFO - Creating /root/.skale/.tmp/config directory...
2023-04-28 07:17:22,526 - INFO - Cloning https://github.com/skalenetwork/skale-node.git → /root/.skale/.tmp/config
2023-04-28 07:17:23,170 - INFO - Fetching config changes
2023-04-28 07:17:23,531 - INFO - Checkouting /root/.skale/.tmp/config to 2.2.0-sync-node.0
2023-04-28 07:17:23,553 - INFO - Configuring docker
2023-04-28 07:17:23,553 - INFO - Ensuring docker service dir
2023-04-28 07:17:23,553 - INFO - Ensuring docker service override config
2023-04-28 07:17:23,553 - INFO - Ensuring docker daemon config
2023-04-28 07:17:23,554 - INFO - Updating docker daemon config
2023-04-28 07:17:23,554 - INFO - Docker config changes [<DockerConfigResult.UNCHANGED: 0>, <DockerConfigResult.UNCHANGED: 0>, <DockerConfigResult.UNCHANGED: 0>, <DockerConfigResult.CHANGED: 1>]
2023-04-28 07:17:23,555 - INFO - Executing daemon-reload
2023-04-28 07:17:23,862 - INFO - Restarting docker service
2023-04-28 07:17:24,845 - INFO - Waiting for docker inititalization
2023-04-28 07:17:24,845 - INFO - Socket initialized successfully
2023-04-28 07:17:24,846 - INFO - Docker configuration finished
2023-04-28 07:17:24,846 - INFO - Preparing host started
2023-04-28 07:17:24,849 - INFO - Creating symlink /root/.skale/.env → /root/.skale/config/.env
2023-04-28 07:17:24,878 - INFO - Processing nginx template. ssl: False
2023-04-28 07:17:24,895 - ERROR - Error during shell execution:
2023-04-28 07:17:24,896 - INFO - Cannot get filesystem type Command '['blkid', '-o', 'udev', '/dev/sdb']' returned non-zero exit status 2.
2023-04-28 07:17:24,897 - INFO - /dev/sdb contains None filesystem
2023-04-28 07:17:24,897 - INFO - Formating /dev/sdb as btrfs
2023-04-28 07:17:26,385 - INFO - Mounting /dev/sdb device
Command execution failed with [Errno 2] No such file or directory: '/root/.skale/config/static_params.yaml'. Recheck your inputs
Traceback (most recent call last):
File "node_cli/main.py", line 117, in <module>
File "click/core.py", line 1130, in __call__
File "click/core.py", line 1055, in main
File "click/core.py", line 1657, in invoke
File "click/core.py", line 1657, in invoke
File "click/core.py", line 1404, in invoke
File "click/core.py", line 760, in invoke
File "node_cli/utils/helper.py", line 319, in wrapper
File "node_cli/cli/sync_node.py", line 70, in _init_sync
File "node_cli/utils/decorators.py", line 37, in inner
File "node_cli/core/node.py", line 161, in init_sync
File "node_cli/operations/base.py", line 220, in init_sync
File "node_cli/core/resources.py", line 120, in update_resource_allocation
File "node_cli/core/resources.py", line 74, in compose_resource_allocation_config
File "node_cli/utils/helper.py", line 196, in safe_load_yml
FileNotFoundError: [Errno 2] No such file or directory: '/root/.skale/config/static_params.yaml'
2023-04-28 07:17:26,403 - ERROR - Command failed with [Errno 2] No such file or directory: '/root/.skale/config/static_params.yaml'
Traceback (most recent call last):
File "node_cli/main.py", line 117, in <module>
File "click/core.py", line 1130, in __call__
File "click/core.py", line 1055, in main
File "click/core.py", line 1657, in invoke
File "click/core.py", line 1657, in invoke
File "click/core.py", line 1404, in invoke
File "click/core.py", line 760, in invoke
File "node_cli/utils/helper.py", line 319, in wrapper
File "node_cli/cli/sync_node.py", line 70, in _init_sync
File "node_cli/utils/decorators.py", line 37, in inner
File "node_cli/core/node.py", line 161, in init_sync
File "node_cli/operations/base.py", line 220, in init_sync
File "node_cli/core/resources.py", line 120, in update_resource_allocation
File "node_cli/core/resources.py", line 74, in compose_resource_allocation_config
File "node_cli/utils/helper.py", line 196, in safe_load_yml
FileNotFoundError: [Errno 2] No such file or directory: '/root/.skale/config/static_params.yaml'
root@david-instance:~# cat /root/.skale/config/static_params.yaml
cat: /root/.skale/config/static_params.yaml: No such file or directory
from node-cli.
@junkett Please
- Run
rm -r .skale
- set CONTAINER_CONFIG_STREAM to 2.1.15-sync-2.0
- Retry the init procedure.
from node-cli.
Hello @badrogger - thanks again for quick help, according to the logs the node initiation had completed - however I suppose the sync process is still not happening. I can see the containers are running but the logs are showing that there is a crash loop with following sequence repeating indefinitely:
[2023-05-02 07:03:20,549 INFO] - web.models.schain:191 - Creating schainrecord table...
[2023-05-02 07:03:20,549 INFO] - root:44 - Running migrations ...
[2023-05-02 07:03:20,550 INFO] - root:141 - Add column: SChainRecord.new_schain
[2023-05-02 07:03:20,550 INFO] - root:141 - Add column: SChainRecord.repair_mode
[2023-05-02 07:03:20,550 INFO] - root:141 - Add column: SChainRecord.needs_reload
[2023-05-02 07:03:20,551 INFO] - root:141 - Add column: SChainRecord.monitor_last_seen
[2023-05-02 07:03:20,551 INFO] - root:141 - Add column: SChainRecord.monitor_id
[2023-05-02 07:03:20,551 INFO] - root:141 - Add column: SChainRecord.config_version
[2023-05-02 07:03:20,552 INFO] - root:141 - Add column: SChainRecord.restart_count
[2023-05-02 07:03:20,552 INFO] - root:141 - Add column: SChainRecord.failed_rpc_count
[2023-05-02 07:03:20,553 INFO] - root:141 - Add column: SChainRecord.ssl_change_date
[2023-05-02 07:03:20,553 INFO] - root:141 - Add column: SChainRecord.snapshot_from
[2023-05-02 07:03:20,553 INFO] - core.ima.schain:40 - Going to generate a new ABI file for sChain IMA (/skale_vol/contracts_info/schain_ima_abi.json)
[2023-05-02 07:03:20,574 INFO] - core.ima.schain:43 - New ABI file for sChain IMA saved: /skale_vol/contracts_info/schain_ima_abi.json
[2023-05-02 07:03:20,574 INFO] - skale.skale_base:45 - Initing skale.py, endpoint: https://[ETH_IP]/v1/staging-fast-active-bellatrix, wallet: [SGX_IP]Type
[2023-05-02 07:03:20,593 INFO] - skale.skale_base:45 - Initing skale.py, endpoint: https://[ETH_IP]/v1/staging-fast-active-bellatrix, wallet: [SGX_IP]Type
[2023-05-02 07:03:21,643 ERROR] - __main__:82 - Sync node worker failed
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/web3/contract.py", line 1537, in call_contract_function
output_data = web3.codec.decode_abi(output_types, return_data)
File "/usr/local/lib/python3.8/site-packages/eth_abi/codec.py", line 196, in decode_abi
return self.decode(types, data)
File "/usr/local/lib/python3.8/site-packages/eth_abi/codec.py", line 210, in decode
return decoder(stream)
File "/usr/local/lib/python3.8/site-packages/eth_abi/decoding.py", line 127, in __call__
return self.decode(stream)
File "/usr/local/lib/python3.8/site-packages/eth_utils/functional.py", line 45, in inner
return callback(fn(*args, **kwargs))
File "/usr/local/lib/python3.8/site-packages/eth_abi/decoding.py", line 173, in decode
yield decoder(stream)
File "/usr/local/lib/python3.8/site-packages/eth_abi/decoding.py", line 127, in __call__
return self.decode(stream)
File "/usr/local/lib/python3.8/site-packages/eth_abi/decoding.py", line 198, in decode
raw_data = self.read_data_from_stream(stream)
File "/usr/local/lib/python3.8/site-packages/eth_abi/decoding.py", line 305, in read_data_from_stream
raise InsufficientDataBytes(
eth_abi.exceptions.InsufficientDataBytes: Tried to read 32 bytes. Only got 0 bytes
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "sync_node.py", line 80, in main
worker(SCHAIN_NAME)
File "sync_node.py", line 51, in worker
if not skale.schains_internal.is_schain_exist(schain_name):
File "/usr/local/lib/python3.8/site-packages/skale/skale_base.py", line 126, in __getattr__
self.__init_contract_from_info(abi, contract_info)
File "/usr/local/lib/python3.8/site-packages/skale/skale_base.py", line 90, in __init_contract_from_info
self.init_upgradeable_contract(contract_info, abi)
File "/usr/local/lib/python3.8/site-packages/skale/skale_base.py", line 96, in init_upgradeable_contract
address = self.get_contract_address(contract_info.contract_name)
File "/usr/local/lib/python3.8/site-packages/skale/skale_base.py", line 113, in get_contract_address
return self.contract_manager.get_contract_address(name)
File "/usr/local/lib/python3.8/site-packages/skale/contracts/contract_manager.py", line 30, in get_contract_address
return self.contract.functions.contracts(contract_hash).call()
File "/usr/local/lib/python3.8/site-packages/web3/contract.py", line 970, in call
return call_contract_function(
File "/usr/local/lib/python3.8/site-packages/web3/contract.py", line 1554, in call_contract_function
raise BadFunctionCallOutput(msg) from e
web3.exceptions.BadFunctionCallOutput: Could not transact with/call contract function, is contract deployed correctly and chain synced?
This seems as some connectivity issue - I had opened completely all firewalls that would be restricting access to the VM both inbound / outbound but the issue remains. Apart from this I think I had been following the instructions from https://docs.skale.network/develop/full-sync-node - with your suggestions of versions to use...
My env file now is:
# env
CONTAINER_CONFIGS_STREAM="2.1.15-sync-2.0"
ENDPOINT="https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix"
MANAGER_CONTRACTS_ABI_URL="https://raw.githubusercontent.com/skalenetwork/skale-network/master/releases/mainnet/skale-manager/1.9.0/skale-manager-1.9.0-mainnet-abi.json"
IMA_CONTRACTS_ABI_URL="https://raw.githubusercontent.com/skalenetwork/skale-network/master/releases/mainnet/IMA/1.3.0/mainnet/abi.json"
DISK_MOUNTPOINT=/dev/sdb
DOCKER_LVMPY_STREAM="1.0.2-stable.0"
ENV_TYPE="testnet"
SCHAIN_NAME="staging-fast-active-bellatrix"
ENFORCE_BTRFS="True"
I can see these containers are now running:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
22ebb5649fa6 nginx:1.20.2 "/docker-entrypoint.…" 34 minutes ago Up 34 minutes skale_nginx
9e99bb0db0a9 skalenetwork/admin:2.11.0-sync-node-2.0.0 "python3 sync_node.py" 34 minutes ago Up 34 minutes (unhealthy) skale_sync_admin
ac6664d9987c kubernetes/pause "/pause" 34 minutes ago Up 34 minutes config_base_1
Do you have any further hints for me?
from node-cli.
@junkett ENDPOINT - ETH endpoint which is Goerli for staging.
You can use infura in this case.
from node-cli.
Related Issues (20)
- Introduce codecoverage and push data to codecov
- Introduce termcolor module to print meaningful information
- raise SystemExit() instead of sys.exit()
- Make a formula for node-cli in homebrew HOT 1
- urllib3, chardet, charset_normalizer dependency issue HOT 1
- Upgrade to use python 3.11
- Ubuntu 20.04 support HOT 1
- No logs printed in node-cli log files HOT 2
- Add the OS version check for Watchdog API HOT 3
- Command [vgremove schains -y] failed, error: Logical volume schains/shared-space in use. HOT 6
- Downgrade checks to a warning and not a hard fail
- Upgrade node-cli sync node version with 2.3.0 changes HOT 2
- Add repair option for sync-node-cli
- Node-cli don't pull changes in skale-node after unsuccessful node update
- Node-cli don't pull image kubernetes/pause
- Update OS version info during the execution of "skale node turn-on" command
- Allow to change block device name
- Can't sync and start chaos (staging-fast-active-bellatrix) HOT 2
- Broadcasts aren't sent after node restore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-cli.