mtkennerly / shawl

Windows service wrapper for arbitrary commands
MIT License
448 stars 15 forks source link

Service fails to start at AllocConsole #28

Closed adiroiban closed 1 year ago

adiroiban commented 1 year ago

I am reporting this error here just in the case in which someone else hit it.

[ERROR] winapi AllocConsole failed with code 31

From the Windows API docs

ERROR_GEN_FAILURE 31 (0x1F) A device attached to the system is not functioning.


I am not sure why this stopped working. The shawl used to work, I did a Windows OS update and now it no longer works.

I am still troubleshooting this.

Most probably this is not an shawl error... and just a WIndows setup.

mtkennerly commented 1 year ago

Hmm, I'm not able to reproduce this on Windows 11:

Edition: Windows 11 Home Version: 22H2 Installed on: 2023-02-15 OS build: 22621.1555 Experience: Windows Feature Experience Pack 1000.22640.1000.0

Could you share your OS version?

adiroiban commented 1 year ago

Thanks for looking into this.

I am not sure this is a bug with shawl. I just wanted to get this reported, since I could not find any other place over the internet to discuss the error 31 for AllocConsole

I got this issue on Windows 2012 R2.

But this is a very strange issue since I have shawl working on other Win 2012 R2 VMs.

I think that the issue is with Windows permissions ... or something like that. The VM is not in a domain and the service starts as the default/standard Local System.

I am doing more troubleshooting on this VM. Somehow this VM is super slow... I am not sure if this can be a race issue... but I don't think this is the reason.

mtkennerly commented 1 year ago

Are all of your VMs using the same version of Shawl (latest is v1.1.1)?

mtkennerly commented 1 year ago

I'll close this for now since it seems like a system problem, but please let me know if you find out anything new.

adiroiban commented 1 year ago

Hi. Sorry for the late reply. It was very strange.

I had the exact same version installed twice. One was starting just fine, the other was failing.

Thanks for closing this ticket. I hope I will not hit this issue again :)