Comments (9)
@cbermudez97 Hi Carlos,
I wanted to run sledge without sudo, and checked your proposol:
both folders (execution & consensus) were created with root as own
What surprises me is, that the execution data folder can be accessed, while the execution data folder canNOT..
I tried changing the permission with chmod 0777 and it worked in the end without sudo. (666 was not sufficent for reasons)...
Little bit strange to me, but it works 🥇
from sedge.
Thanks for the feedback @BMItr! Are you using a new (empty) sedge-data
dir or one with some old data inside?
from sedge.
@adriantpaez everything from scratch (new & empty sedge-data).
from sedge.
@BMItr Can you share the logs from that container, also the contents of the docker-compose.yml and .env inside sedge-data folder?
from sedge.
sure.
docker-compose.yml:
cat docker-compose.yml
version: "3.9"
services:
execution:
stop_grace_period: 30s
container_name: sedge-execution-client
restart: unless-stopped
image: ${EC_IMAGE_VERSION}
networks:
- sedge
volumes:
- ${EC_DATA_DIR}:/nethermind/data
- ${EC_JWT_SECRET_PATH}:/tmp/jwt/jwtsecret
ports:
- 30303:30303/tcp
- 30303:30303/udp
- 8008:8008
- 8545:8545
- 8551:8551
expose:
- 8545
- 8551
command:
- --config=${EL_NETWORK}
- --datadir=/nethermind/data
- --log=${NETHERMIND_LOG_LEVEL}
- --Merge.TerminalTotalDifficulty=8626000000000000000000058750000000000000000000
- --Sync.SnapSync=${EC_SNAP_SYNC_ENABLED}
- --JsonRpc.Enabled=true
- --JsonRpc.Host=0.0.0.0
- --JsonRpc.Port=8545
- --JsonRpc.EnabledModules=${EC_ENABLED_MODULES}
- --JsonRpc.JwtSecretFile=/tmp/jwt/jwtsecret
- --JsonRpc.EngineHost=0.0.0.0
- --JsonRpc.EnginePort=8551
- --Network.DiscoveryPort=30303
- --Network.Bootnodes=enode://ea6d67eb3277d8ae9292fc700fa757ef6d2127c4db9712bcd5eb1341b1d937ac71cc2b15efe3a8496f4fc9fc12156d7ac73d82eb3c0f68928442116030b76f48@3.135.122.4:30303,enode://c5e1e38709a2eb402557e82e071ccec1c6e2adedb01f7d6afdc80d25f7e9287f954fa9b742f01b1b74a5c532de9476afeb6efdcf5a683672a663204eadb15e45@3.17.46.220:30303
- --Discovery.Bootnodes=enode://ea6d67eb3277d8ae9292fc700fa757ef6d2127c4db9712bcd5eb1341b1d937ac71cc2b15efe3a8496f4fc9fc12156d7ac73d82eb3c0f68928442116030b76f48@3.135.122.4:30303,enode://c5e1e38709a2eb402557e82e071ccec1c6e2adedb01f7d6afdc80d25f7e9287f954fa9b742f01b1b74a5c532de9476afeb6efdcf5a683672a663204eadb15e45@3.17.46.220:30303
- --Network.StaticPeers=enode://ea6d67eb3277d8ae9292fc700fa757ef6d2127c4db9712bcd5eb1341b1d937ac71cc2b15efe3a8496f4fc9fc12156d7ac73d82eb3c0f68928442116030b76f48@3.135.122.4:30303,enode://c5e1e38709a2eb402557e82e071ccec1c6e2adedb01f7d6afdc80d25f7e9287f954fa9b742f01b1b74a5c532de9476afeb6efdcf5a683672a663204eadb15e45@3.17.46.220:30303
- --HealthChecks.Enabled=true
- --Pruning.CacheMb=${NETHERMIND_PRUNING_CACHEMB}
- --Metrics.Enabled=true
- --Metrics.ExposePort=8008
consensus:
user: 1000:1000
stop_grace_period: 30s
container_name: sedge-consensus-client
restart: unless-stopped
image: ${CC_IMAGE_VERSION}
networks:
- sedge
volumes:
- ${CC_DATA_DIR}:/var/lib/teku
- ${CC_JWT_SECRET_PATH}:/tmp/jwt/jwtsecret
ports:
- 9000:9000/tcp
- 9000:9000/udp
- 5054:5054/tcp
- 4000:4000
expose:
- 4000
command:
- --log-destination=CONSOLE
- --logging=${CC_LOG_LEVEL}
- --network=${CL_NETWORK}
- --p2p-discovery-bootnodes=enr:-Ly4QMU1y81COwm1VZgxGF4_eZ21ub9-GHF6dXZ29aEJ0oZpcV2Rysw-viaEKfpcpu9ZarILJLxFZjcKOjE0Sybs3MQBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpCCS-QxAgAAZP__________gmlkgnY0gmlwhANLnx-Jc2VjcDI1NmsxoQKoaYT8I-wf2I_f_ii6EgoSSXj5T3bhiDyW-7ZLsY3T64hzeW5jbm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L611Kxlz-zYFrIn-k_63jGIPK_wbvFghVUHJICPCxufgTX5h79jvgfPr-2hEEQEdziGQ5MCh2F0dG5ldHOIAAAAAAAAAACEZXRoMpCCS-QxAgAAZP__________gmlkgnY0gmlwhAMazo6Jc2VjcDI1NmsxoQKt-kbM9isuWp8djhyEq6-4MLv1Sy7dOXeMOMdPgwu9LohzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA,enr:-Ly4QKJ5BzgFyJ6BaTlGY0C8ROzl508U3GA6qxdG5Gn2hxdke6nQO187pYlLvhp82Dez4PQn436Fts1F0WAm-_5l2LACh2F0dG5ldHOIAAAAAAAAAACEZXRoMpCCS-QxAgAAZP__________gmlkgnY0gmlwhA-YLVKJc2VjcDI1NmsxoQI8_Lvr6p_TkcAu8KorKacfUEnoOon0tdO0qWhriPdBP4hzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA,enr:-Ly4QJMtoiX2bPnVbiQOJCLbtUlqdqZk7kCJQln_W1bp1vOHcxWowE-iMXkKC4_uOb0o73wAW71WYi80Dlsg-7a5wiICh2F0dG5ldHOIAAAAAAAAAACEZXRoMpCCS-QxAgAAZP__________gmlkgnY0gmlwhDbP3KmJc2VjcDI1NmsxoQNvcfKYUqcemLFlpKxl7JcQJwQ3L9unYL44gY2aEiRnI4hzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA
- --p2p-enabled=true
- --p2p-port=9000
- --p2p-peer-upper-bound=${CC_PEER_COUNT}
- --rest-api-enabled=true
- --rest-api-host-allowlist=*
- --rest-api-interface=0.0.0.0
- --rest-api-port=4000
- --rest-api-cors-origins=*
- --rest-api-docs-enabled=false
- --data-beacon-path=/var/lib/teku/beacon
- --data-path=/var/lib/teku
- --data-storage-archive-frequency=2048
- --data-storage-mode=PRUNE
- --data-storage-non-canonical-blocks-enabled=false
- --ee-endpoint=${EC_AUTH_URL}
- --ee-jwt-secret-file=/tmp/jwt/jwtsecret
- --Xnetwork-total-terminal-difficulty-override=8626000000000000000000058750000000000000000000
- --metrics-enabled=true
- --metrics-host-allowlist=*
- --metrics-interface=0.0.0.0
- --metrics-port=5054
- --initial-state=https://checkpoint.gnosischain.com/eth/v2/debug/beacon/states/finalized
networks:
sedge:
name: sedge-network
nethermind log: all right
teku container log (relevant part):
NFO StatusConsoleListener Setting logging level to INFO
INFO StatusConsoleListener Configuring logging for destination: console
INFO StatusConsoleListener Logging includes events: true
INFO StatusConsoleListener Logging includes validator duties: true
INFO StatusConsoleListener Logging includes color: true
INFO StatusConsoleListener Include P2P warnings set to: false
2023-03-23 12:29:55.916 INFO - Adjusting target number of peers lower bound to equal upper bound, which is 50
2023-03-23 12:29:55.920 INFO - Adjusting target number of peers upper bound to equal lower bound, which is 64
2023-03-23 12:29:56.100 INFO - Teku version: teku/v23.3.0/linux-x86_64/-eclipseadoptium-openjdk64bitservervm-java-17
2023-03-23 12:29:56.100 INFO - This software is licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
2023-03-23 12:29:56.106 WARN - Configuration conflict: there is more than one oshi.properties file on the classpath: [jar:file:/opt/teku/lib/oshi-core-6.4.0.jar!/oshi.properties, jar:file:/opt/teku/lib/oshi-core-java11-6.4.0.jar!/oshi.properties]
2023-03-23 12:29:56.153 INFO - Configuration | Network: gnosis, Storage Mode: PRUNE
2023-03-23 12:29:56.154 INFO - Host Configuration | Maximum Heap Size: 15.66 GB, Total Memory: 62.61 GB, CPU Cores: 32
2023-03-23 12:29:56.154 INFO - Rest Api Configuration | Enabled: true, Listen Address: 0.0.0.0, Port: 4000, Allow: [*]
2023-03-23 12:29:56.154 INFO - Validator Api Configuration | Listen Address: 0.0.0.0, Port 5052, Allow: [127.0.0.1, localhost]
2023-03-23 12:29:56.154 WARN - Bellatrix parameter TERMINAL_TOTAL_DIFFICULTY has been overridden to 0x0000000000000000000000000182cd9facec6dfd55f0d1e9dbed2928d7380000
2023-03-23 12:29:56.227 INFO - JWT secret loaded from /tmp/jwt/jwtsecret
2023-03-23 12:29:56.228 INFO - Using execution engine at http://execution:8551
2023-03-23 12:29:56.228 INFO - Enabling Builder Circuit Breaker
2023-03-23 12:29:56.238 INFO - Execution Engine version: KILNV2
2023-03-23 12:29:56.246 INFO - Eth1 endpoint not provided, using execution engine endpoint for eth1 data
2023-03-23 12:29:56.260 ERROR - Failed to write in /var/lib/teku/validator/slashprotection
java.io.IOException: Unable to create directory /var/lib/teku/validator
at tech.pegasys.teku.infrastructure.io.SyncDataAccessor.nonAtomicSyncedWrite(SyncDataAccessor.java:113) ~[teku-infrastructure-io-23.3.0.jar:23.3.0]
at tech.pegasys.teku.infrastructure.io.SyncDataAccessor.atomicSyncedWrite(SyncDataAccessor.java:127) ~[teku-infrastructure-io-23.3.0.jar:23.3.0]
at tech.pegasys.teku.infrastructure.io.SyncDataAccessor.create(SyncDataAccessor.java:55) ~[teku-infrastructure-io-23.3.0.jar:23.3.0]
at tech.pegasys.teku.validator.client.ValidatorClientService.createValidatorLoader(ValidatorClientService.java:329) ~[teku-validator-client-23.3.0.jar:23.3.0]
at tech.pegasys.teku.validator.client.ValidatorClientService.create(ValidatorClientService.java:137) ~[teku-validator-client-23.3.0.jar:23.3.0]
at tech.pegasys.teku.services.BeaconNodeServiceController.(BeaconNodeServiceController.java:56) ~[teku-23.3.0.jar:23.3.0]
at tech.pegasys.teku.BeaconNode.(BeaconNode.java:27) ~[teku-23.3.0.jar:23.3.0]
at tech.pegasys.teku.Teku.start(Teku.java:71) ~[teku-23.3.0.jar:23.3.0]
at tech.pegasys.teku.Teku.lambda$startFromCLIArgs$2(Teku.java:86) ~[teku-23.3.0.jar:23.3.0]
at tech.pegasys.teku.cli.BeaconNodeCommand.call(BeaconNodeCommand.java:341) [teku-23.3.0.jar:23.3.0]
at tech.pegasys.teku.cli.BeaconNodeCommand.call(BeaconNodeCommand.java:79) [teku-23.3.0.jar:23.3.0]
at picocli.CommandLine.executeUserObject(CommandLine.java:2041) [picocli-4.7.1.jar:4.7.1]
at picocli.CommandLine.access$1500(CommandLine.java:148) [picocli-4.7.1.jar:4.7.1]
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461) [picocli-4.7.1.jar:4.7.1]
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453) [picocli-4.7.1.jar:4.7.1]
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415) [picocli-4.7.1.jar:4.7.1]
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273) [picocli-4.7.1.jar:4.7.1]
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417) [picocli-4.7.1.jar:4.7.1]
at picocli.CommandLine.execute(CommandLine.java:2170) [picocli-4.7.1.jar:4.7.1]
at tech.pegasys.teku.cli.BeaconNodeCommand.parse(BeaconNodeCommand.java:273) [teku-23.3.0.jar:23.3.0]
at tech.pegasys.teku.Teku.start(Teku.java:63) [teku-23.3.0.jar:23.3.0]
at tech.pegasys.teku.Teku.startFromCLIArgs(Teku.java:86) [teku-23.3.0.jar:23.3.0]
at tech.pegasys.teku.Teku.main(Teku.java:40) [teku-23.3.0.jar:23.3.0]
Cannot write to folder /var/lib/teku/validator/slashprotection
2023-03-23 12:29:56.262 FATAL - Cannot write to folder /var/lib/teku/validator/slashprotection
tech.pegasys.teku.infrastructure.exceptions.InvalidConfigurationException: Cannot write to folder /var/lib/teku/validator/slashprotection
at tech.pegasys.teku.infrastructure.io.SyncDataAccessor.create(SyncDataAccessor.java:63) ~[teku-infrastructure-io-23.3.0.jar:23.3.0]
at tech.pegasys.teku.validator.client.ValidatorClientService.createValidatorLoader(ValidatorClientService.java:329) ~[teku-validator-client-23.3.0.jar:23.3.0]
at tech.pegasys.teku.validator.client.ValidatorClientService.create(ValidatorClientService.java:137) ~[teku-validator-client-23.3.0.jar:23.3.0]
at tech.pegasys.teku.services.BeaconNodeServiceController.(BeaconNodeServiceController.java:56) ~[teku-23.3.0.jar:23.3.0]
at tech.pegasys.teku.BeaconNode.(BeaconNode.java:27) ~[teku-23.3.0.jar:23.3.0]
at tech.pegasys.teku.Teku.start(Teku.java:71) ~[teku-23.3.0.jar:23.3.0]
at tech.pegasys.teku.Teku.lambda$startFromCLIArgs$2(Teku.java:86) ~[teku-23.3.0.jar:23.3.0]
at tech.pegasys.teku.cli.BeaconNodeCommand.call(BeaconNodeCommand.java:341) [teku-23.3.0.jar:23.3.0]
at tech.pegasys.teku.cli.BeaconNodeCommand.call(BeaconNodeCommand.java:79) [teku-23.3.0.jar:23.3.0]
at picocli.CommandLine.executeUserObject(CommandLine.java:2041) [picocli-4.7.1.jar:4.7.1]
at picocli.CommandLine.access$1500(CommandLine.java:148) [picocli-4.7.1.jar:4.7.1]
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461) [picocli-4.7.1.jar:4.7.1]
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453) [picocli-4.7.1.jar:4.7.1]
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415) [picocli-4.7.1.jar:4.7.1]
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273) [picocli-4.7.1.jar:4.7.1]
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417) [picocli-4.7.1.jar:4.7.1]
at picocli.CommandLine.execute(CommandLine.java:2170) [picocli-4.7.1.jar:4.7.1]
at tech.pegasys.teku.cli.BeaconNodeCommand.parse(BeaconNodeCommand.java:273) [teku-23.3.0.jar:23.3.0]
at tech.pegasys.teku.Teku.start(Teku.java:63) [teku-23.3.0.jar:23.3.0]
at tech.pegasys.teku.Teku.startFromCLIArgs(Teku.java:86) [teku-23.3.0.jar:23.3.0]
at tech.pegasys.teku.Teku.main(Teku.java:40) [teku-23.3.0.jar:23.3.0]
Caused by: java.io.IOException: Unable to create directory /var/lib/teku/validator
at tech.pegasys.teku.infrastructure.io.SyncDataAccessor.nonAtomicSyncedWrite(SyncDataAccessor.java:113) ~[teku-infrastructure-io-23.3.0.jar:23.3.0]
at tech.pegasys.teku.infrastructure.io.SyncDataAccessor.atomicSyncedWrite(SyncDataAccessor.java:127) ~[teku-infrastructure-io-23.3.0.jar:23.3.0]
at tech.pegasys.teku.infrastructure.io.SyncDataAccessor.create(SyncDataAccessor.java:55) ~[teku-infrastructure-io-23.3.0.jar:23.3.0]
.env:
--- Global configuration ---
EL_NETWORK=xdai
CL_NETWORK=gnosis
--- Execution Layer - Execution Node - configuration ---
EC_IMAGE_VERSION=nethermind/nethermind:1.17.2
NETHERMIND_LOG_LEVEL=INFO
EC_ENABLED_MODULES=[Web3,Eth,Subscribe,Net,]
EC_NODENAME=Nethermind
NETHERMIND_METRICS_PUSH_GATEWAY_URL=http://localhost:9090/metrics
NETHERMIND_PRUNING_CACHEMB=2048
EC_DATA_DIR=./execution-data
EC_SNAP_SYNC_ENABLED=false
EC_JWT_SECRET_PATH=/home//********//sedge-data/jwtsecret
--- Consensus Layer - Beacon Node - configuration ---
CC_PEER_COUNT=50
CC_LOG_LEVEL=info
EC_API_URL=http://execution:8545
EC_AUTH_URL=http://execution:8551
CC_INSTANCE_NAME=Teku
CC_IMAGE_VERSION=consensys/teku:23.3.0
CC_DATA_DIR=./consensus-data
CC_JWT_SECRET_PATH=/home/********/sedge-data/jwtsecret
CHECKPOINT_SYNC_URL=https://checkpoint.gnosischain.com
(complete path masked)
from sedge.
Thanks, can you check if there is a ***/sedge-data/consensus-data
folder and what permission it has? Think this may be related to Teku client not being able to write into that folder. Try using chmod -R 666
over that folder and restart Teku. Did you run sedge with sudo?
from sedge.
I would love to answer of course I run it with sudo 🐤
I started the cli without sudo. And later I ran
with sudo. This was not sufficent, as the permission was already set.
I just retried with sudo sedge cli and everything works fine! 👌
Ticket can be closed. Thx for your quick support and have a good week! 🥇
Info:
I just checked the old version running on another system.
The old version(0.6) didnt require sudo. So the new folder structure might be the cause.
from sedge.
Thanks, good that it worked out for you. However, Sedge is not meant to be run as sudo but it will still work. The folders were probably created with different permissions than it was used later to start the services. In general, over a specific sedge-data
you should use the same user/permissions for all sedge commands.
from sedge.
👌
from sedge.
Related Issues (20)
- Can't sync execution client HOT 1
- Can't compile the app with vendoring enabled HOT 4
- docker-compose error when starting validator using sedge-cli HOT 11
- Unable to send voluntary exit message for a full withdrawal post Shapella HOT 2
- Add new logo to readme HOT 2
- Click to deploy on Google Cloud HOT 1
- eth_syncing is returning false even though sync in not completed. HOT 1
- Illegal instruction (core dumped) HOT 4
- Nethermind 1.21.0 broke sedge HOT 10
- Sepolia support for https://github.com/NethermindEth/sedge/issues/326
- Debian/Ubuntu package missing from PPA
- Insufficient permission to access docker.sock
- Consensus client error with `--eth1-endpoints` flag HOT 3
- Lodestar ports configuration HOT 2
- Be able to run the container as a non root user
- `sedge cli` with full-node setup creates older version of withdrawal credentials, when it should create the newest version HOT 1
- [FEATURE REQUEST] Add security policy
- Support for mev-boost on holesky
- Add grandine Consensus client support
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 sedge.