nethermind
nethermind copied to clipboard
Nethermind ignores --datadir for keys
Describe the bug
I run the latest nethermindeth/hive:latest
and it for some reason needs to write files into the /nethermind/Nethermind folder
# ls
key-84e57e41-999d-4152-aadd-9efc5c1dbfc5.xml
# pwd
/nethermind/Nethermind
To Reproduce Steps to reproduce the behavior:
- Run Nethermind in the container with
--datadir /data/nethermind
- Let it start.
-
exec
into container, and cd/nethermind/Nethermind
and you will see
# ls
key-84e57e41-999d-4152-aadd-9efc5c1dbfc5.xml
# pwd
/nethermind/Nethermind
Expected behavior
Keystore keys are also generated in --datadir
or at least there is parametrization for that.
I found it because I don't run processes as root
and I got the following error
2022-07-22 12-09-23.5796|Setting BaseDbPath to: /data/nethermind/db, from: db
2022-07-22 12-09-23.5797|Setting KeyStoreDirectory to: /data/nethermind/keystore, from: keystore
2022-07-22 12-09-23.5797|Setting LogDirectory to: /data/nethermind/logs, from: logs
2022-07-22 12:09:24.5953|Step SetupKeyStore failed after 141ms System.Security.Cryptography.CryptographicException: An error occurred while trying to encrypt the provided data. Refer to the inner exception for more information. For more information go to http://aka.ms/dataprotectionwarning
---> System.UnauthorizedAccessException: Access to the path '/nethermind/Nethermind' is denied.
Setting KeyStoreDirectory to: /data/nethermind/keystore, from: keystore
and then System.UnauthorizedAccessException: Access to the path '/nethermind/Nethermind’
...
User reported something similar on discord:
Aug 03 16:07:46 de1 systemd[1]: Started Nethermind Ethereum Client.
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4190|Nethermind starting initialization.
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4614|Loading embedded plugins
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4617| Found plugin type Nethermind.Consensus.AuRa.AuRaPlugin
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4619| Found plugin type Nethermind.Consensus.Clique.CliquePlugin
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4619| Found plugin type Nethermind.Consensus.Ethash.EthashPlugin
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4620| Found plugin type Nethermind.Consensus.Ethash.NethDevPlugin
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4621| Found plugin type Nethermind.Hive.HivePlugin
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: Resolved executing directory as /usr/share/nethermind.
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4704|Loading 9 assemblies from /usr/share/nethermind/plugins
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4707|Loading assembly Nethermind.Consensus.AuRa
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4747|Loading assembly Nethermind.AccountAbstraction
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4777| Found plugin type Nethermind.AccountAbstraction
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4779|Loading assembly Nethermind.Init
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4783|Loading assembly Nethermind.EthStats
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4785| Found plugin type Nethermind.EthStats
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4788|Loading assembly Nethermind.Mev
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4800| Found plugin type Nethermind.Mev
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4802|Loading assembly Nethermind.HealthChecks
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4807| Found plugin type Nethermind.HealthChecks
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4808|Loading assembly Nethermind.Api
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4812|Loading assembly Nethermind.Merge.AuRa
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4816| Found plugin type Nethermind.Merge.AuRa
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4816|Loading assembly Nethermind.Merge.Plugin
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.4831| Found plugin type Nethermind.Merge.Plugin
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.5654|Loading standard NLog.config file from /usr/share/nethermind/NLog.config.
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.7140|NLog.config loaded in 148ms.
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.7152|Reading config file from /usr/share/nethermind/configs/mainnet.cfg
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.8720|Configuration initialized.
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.8754|Setting BaseDbPath to: /var/lib/nethermind/nethermind_db/mainnet, from: nethermind_db/mainnet
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.8756|Setting KeyStoreDirectory to: /var/lib/nethermind/keystore, from: keystore
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16-07-46.8757|Setting LogDirectory to: /var/lib/nethermind/logs, from: logs
Aug 03 16:07:46 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:46.8876|RocksDB files versions found: 6.5.2
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.1693|Setting up memory allowances
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.1693| memory hint: 2048MB
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.1693| general memory: 32MB
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.1693| peers memory: 100MB
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.1722| Netty memory: 268MB
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.1722| mempool memory: 149MB
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.1722| fast blocks memory: 149MB
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.1722| trie memory: 269MB
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.1801|Using http://ipv4.icanhazip.com to get external ip
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.1801| DB memory: 1078MB
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.3808|Step SetupKeyStore failed after 120ms System.Security.Cryptography.CryptographicException: An error occurred while trying to encrypt the provided data. Refer to the inner exception for more information. For more information go to http://aka.ms/dataprotectionwarning
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: ---> System.UnauthorizedAccessException: Access to the path '/Nethermind' is denied.
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: ---> System.IO.IOException: Permission denied
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: --- End of inner exception stack trace ---
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at System.IO.FileSystem.CreateDirectory(String fullPath)
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at System.IO.DirectoryInfo.Create()
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.GetAllElementsCore()+MoveNext()
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at System.Collections.Generic.List1..ctor(IEnumerable
1 collection)
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.GetAllElements() Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.GetAllKeys() Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.CreateCacheableKeyRingCore(DateTimeOffset now, IKey keyJustAdded) Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.Microsoft.AspNetCore.DataProtection.KeyManagement.Internal.ICacheableKeyRingProvider.GetCacheableKeyRing(DateTimeOffset now) Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRingCore(DateTime utcNow, Boolean forceRefresh) Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRing() Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(Byte[] plaintext) Aug 03 16:07:47 de1 Nethermind.Runner[19626]: --- End of inner exception stack trace --- Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(Byte[] plaintext) Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Nethermind.Crypto.ProtectedData.AspNetWrapper.Protect(Byte[] userData, Byte[] optionalEntropy, DataProtectionScope scope) Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Nethermind.Crypto.ProtectedData.Protect(Byte[] userData, Byte[] optionalEntropy, DataProtectionScope scope) Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Nethermind.Crypto.ProtectedData
1.Protect(Byte[] data)
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Nethermind.Crypto.ProtectedData`1..ctor(Byte[] data, ICryptoRandom random, ITimestamper timestamper)
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Nethermind.Crypto.ProtectedPrivateKey..ctor(PrivateKey privateKey, ICryptoRandom random, ITimestamper timestamper)
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Nethermind.Wallet.NodeKeyManager.<LoadNodeKey>g__LoadKeyFromFile|9_0()
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Nethermind.Wallet.NodeKeyManager.LoadNodeKey()
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Nethermind.Init.Steps.SetupKeyStore.<>c__DisplayClass2_0.<Execute>b__0()
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at System.Threading.Tasks.Task.InnerInvoke()
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: --- End of stack trace from previous location ---
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: --- End of stack trace from previous location ---
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Nethermind.Init.Steps.SetupKeyStore.Execute(CancellationToken cancellationToken)
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4216|Start block loaded from HEAD - 0 (0xd4e567...cb8fa3)
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4216|Loaded LowestInsertedBeaconHeader:
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4250|Numbers resolved, level = Max(0, 0), header = Max(0, 0), body = Max(0, 0)
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4250|Beacon Numbers resolved, level = 0, header = 0, body = 0
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4280|Block tree initialized, last processed is 0 (0xd4e567...cb8fa3), best queued is 0, best known is 0, lowest inserted header , body , lowest sync inserted block number
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4349|Initializing 11 plugins
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4349| Clique by Nethermind
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4349| Clique by Nethermind initialized in 0ms
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4349| AuRa by Nethermind
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4349| AuRa by Nethermind initialized in 0ms
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4349| Ethash by Nethermind
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4387| Ethash by Nethermind initialized in 3ms
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4387| NethDev by Nethermind
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4387| NethDev by Nethermind initialized in 0ms
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4387| Merge by Nethermind
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4387| Merge by Nethermind initialized in 0ms
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4387| Merge by Nethermind
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4400| Merge by Nethermind initialized in 0ms
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4400| MEV by Nethermind
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4400| MEV by Nethermind initialized in 0ms
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4400| HealthChecks by Nethermind
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4400| HealthChecks by Nethermind initialized in 0ms
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4400| Hive by Nethermind
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4400| Hive by Nethermind initialized in 0ms
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4400| Account Abstraction by Nethermind
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4400| Account Abstraction Plugin: User Operation Mining Disabled
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4400| Account Abstraction by Nethermind initialized in 2ms
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4400| EthStats by Nethermind
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4439|EthStatsPlugin plugin disabled due to EthStatsConfig settings set to false
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.4439| EthStats by Nethermind initialized in 0ms
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.5182|Step InitializeNetwork failed after 19ms Nethermind.Init.Steps.StepDependencyException: NodeKey
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Nethermind.Init.Steps.InitializeNetwork.InitDiscovery()
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Nethermind.Init.Steps.InitializeNetwork.Initialize(CancellationToken cancellationToken)
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Nethermind.Init.Steps.InitializeNetwork.Execute(CancellationToken cancellationToken)
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.5227|No block tree levels to review for fixes. All fine.
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.5272|Loaded LowestInsertedBeaconHeader:
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.5272|Numbers resolved, level = Max(0, 0), header = Max(0, 0), body = Max(0, 0)
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.5272|Beacon Numbers resolved, level = 0, header = 0, body = 0
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.5305|Grafana / Prometheus metrics are disabled in configuration
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.5381|Step RegisterRpcModules failed after 5ms Nethermind.Init.Steps.StepDependencyException: PeerManager
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: at Nethermind.Init.Steps.RegisterRpcModules.Execute(CancellationToken cancellationToken)
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: 2022-08-03 16:07:47.9386|
Aug 03 16:07:47 de1 Nethermind.Runner[19626]: ======================== Nethermind initialization completed ========================
I found out -w key should be used. I've successfully mounted backup with
sudo docker run -d --name eth -p 30333:30333 -p 9545:9545 --ulimit nofile=1000000:1000000 -v ~/nethermind/:/nethermind/data:Z -w /nethermind -it nethermind/nethermind:latest --Network.DiscoveryPort 30333 --Network.P2PPort 30333 --Sync.FastSync true --Sync.SnapSync true --Init.WebSocketsEnabled true --JsonRpc.Enabled true --JsonRpc.Host 0.0.0.0 --JsonRpc.Port 9545 --JsonRpc.WebSocketsPort 9545 --datadir data
Note :Z flag, -w /nethermind (I don't know though, if it's only :Z key or -w is required too, don't have time to test it) flag, and ulimit, but it's in documentation.
i'm also seeing this:
System.UnauthorizedAccessException: Access to the path '/Nethermind' is denied.
when starting it as:
/gnu/store/24zb6izdz5l0l6cd65fb8mmvlwb6gmwm-nethermind-binary-1.14.7/bin/Nethermind.Runner --Sync.UseGethLimitsInFastBlocks=true --Sync.FastSync=true --HealthChecks.UIEnabled=true --HealthChecks.Enabled=true --JsonRpc.JwtSecretFile=/var/lib/nethermind/gnosis/jwt-secret --JsonRpc.EnginePort=8551 --datadir=/var/lib/nethermind/gnosis --config=xdai
context: i'm working on a Guix service to start Nethermind. it's launched as non-root, as a custom user and group.
this is a show-stopper for me as no Docker is involved here, i can't just mount something there.
i suspect it has something to do with the use of {LocalApplicationData}
and friends on linux.
see: https://developers.redhat.com/blog/2018/11/07/dotnet-special-folder-api-linux#environment_getfolderpath
full log:
2022-12-19 00:56:24 2022-12-19 00-56-09.5317|Nethermind starting initialization.
2022-12-19 00:56:24 2022-12-19 00-56-09.7028|Loading embedded plugins
2022-12-19 00:56:24 2022-12-19 00-56-09.7029| Found plugin type Nethermind.Consensus.AuRa.AuRaPlugin
2022-12-19 00:56:24 2022-12-19 00-56-09.7029| Found plugin type Nethermind.Consensus.Clique.CliquePlugin
2022-12-19 00:56:24 2022-12-19 00-56-09.7030| Found plugin type Nethermind.Consensus.Ethash.EthashPlugin
2022-12-19 00:56:24 2022-12-19 00-56-09.7030| Found plugin type Nethermind.Consensus.Ethash.NethDevPlugin
2022-12-19 00:56:24 2022-12-19 00-56-09.7030| Found plugin type Nethermind.Hive.HivePlugin
2022-12-19 00:56:24 2022-12-19 00-56-09.7030| Found plugin type Nethermind.UPnP.Plugin.UPnPPlugin
2022-12-19 00:56:24 Resolved executing directory as /gnu/store/24zb6izdz5l0l6cd65fb8mmvlwb6gmwm-nethermind-binary-1.14.7/share/nethermind-binary-1.14.
7.
2022-12-19 00:56:24 2022-12-19 00-56-09.7553|Loading 9 assemblies from /gnu/store/24zb6izdz5l0l6cd65fb8mmvlwb6gmwm-nethermind-binary-1.14.7/share/neth
ermind-binary-1.14.7/plugins
2022-12-19 00:56:24 2022-12-19 00-56-09.7555|Loading assembly Nethermind.Merge.AuRa
2022-12-19 00:56:24 2022-12-19 00-56-09.7601| Found plugin type Nethermind.Merge.AuRa
2022-12-19 00:56:24 2022-12-19 00-56-09.7601|Loading assembly Nethermind.Merge.Plugin
2022-12-19 00:56:24 2022-12-19 00-56-09.7690| Found plugin type Nethermind.Merge.Plugin
2022-12-19 00:56:24 2022-12-19 00-56-09.7690|Loading assembly Nethermind.HealthChecks
2022-12-19 00:56:24 2022-12-19 00-56-09.7774| Found plugin type Nethermind.HealthChecks
2022-12-19 00:56:24 2022-12-19 00-56-09.7774|Loading assembly Nethermind.AccountAbstraction
2022-12-19 00:56:24 2022-12-19 00-56-09.7828| Found plugin type Nethermind.AccountAbstraction
2022-12-19 00:56:24 2022-12-19 00-56-09.7828|Loading assembly Nethermind.Mev
2022-12-19 00:56:24 2022-12-19 00-56-09.7909| Found plugin type Nethermind.Mev
2022-12-19 00:56:24 2022-12-19 00-56-09.7909|Loading assembly Nethermind.Init
2022-12-19 00:56:24 2022-12-19 00-56-09.7933|Loading assembly Nethermind.Consensus.AuRa
2022-12-19 00:56:24 2022-12-19 00-56-09.8001|Loading assembly Nethermind.Api
2022-12-19 00:56:24 2022-12-19 00-56-09.8053|Loading assembly Nethermind.EthStats
2022-12-19 00:56:24 2022-12-19 00-56-09.8074| Found plugin type Nethermind.EthStats
2022-12-19 00:56:24 2022-12-19 00-56-09.9664|Loading standard NLog.config file from /gnu/store/24zb6izdz5l0l6cd65fb8mmvlwb6gmwm-nethermind-binary-1.14
.7/share/nethermind-binary-1.14.7/NLog.config.
2022-12-19 00:56:24 2022-12-19 00-56-10.8489|NLog.config loaded in 882ms.
2022-12-19 00:56:24 2022-12-19 00-56-10.8574|Reading config file from /gnu/store/24zb6izdz5l0l6cd65fb8mmvlwb6gmwm-nethermind-binary-1.14.7/share/nethe
rmind-binary-1.14.7/configs/xdai.cfg
2022-12-19 00:56:24 2022-12-19 00-56-11.6494|Configuration initialized.
2022-12-19 00:56:24 2022-12-19 00-56-11.6607|Setting BaseDbPath to: /var/lib/nethermind/gnosis/nethermind_db/xdai, from: nethermind_db/xdai
2022-12-19 00:56:24 2022-12-19 00-56-11.6608|Setting KeyStoreDirectory to: /var/lib/nethermind/gnosis/keystore, from: keystore
2022-12-19 00:56:24 2022-12-19 00-56-11.6608|Setting LogDirectory to: /var/lib/nethermind/gnosis/logs, from: logs
2022-12-19 00:56:24 2022-12-19 00:56:11.6960|RocksDb Version: 6.29.3
2022-12-19 00:56:24 2022-12-19 00:56:11.7353|Loading chainspec from embedded resources: /gnu/store/24zb6izdz5l0l6cd65fb8mmvlwb6gmwm-nethermind-binary-
1.14.7/share/nethermind-binary-1.14.7/chainspec/xdai.json
2022-12-19 00:56:24 2022-12-19 00:56:12.4086|Using http://ipv4.icanhazip.com to get external ip
2022-12-19 00:56:24 2022-12-19 00:56:12.8262|Setting up memory allowances
2022-12-19 00:56:24 2022-12-19 00:56:12.8262| memory hint: 768MB
2022-12-19 00:56:24 2022-12-19 00:56:12.8262| general memory: 32MB
2022-12-19 00:56:24 2022-12-19 00:56:12.8262| peers memory: 50MB
2022-12-19 00:56:24 2022-12-19 00:56:12.8297| Netty memory: 33MB
2022-12-19 00:56:24 2022-12-19 00:56:12.8297| mempool memory: 114MB
2022-12-19 00:56:24 2022-12-19 00:56:12.8297| fast blocks memory: 53MB
2022-12-19 00:56:24 2022-12-19 00:56:12.8297| trie memory: 96MB
2022-12-19 00:56:24 2022-12-19 00:56:12.8454| DB memory: 387MB
2022-12-19 00:56:24 2022-12-19 00:56:13.1844|Generating private key for the node (no node key in configuration) - stored in plain + key store for JSON
RPC unlocking
2022-12-19 00:56:24 2022-12-19 00:56:17.9453|Store this password for unlocking the node key for JSON RPC - this is not secure - this log message will
be in your log files. Use only in DEV contexts.
2022-12-19 00:56:24 2022-12-19 00:56:18.0093|Step SetupKeyStore failed after 4837ms System.Security.Cryptography.CryptographicException: An
error occurred while trying to encrypt the provided data. Refer to the inner exception for more information. For more information go to http://aka.ms
/dataprotectionwarning
2022-12-19 00:56:24 ---> System.UnauthorizedAccessException: Access to the path '/Nethermind' is denied.
2022-12-19 00:56:24 ---> System.IO.IOException: Permission denied
2022-12-19 00:56:24 --- End of inner exception stack trace ---
2022-12-19 00:56:24 at System.IO.FileSystem.CreateDirectory(String fullPath)
2022-12-19 00:56:24 at System.IO.DirectoryInfo.Create()
2022-12-19 00:56:24 at Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.GetAllElementsCore()+MoveNext()
2022-12-19 00:56:24 at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
2022-12-19 00:56:24 at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
2022-12-19 00:56:24 at Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository.GetAllElements()
2022-12-19 00:56:24 at Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.GetAllKeys()
2022-12-19 00:56:24 at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.CreateCacheableKeyRingCore(DateTimeOffset now, IKey keyJus
tAdded)
2022-12-19 00:56:24 at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.Microsoft.AspNetCore.DataProtection.KeyManagement.Internal
.ICacheableKeyRingProvider.GetCacheableKeyRing(DateTimeOffset now)
2022-12-19 00:56:24 at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRingCore(DateTime utcNow, Boolean forceRefres
h)
2022-12-19 00:56:24 at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRing()
2022-12-19 00:56:24 at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(Byte[] plaintext)
2022-12-19 00:56:24 --- End of inner exception stack trace ---
2022-12-19 00:56:24 at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(Byte[] plaintext)
2022-12-19 00:56:24 at Nethermind.Crypto.ProtectedData.AspNetWrapper.Protect(Byte[] userData, Byte[] optionalEntropy, DataProtectionScope scope)
2022-12-19 00:56:24 at Nethermind.Crypto.ProtectedData.Protect(Byte[] userData, Byte[] optionalEntropy, DataProtectionScope scope)
2022-12-19 00:56:24 at Nethermind.Crypto.ProtectedData`1.Protect(Byte[] data)
2022-12-19 00:56:24 at Nethermind.Crypto.ProtectedData`1..ctor(Byte[] data, ICryptoRandom random, ITimestamper timestamper)
2022-12-19 00:56:24 at Nethermind.Crypto.ProtectedPrivateKey..ctor(PrivateKey privateKey, ICryptoRandom random, ITimestamper timestamper)
2022-12-19 00:56:24 at Nethermind.Wallet.NodeKeyManager.<LoadNodeKey>g__LoadKeyFromFile|9_0()
2022-12-19 00:56:24 at Nethermind.Wallet.NodeKeyManager.LoadNodeKey()
2022-12-19 00:56:24 at Nethermind.Init.Steps.SetupKeyStore.<>c__DisplayClass2_0.<Execute>b__0()
2022-12-19 00:56:24 at System.Threading.Tasks.Task.InnerInvoke()
2022-12-19 00:56:24 at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
2022-12-19 00:56:24 at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext,
ContextCallback callback, Object state)
2022-12-19 00:56:24 --- End of stack trace from previous location ---
2022-12-19 00:56:24 at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext,
ContextCallback callback, Object state)
2022-12-19 00:56:24 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
2022-12-19 00:56:24 --- End of stack trace from previous location ---
2022-12-19 00:56:24 at Nethermind.Init.Steps.SetupKeyStore.Execute(CancellationToken cancellationToken)
2022-12-19 00:56:24 at Nethermind.Init.Steps.EthereumStepsManager.ExecuteStep(IStep step, StepInfo stepInfo, CancellationToken cancellationToken)
any word on this?
this is a showstopper in any non-Docker based Linux environment.
@attila-lendvai hitting the same on NixOS whilst creating a custom Nethermind service.