Windows service fails to start on OS (re)boot #6076
Labels
bug
Issue is reported as a bug
help wanted
Issue not worked on by OTP; help wanted from the community
team:PS
Assigned to OTP team PS
team:VM
Assigned to OTP team VM
Describe the bug
SCM services installed using
erlsrv
fail to start on Windows (re)boot, at least on Windows 10, 11, and Windows Server 2019 (earlier Windows versions don't seem to be affected). An ErlSrv error is reported to the Windows event log:Could not get registry keys for erlang service
. Seemserlsrv
writes a few things into the registry and for some reason fails to read them when called early during boot. Manually starting the service after reboot works, and setting the startup type to "Automatic (Delayed Start)" works around the issue.To Reproduce
On a non-ancient Windows system with a non-ancient Erlang/OTP version installed:
erl
shell:cmd
shell with administrator privileges, and install/start the SCM service:Expected behavior
The service starts up on (re)boot.
Affected versions
I've reproduced the problem with Erlang/OTP 25.0.1.
Additional context
This issue has been reported to several projects over the past few years, e.g.:
Therefore, I'd assume this isn't a new problem. The usual workaround seems to be to use the delayed startup type as mentioned above (e.g., emqx/emqx-rel@28b1a00 or processone/eturnal@9b452ea).
The text was updated successfully, but these errors were encountered: