-
Notifications
You must be signed in to change notification settings - Fork 797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VC blocks on SlashingDatabase::open
when running with NSSM on Windows
#2394
Comments
NSSM source code can be found on https://git.nssm.cc/nssm/nssm if that can help. |
I've experimented with NSSM and I think it's a file permissions issue. I couldn't recreate the exact hang that you got, but I did get this error when I tried starting after importing the key not as the administrator:
I think I also got a similar error importing the key as admin before starting the service (will have to recheck this on Monday). The flow that definitely worked was:
Let me know if that works for you. The only suspect thing I found in our code was that we call For reference: https://doc.rust-lang.org/std/path/struct.Path.html#method.metadata |
It really seems like a file permission issue. For some reason the permissions on
By adding the SYSTEM account (the account under which services normally run) with full control on the I just tested importing my validator keystore again with It would be nice if the VC would error out with a message instead of blocking if it does not have permission to access the |
It looks like we have a solution to this over in #2436 🎉 |
Seems great! Don't forget to relax the permissions on the |
Yeah, let's leave this issue open as a way to track the permissions changes for Windows |
## Issue Addressed Related to #2430, #2394 ## Proposed Changes As per #2430 (comment), ensure that the `ProductionValidatorClient::new` error raises a log and shuts down the VC. Also, I implemened `spawn_ignoring_error`, as per @michaelsproul's suggestion in #2436 (comment). I got unlucky and CI picked up a [new rustsec vuln](https://rustsec.org/advisories/RUSTSEC-2021-0072). To fix this, I had to update the following crates: - `tokio` - `web3` - `tokio-compat-02` ## Additional Info NA
I'll add that even the logger sets the log files a owner-only lighthouse/lighthouse/environment/src/lib.rs Line 223 in 28aceaa
This is quite annoying if you want to run lighthouse as a service, and then use another use to look at the logs. |
Description
VC blocks on
SlashingDatabase::open
when running with NSSM as a service on Windows. It does not run properly and it cannot attest. It does not leaveSlashingDatabase::open
.Version
Lighthouse v1.4.0-rc.0-f6280aa
BLS Library: blst
Specs: mainnet (true), minimal (false), v0.12.3 (false)
Unstable
Windows 10 (10.0.19043 Build 19043)
rustc 1.52.1 (9bc8c42bb 2021-05-09)
commit f6280aa
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30037 for x64
NSSM 2.24-101-g897c7ad 64-bit 2017-04-26
Present Behaviour
When running with NSSM as a service on Windows, VC starts, displays the follow logs:
and stops/blocks. When debugging a little further, it blocks when entering
SlashingDatabase::open
.Expected Behaviour
VC should run fine even under NSSM as a service on Windows just like it does when it does not run under NSSM.
Steps to reproduce
⊞ Win
+R
, typepowershell
, pressCtrl
+⇧ Shift
+↵ Enter
and clickYes
at the User Account Control window)↵ Enter
:⊞ Win
+R
, typecmd
, pressCtrl
+⇧ Shift
+↵ Enter
and clickYes
at the User Account Control window)↵ Enter
at the end of the line):Y
and press↵ Enter
to run it.⊞ Win
+R
, typecmd
, press↵ Enter
).↵ Enter
at the end of the line):http://localhost:5051
↵ Enter
at the end of the line):C:\ethereum\var\log\lighthousevalidator-service-stderr.log
to find out that the last log message is something like:The text was updated successfully, but these errors were encountered: